@@ -133,14 +133,14 @@ |
||
133 | 133 | |
134 | 134 | // Query for our terms |
135 | 135 | $args = array( |
136 | - 'hide_empty' => false, |
|
137 | - 'meta_query' => array( |
|
138 | - array( |
|
139 | - 'key' => 'evans_test_content', |
|
140 | - 'value' => '__test__', |
|
141 | - 'compare' => '=' |
|
142 | - ) |
|
143 | - ) |
|
136 | + 'hide_empty' => false, |
|
137 | + 'meta_query' => array( |
|
138 | + array( |
|
139 | + 'key' => 'evans_test_content', |
|
140 | + 'value' => '__test__', |
|
141 | + 'compare' => '=' |
|
142 | + ) |
|
143 | + ) |
|
144 | 144 | ); |
145 | 145 | |
146 | 146 | $terms = get_terms( $slug, $args ); |
@@ -89,8 +89,8 @@ |
||
89 | 89 | } else { |
90 | 90 | // We didn't get a reponse so print the notice out |
91 | 91 | echo '<div class="notice notice-error is-dismissible">'; |
92 | - echo '<p>'.__( 'WordPress could not connect to Splashbase and therefore images will not pull into metaboxes/thumbnails. Turn Airplane Mode off or reconnect to the Internet to get images when creating test data.', 'otm-test-content' ).'</p>'; |
|
93 | - echo '</div>'; |
|
92 | + echo '<p>'.__( 'WordPress could not connect to Splashbase and therefore images will not pull into metaboxes/thumbnails. Turn Airplane Mode off or reconnect to the Internet to get images when creating test data.', 'otm-test-content' ).'</p>'; |
|
93 | + echo '</div>'; |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | } |
@@ -417,29 +417,29 @@ discard block |
||
417 | 417 | } |
418 | 418 | |
419 | 419 | // Download the file |
420 | - $tmp = \download_url( $url ); |
|
420 | + $tmp = \download_url( $url ); |
|
421 | 421 | |
422 | - preg_match( '/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $url, $matches ); |
|
422 | + preg_match( '/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $url, $matches ); |
|
423 | 423 | |
424 | - $file_array['name'] = basename( $matches[0] ); |
|
425 | - $file_array['tmp_name'] = $tmp; |
|
424 | + $file_array['name'] = basename( $matches[0] ); |
|
425 | + $file_array['tmp_name'] = $tmp; |
|
426 | 426 | |
427 | - // Check for download errors |
|
428 | - if ( is_wp_error( $tmp ) ) { |
|
429 | - unlink( $file_array[ 'tmp_name' ] ); |
|
430 | - error_log( $tmp->get_error_message() ); |
|
431 | - } |
|
427 | + // Check for download errors |
|
428 | + if ( is_wp_error( $tmp ) ) { |
|
429 | + unlink( $file_array[ 'tmp_name' ] ); |
|
430 | + error_log( $tmp->get_error_message() ); |
|
431 | + } |
|
432 | 432 | |
433 | 433 | // Pull the image into the media library |
434 | - $image_id = media_handle_sideload( $file_array, $post_id ); |
|
434 | + $image_id = media_handle_sideload( $file_array, $post_id ); |
|
435 | 435 | |
436 | - // Check for handle sideload errors. |
|
437 | - if ( is_wp_error( $image_id ) ) { |
|
438 | - unlink( $file_array['tmp_name'] ); |
|
439 | - error_log( $image_id->get_error_message() ); |
|
440 | - } |
|
436 | + // Check for handle sideload errors. |
|
437 | + if ( is_wp_error( $image_id ) ) { |
|
438 | + unlink( $file_array['tmp_name'] ); |
|
439 | + error_log( $image_id->get_error_message() ); |
|
440 | + } |
|
441 | 441 | |
442 | - return $image_id; |
|
442 | + return $image_id; |
|
443 | 443 | |
444 | 444 | } |
445 | 445 | |
@@ -462,9 +462,9 @@ discard block |
||
462 | 462 | |
463 | 463 | // If our cURL failed |
464 | 464 | if ( $curl_response === false ) { |
465 | - $info = curl_getinfo( $curl ); |
|
466 | - curl_close( $curl ); |
|
467 | - die( 'error occured during curl exec. Additional info: ' . var_export( $info ) ); |
|
465 | + $info = curl_getinfo( $curl ); |
|
466 | + curl_close( $curl ); |
|
467 | + die( 'error occured during curl exec. Additional info: ' . var_export( $info ) ); |
|
468 | 468 | } |
469 | 469 | |
470 | 470 | curl_close( $curl ); |
@@ -65,7 +65,7 @@ |
||
65 | 65 | * @see load_plugin_textdomain |
66 | 66 | */ |
67 | 67 | public function load_textdomain() { |
68 | - load_plugin_textdomain( 'otm-test-content', FALSE, basename( dirname( $this->definitions->file ) ) . '/languages/' ); |
|
68 | + load_plugin_textdomain( 'otm-test-content', FALSE, basename( dirname( $this->definitions->file ) ) . '/languages/' ); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | } |
@@ -4,12 +4,12 @@ discard block |
||
4 | 4 | |
5 | 5 | // If uninstall is not called from WordPress, exit |
6 | 6 | if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
7 | - exit(); |
|
7 | + exit(); |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | // Check if the current user has priveledges to run this method |
11 | 11 | if ( ! current_user_can( 'activate_plugins' ) ){ |
12 | - return; |
|
12 | + return; |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | require dirname( __FILE__ ) . '/includes/class-delete.php'; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $post_types = get_post_types( array( 'public' => true ), 'objects' ); |
20 | 20 | foreach ( $post_types as $post_type ) : |
21 | 21 | |
22 | - $delete->delete_posts( $post_type->name ); |
|
22 | + $delete->delete_posts( $post_type->name ); |
|
23 | 23 | |
24 | 24 | endforeach; |
25 | 25 | |
@@ -27,6 +27,6 @@ discard block |
||
27 | 27 | $taxonomies = get_taxonomies(); |
28 | 28 | foreach ( $taxonomies as $tax ) : |
29 | 29 | |
30 | - $delete->delete_terms( $tax ); |
|
30 | + $delete->delete_terms( $tax ); |
|
31 | 31 | |
32 | 32 | endforeach; |