| @@ -10,7 +10,7 @@ | ||
| 10 | 10 | * @subpackage Test Content | 
| 11 | 11 | * @author Old Town Media | 
| 12 | 12 | */ | 
| 13 | -abstract class View{ | |
| 13 | +abstract class View { | |
| 14 | 14 | |
| 15 | 15 | /** | 
| 16 | 16 | * title | 
| @@ -9,7 +9,7 @@ discard block | ||
| 9 | 9 | * @subpackage Test Content | 
| 10 | 10 | * @author Old Town Media | 
| 11 | 11 | */ | 
| 12 | -abstract class Type{ | |
| 12 | +abstract class Type { | |
| 13 | 13 | |
| 14 | 14 | /** | 
| 15 | 15 | * type | 
| @@ -48,7 +48,7 @@ discard block | ||
| 48 | 48 | */ | 
| 49 | 49 |  	public function set_type( $types ) { | 
| 50 | 50 | |
| 51 | - $types[] = $this->type; | |
| 51 | + $types[ ] = $this->type; | |
| 52 | 52 | return $types; | 
| 53 | 53 | |
| 54 | 54 | } | 
| @@ -10,7 +10,7 @@ | ||
| 10 | 10 | * @subpackage Evans | 
| 11 | 11 | * @author Old Town Media | 
| 12 | 12 | */ | 
| 13 | -class Reporting{ | |
| 13 | +class Reporting { | |
| 14 | 14 | |
| 15 | 15 |  	public function create_report( $data ) { | 
| 16 | 16 | |
| @@ -9,7 +9,7 @@ discard block | ||
| 9 | 9 | * @subpackage Evans | 
| 10 | 10 | * @author Old Town Media | 
| 11 | 11 | */ | 
| 12 | -class Delete{ | |
| 12 | +class Delete { | |
| 13 | 13 | |
| 14 | 14 | /** | 
| 15 | 15 | * Delete all test content created ever. | 
| @@ -64,8 +64,8 @@ discard block | ||
| 64 | 64 | return; | 
| 65 | 65 | } | 
| 66 | 66 | |
| 67 | - $type = 'DummyPress\Types\\' . ucwords( $data['type'] ); | |
| 68 | - $slug = $data['slug']; | |
| 67 | + $type = 'DummyPress\Types\\' . ucwords( $data[ 'type' ] ); | |
| 68 | + $slug = $data[ 'slug' ]; | |
| 69 | 69 | |
| 70 | 70 | $object = new $type(); | 
| 71 | 71 | |
| @@ -8,7 +8,7 @@ discard block | ||
| 8 | 8 | * @subpackage Evans | 
| 9 | 9 | * @author Old Town Media | 
| 10 | 10 | */ | 
| 11 | -class MetaboxValues{ | |
| 11 | +class MetaboxValues { | |
| 12 | 12 | |
| 13 | 13 | /** | 
| 14 | 14 | * Assigns the proper testing data to a custom metabox. | 
| @@ -31,7 +31,7 @@ discard block | ||
| 31 | 31 | } | 
| 32 | 32 | |
| 33 | 33 | // Fetch the appropriate type of data and return | 
| 34 | -		switch( $cmb['type'] ) { | |
| 34 | +		switch ( $cmb[ 'type' ] ) { | |
| 35 | 35 | |
| 36 | 36 | case 'text': | 
| 37 | 37 | case 'text_small': | 
| @@ -120,7 +120,7 @@ discard block | ||
| 120 | 120 | |
| 121 | 121 | case 'checkbox': | 
| 122 | 122 | |
| 123 | -				if ( isset( $cmb['source'] ) && 'acf' === $cmb['source'] ) { | |
| 123 | +				if ( isset( $cmb[ 'source' ] ) && 'acf' === $cmb[ 'source' ] ) { | |
| 124 | 124 | $value = $this->multicheck( $cmb ); | 
| 125 | 125 |  				} else { | 
| 126 | 126 | $value = $this->checkbox( $cmb ); | 
| @@ -183,19 +183,19 @@ discard block | ||
| 183 | 183 |  	private function text( $cmb ) { | 
| 184 | 184 | |
| 185 | 185 | // If phone is in the id, fetch a phone # | 
| 186 | -		if ( stripos( $cmb['id'], 'phone' ) ) { | |
| 186 | +		if ( stripos( $cmb[ 'id' ], 'phone' ) ) { | |
| 187 | 187 | $value = TestContent::phone(); | 
| 188 | 188 | |
| 189 | 189 | // If email is in the id, fetch an email address | 
| 190 | -		} elseif ( stripos( $cmb['id'], 'email' ) ) { | |
| 190 | +		} elseif ( stripos( $cmb[ 'id' ], 'email' ) ) { | |
| 191 | 191 | $value = TestContent::email(); | 
| 192 | 192 | |
| 193 | 193 | // If time is in the id, fetch a time string | 
| 194 | -		} elseif ( stripos( $cmb['id'], 'time' ) ) { | |
| 194 | +		} elseif ( stripos( $cmb[ 'id' ], 'time' ) ) { | |
| 195 | 195 | $value = TestContent::time(); | 
| 196 | 196 | |
| 197 | 197 | // If company|organization is in the ID, fetch a company name | 
| 198 | -		} elseif ( stripos( $cmb['id'], 'company' ) || stripos( $cmb['id'], 'organization' ) ) { | |
| 198 | +		} elseif ( stripos( $cmb[ 'id' ], 'company' ) || stripos( $cmb[ 'id' ], 'organization' ) ) { | |
| 199 | 199 | $value = TestContent::organization(); | 
| 200 | 200 | |
| 201 | 201 | // Otherwise, just a random text string | 
| @@ -203,8 +203,8 @@ discard block | ||
| 203 | 203 | $value = TestContent::title( rand( 10, 50 ) ); | 
| 204 | 204 | } | 
| 205 | 205 | |
| 206 | -		if ( 'acf' === $cmb['source'] && ! empty( $cmb['extras']->chars ) ) { | |
| 207 | - $value = substr( $value, 0, $cmb['extras']->chars ); | |
| 206 | +		if ( 'acf' === $cmb[ 'source' ] && ! empty( $cmb[ 'extras' ]->chars ) ) { | |
| 207 | + $value = substr( $value, 0, $cmb[ 'extras' ]->chars ); | |
| 208 | 208 | } | 
| 209 | 209 | |
| 210 | 210 | return $value; | 
| @@ -237,7 +237,7 @@ discard block | ||
| 237 | 237 | */ | 
| 238 | 238 |  	private function email( $cmb ) { | 
| 239 | 239 | |
| 240 | - return TestContent::email();; | |
| 240 | + return TestContent::email(); ; | |
| 241 | 241 | |
| 242 | 242 | } | 
| 243 | 243 | |
| @@ -253,12 +253,12 @@ discard block | ||
| 253 | 253 | $min = 1; | 
| 254 | 254 | $max = 10000000; | 
| 255 | 255 | |
| 256 | -		if ( 'acf' == $cmb['source'] && ! empty( $cmb['extras']->min ) ) { | |
| 257 | - $min = $cmb['extras']->min; | |
| 256 | +		if ( 'acf' == $cmb[ 'source' ] && ! empty( $cmb[ 'extras' ]->min ) ) { | |
| 257 | + $min = $cmb[ 'extras' ]->min; | |
| 258 | 258 | } | 
| 259 | 259 | |
| 260 | -		if ( 'acf' == $cmb['source'] && ! empty( $cmb['extras']->max ) ) { | |
| 261 | - $max = $cmb['extras']->max; | |
| 260 | +		if ( 'acf' == $cmb[ 'source' ] && ! empty( $cmb[ 'extras' ]->max ) ) { | |
| 261 | + $max = $cmb[ 'extras' ]->max; | |
| 262 | 262 | } | 
| 263 | 263 | |
| 264 | 264 | return rand( $min, $max ); | 
| @@ -351,8 +351,8 @@ discard block | ||
| 351 | 351 | |
| 352 | 352 | $value = TestContent::plain_text(); | 
| 353 | 353 | |
| 354 | -		if ( 'acf' == $cmb['source'] && ! empty( $cmb['extras']->chars ) ) { | |
| 355 | - $value = substr( $value, 0, $cmb['extras']->chars ); | |
| 354 | +		if ( 'acf' == $cmb[ 'source' ] && ! empty( $cmb[ 'extras' ]->chars ) ) { | |
| 355 | + $value = substr( $value, 0, $cmb[ 'extras' ]->chars ); | |
| 356 | 356 | } | 
| 357 | 357 | |
| 358 | 358 | return $value; | 
| @@ -371,7 +371,7 @@ discard block | ||
| 371 | 371 |  	private function radio( $cmb ) { | 
| 372 | 372 | |
| 373 | 373 | // Grab a random item out of the array and return the key | 
| 374 | - $new_val = array_slice( $cmb['options'], rand( 0, count( $cmb['options'] ) ), 1 ); | |
| 374 | + $new_val = array_slice( $cmb[ 'options' ], rand( 0, count( $cmb[ 'options' ] ) ), 1 ); | |
| 375 | 375 | $value = key( $new_val ); | 
| 376 | 376 | |
| 377 | 377 | return $value; | 
| @@ -413,11 +413,11 @@ discard block | ||
| 413 | 413 | $new_option = array(); | 
| 414 | 414 | |
| 415 | 415 | // Loop through each of our options | 
| 416 | -		foreach ( $cmb['options'] as $key => $value ) { | |
| 416 | +		foreach ( $cmb[ 'options' ] as $key => $value ) { | |
| 417 | 417 | |
| 418 | 418 | // 50/50 chance of being included | 
| 419 | 419 |  			if ( rand( 0, 1 ) ) { | 
| 420 | - $new_option[] = $key; | |
| 420 | + $new_option[ ] = $key; | |
| 421 | 421 | } | 
| 422 | 422 | |
| 423 | 423 | } | 
| @@ -492,23 +492,23 @@ discard block | ||
| 492 | 492 | */ | 
| 493 | 493 |  	private function update_meta( $post_id, $value, $cmb ) { | 
| 494 | 494 | |
| 495 | - $type = $cmb['type']; | |
| 496 | - $id = $cmb['id']; | |
| 497 | -		$value = apply_filters( "tc_{$type}_metabox", $value );	// Filter by metabox type | |
| 495 | + $type = $cmb[ 'type' ]; | |
| 496 | + $id = $cmb[ 'id' ]; | |
| 497 | +		$value = apply_filters( "tc_{$type}_metabox", $value ); // Filter by metabox type | |
| 498 | 498 |  		$value = apply_filters( "tc_{$id}_metabox", $value ); // Filter by metabox ID | 
| 499 | 499 | |
| 500 | 500 | // Files must be treated separately - they use the attachment ID | 
| 501 | 501 | // & url of media for separate cmb values. (only in cmb1 & cmb2 though) | 
| 502 | -		if ( 'file'!== $cmb['type'] || ( 'file' === $cmb['type'] && 'cmb_hm' === $cmb['source'] ) ) { | |
| 503 | - add_post_meta( $post_id, $cmb['id'], $value, true ); | |
| 502 | +		if ( 'file' !== $cmb[ 'type' ] || ( 'file' === $cmb[ 'type' ] && 'cmb_hm' === $cmb[ 'source' ] ) ) { | |
| 503 | + add_post_meta( $post_id, $cmb[ 'id' ], $value, true ); | |
| 504 | 504 |  		} else { | 
| 505 | - add_post_meta( $post_id, $cmb['id'].'_id', $value, true ); | |
| 506 | - add_post_meta( $post_id, $cmb['id'], wp_get_attachment_url( $value ), true ); | |
| 505 | + add_post_meta( $post_id, $cmb[ 'id' ] . '_id', $value, true ); | |
| 506 | + add_post_meta( $post_id, $cmb[ 'id' ], wp_get_attachment_url( $value ), true ); | |
| 507 | 507 | } | 
| 508 | 508 | |
| 509 | 509 | // Add extra, redundant meta. Because, why not have two rows for the price of one? | 
| 510 | -		if ( isset( $cmb['source'] ) && 'acf' === $cmb['source'] ) { | |
| 511 | - add_post_meta( $post_id, '_' . $cmb['id'], $cmb['key'], true ); | |
| 510 | +		if ( isset( $cmb[ 'source' ] ) && 'acf' === $cmb[ 'source' ] ) { | |
| 511 | + add_post_meta( $post_id, '_' . $cmb[ 'id' ], $cmb[ 'key' ], true ); | |
| 512 | 512 | } | 
| 513 | 513 | |
| 514 | 514 | } | 
| @@ -14,7 +14,7 @@ discard block | ||
| 14 | 14 | * @subpackage Evans | 
| 15 | 15 | * @author Old Town Media | 
| 16 | 16 | */ | 
| 17 | -class TestContent{ | |
| 17 | +class TestContent { | |
| 18 | 18 | |
| 19 | 19 | /** | 
| 20 | 20 | * Title function. | 
| @@ -72,7 +72,7 @@ discard block | ||
| 72 | 72 | } | 
| 73 | 73 | |
| 74 | 74 | // Pull random words | 
| 75 | -		for( $i = 1; $i <= $num_words; $i++ ) { | |
| 75 | +		for ( $i = 1; $i <= $num_words; $i++ ) { | |
| 76 | 76 | $title .= $random_words[ rand( 0, 31 ) ] . " "; | 
| 77 | 77 | } | 
| 78 | 78 | |
| @@ -351,17 +351,17 @@ discard block | ||
| 351 | 351 | ); | 
| 352 | 352 | |
| 353 | 353 | $used_keys = array(); | 
| 354 | -		for( $i = 1; $i < 7; $i++ ) { | |
| 354 | +		for ( $i = 1; $i < 7; $i++ ) { | |
| 355 | 355 | |
| 356 | 356 | // Pull a new random key and make sure we're not repeating any elements | 
| 357 | 357 | $key = rand( 0, 12 ); | 
| 358 | -			while( in_array( $key, $used_keys ) ) { | |
| 358 | +			while ( in_array( $key, $used_keys ) ) { | |
| 359 | 359 | $key = rand( 0, 12 ); | 
| 360 | 360 | } | 
| 361 | 361 | |
| 362 | - $content .= $random_content_types[$key]; | |
| 362 | + $content .= $random_content_types[ $key ]; | |
| 363 | 363 | |
| 364 | - $used_keys[] = $key; | |
| 364 | + $used_keys[ ] = $key; | |
| 365 | 365 | } | 
| 366 | 366 | |
| 367 | 367 | return apply_filters( "tc_paragraphs_data", $content ); | 
| @@ -431,8 +431,8 @@ discard block | ||
| 431 | 431 | |
| 432 | 432 | preg_match( '/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $url, $matches ); | 
| 433 | 433 | |
| 434 | - $file_array['name'] = basename( $matches[0] ); | |
| 435 | - $file_array['tmp_name'] = $tmp; | |
| 434 | + $file_array[ 'name' ] = basename( $matches[ 0 ] ); | |
| 435 | + $file_array[ 'tmp_name' ] = $tmp; | |
| 436 | 436 | |
| 437 | 437 | // Check for download errors | 
| 438 | 438 |  	    if ( is_wp_error( $tmp ) ) { | 
| @@ -445,7 +445,7 @@ discard block | ||
| 445 | 445 | |
| 446 | 446 | // Check for handle sideload errors. | 
| 447 | 447 |  	    if ( is_wp_error( $image_id ) ) { | 
| 448 | - unlink( $file_array['tmp_name'] ); | |
| 448 | + unlink( $file_array[ 'tmp_name' ] ); | |
| 449 | 449 | error_log( $image_id->get_error_message() ); | 
| 450 | 450 | } | 
| 451 | 451 | |
| @@ -483,10 +483,10 @@ discard block | ||
| 483 | 483 | $response = json_decode( $curl_response, true ); | 
| 484 | 484 | |
| 485 | 485 | // Check to make sure that the return contains a valid image extensions | 
| 486 | -		preg_match('/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $response['url'], $matches); | |
| 486 | + preg_match( '/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $response[ 'url' ], $matches ); | |
| 487 | 487 | |
| 488 | 488 |  		if ( ! empty( $matches ) ) { | 
| 489 | - return $response['url']; | |
| 489 | + return $response[ 'url' ]; | |
| 490 | 490 | } | 
| 491 | 491 | |
| 492 | 492 | } | 
| @@ -524,9 +524,9 @@ discard block | ||
| 524 | 524 | '5:00PM', | 
| 525 | 525 | '13:00', | 
| 526 | 526 | '2015', | 
| 527 | - date( 'G:i', strtotime( " +".rand( 4, 24 )." hours" ) ), | |
| 528 | - date( 'g:i', strtotime( " +".rand( 4, 24 )." hours" ) ), | |
| 529 | - date( 'G:i A', strtotime( " +".rand( 4, 24 )." hours" ) ) | |
| 527 | + date( 'G:i', strtotime( " +" . rand( 4, 24 ) . " hours" ) ), | |
| 528 | + date( 'g:i', strtotime( " +" . rand( 4, 24 ) . " hours" ) ), | |
| 529 | + date( 'G:i A', strtotime( " +" . rand( 4, 24 ) . " hours" ) ) | |
| 530 | 530 | ); | 
| 531 | 531 | |
| 532 | 532 | return apply_filters( "tc_time_data", $times[ rand( 0, 6 ) ] ); | 
| @@ -718,7 +718,7 @@ discard block | ||
| 718 | 718 |  	public static function video( $type ) { | 
| 719 | 719 | |
| 720 | 720 | // Switch through our video types. Expecting to add more in the future | 
| 721 | -		switch( $type ) { | |
| 721 | +		switch ( $type ) { | |
| 722 | 722 | |
| 723 | 723 | // YouTube videos | 
| 724 | 724 | case 'youtube' : | 
| @@ -8,7 +8,7 @@ discard block | ||
| 8 | 8 | * @subpackage Evans | 
| 9 | 9 | * @author Old Town Media | 
| 10 | 10 | */ | 
| 11 | -class Ajax{ | |
| 11 | +class Ajax { | |
| 12 | 12 | |
| 13 | 13 | /** | 
| 14 | 14 | * reporting | 
| @@ -44,7 +44,7 @@ discard block | ||
| 44 | 44 | $this->reporting = new Reporting; | 
| 45 | 45 | $this->action = 'handle_test_data'; | 
| 46 | 46 | |
| 47 | -		add_action( "wp_ajax_{$this->action}" , array( $this, 'handle_ajax' ) ); | |
| 47 | +		add_action( "wp_ajax_{$this->action}", array( $this, 'handle_ajax' ) ); | |
| 48 | 48 | add_filter( 'option_active_plugins', array( $this, 'ajax_exclude_plugins' ) ); | 
| 49 | 49 | |
| 50 | 50 | } | 
| @@ -77,17 +77,17 @@ discard block | ||
| 77 | 77 | */ | 
| 78 | 78 |  	public function ajax_exclude_plugins( $plugins ) { | 
| 79 | 79 | |
| 80 | -		if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX || ! isset( $_POST['action'] ) || false === strpos( $_POST['action'], $this->action ) ) { | |
| 80 | +		if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX || ! isset( $_POST[ 'action' ] ) || false === strpos( $_POST[ 'action' ], $this->action ) ) { | |
| 81 | 81 | return $plugins; | 
| 82 | 82 | } | 
| 83 | 83 | |
| 84 | -		foreach( $plugins as $key => $plugin ) { | |
| 84 | +		foreach ( $plugins as $key => $plugin ) { | |
| 85 | 85 | |
| 86 | 86 |  			if ( false !== strpos( $plugin, $this->plugin->definitions->slug ) ) { | 
| 87 | 87 | continue; | 
| 88 | 88 | } | 
| 89 | 89 | |
| 90 | - unset( $plugins[$key] ); | |
| 90 | + unset( $plugins[ $key ] ); | |
| 91 | 91 | } | 
| 92 | 92 | |
| 93 | 93 | return $plugins; | 
| @@ -102,8 +102,8 @@ discard block | ||
| 102 | 102 | */ | 
| 103 | 103 |  	public function handle_ajax() { | 
| 104 | 104 | |
| 105 | - $action = $_REQUEST['todo']; | |
| 106 | - $nonce = $_REQUEST['nonce']; | |
| 105 | + $action = $_REQUEST[ 'todo' ]; | |
| 106 | + $nonce = $_REQUEST[ 'nonce' ]; | |
| 107 | 107 | |
| 108 | 108 | // Verify that we have a proper logged in user and it's the right person | 
| 109 | 109 |  		if ( empty( $nonce ) || ! wp_verify_nonce( $nonce, 'handle-test-data' ) ) { | 
| @@ -131,9 +131,9 @@ discard block | ||
| 131 | 131 | */ | 
| 132 | 132 |  	private function creation_routing( $data ) { | 
| 133 | 133 | |
| 134 | - $type = 'DummyPress\Types\\' . ucwords( $data['type'] ); | |
| 134 | + $type = 'DummyPress\Types\\' . ucwords( $data[ 'type' ] ); | |
| 135 | 135 | $object = new $type(); | 
| 136 | - $return = $object->create_objects( $data['slug'], $data['connection'], true, 1 ); | |
| 136 | + $return = $object->create_objects( $data[ 'slug' ], $data[ 'connection' ], true, 1 ); | |
| 137 | 137 | |
| 138 | 138 | $clean = $this->reporting->create_report( $return ); | 
| 139 | 139 | |
| @@ -150,7 +150,7 @@ discard block | ||
| 150 | 150 | |
| 151 | 151 | $delete_content = new Delete; | 
| 152 | 152 | |
| 153 | -		if ( $data['type'] == 'all' ) { | |
| 153 | +		if ( $data[ 'type' ] == 'all' ) { | |
| 154 | 154 | |
| 155 | 155 | $return = $delete_content->delete_all_test_data(); | 
| 156 | 156 | |
| @@ -17,7 +17,7 @@ discard block | ||
| 17 | 17 | * @subpackage Evans | 
| 18 | 18 | * @author Old Town Media | 
| 19 | 19 | */ | 
| 20 | -class ConnectionTest{ | |
| 20 | +class ConnectionTest { | |
| 21 | 21 | |
| 22 | 22 | /** | 
| 23 | 23 | * Run all of our connection tests. | 
| @@ -89,7 +89,7 @@ discard block | ||
| 89 | 89 | return false; | 
| 90 | 90 | } | 
| 91 | 91 | |
| 92 | - $last_uri_bit = explode( '=', $_SERVER['REQUEST_URI'] ); | |
| 92 | + $last_uri_bit = explode( '=', $_SERVER[ 'REQUEST_URI' ] ); | |
| 93 | 93 |  		if ( 'create-test-data' != end( $last_uri_bit ) ) { | 
| 94 | 94 | return false; | 
| 95 | 95 | } | 
| @@ -138,7 +138,7 @@ discard block | ||
| 138 | 138 | // Attempt to open a socket connection to Google | 
| 139 | 139 | $connected = @fsockopen( "www.google.com", 80 ); | 
| 140 | 140 | |
| 141 | -		if ( !$connected ) { | |
| 141 | +		if ( ! $connected ) { | |
| 142 | 142 | return false; | 
| 143 | 143 | } | 
| 144 | 144 | |
| @@ -165,7 +165,7 @@ discard block | ||
| 165 | 165 | $test_url = esc_url( $url ); | 
| 166 | 166 | $response = wp_remote_get( $test_url ); | 
| 167 | 167 | |
| 168 | -		if ( !is_array( $response ) ) { | |
| 168 | +		if ( ! is_array( $response ) ) { | |
| 169 | 169 | return false; | 
| 170 | 170 | } | 
| 171 | 171 | |
| @@ -130,8 +130,8 @@ | ||
| 130 | 130 |  		} else { | 
| 131 | 131 | // We didn't get a reponse so print the notice out | 
| 132 | 132 | echo '<div class="notice notice-error">'; | 
| 133 | - echo '<p>' . esc_html__( '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.', 'dummybot' ) . '</p>'; | |
| 134 | - echo '</div>'; | |
| 133 | + echo '<p>' . esc_html__( '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.', 'dummybot' ) . '</p>'; | |
| 134 | + echo '</div>'; | |
| 135 | 135 | } | 
| 136 | 136 | |
| 137 | 137 | } | 
| @@ -8,7 +8,7 @@ discard block | ||
| 8 | 8 | * @subpackage Evans | 
| 9 | 9 | * @author Old Town Media | 
| 10 | 10 | */ | 
| 11 | -class AdminPage{ | |
| 11 | +class AdminPage { | |
| 12 | 12 | |
| 13 | 13 | /** | 
| 14 | 14 | * plugin | 
| @@ -48,11 +48,11 @@ discard block | ||
| 48 | 48 |  	public function hooks() { | 
| 49 | 49 | |
| 50 | 50 | $connection = new ConnectionTest; | 
| 51 | - $this->definitions = $this->plugin->get_definitions(); | |
| 52 | - $this->connected = $connection->test(); | |
| 51 | + $this->definitions = $this->plugin->get_definitions(); | |
| 52 | + $this->connected = $connection->test(); | |
| 53 | 53 | |
| 54 | - add_action( 'admin_menu' , array( $this, 'add_menu_item' ) ); | |
| 55 | - add_filter( 'plugin_action_links_' . $this->definitions->basename , array( $this, 'add_settings_link' ) ); | |
| 54 | + add_action( 'admin_menu', array( $this, 'add_menu_item' ) ); | |
| 55 | + add_filter( 'plugin_action_links_' . $this->definitions->basename, array( $this, 'add_settings_link' ) ); | |
| 56 | 56 | add_action( 'admin_notices', array( $this, 'internet_connected_admin_notice' ) ); | 
| 57 | 57 | |
| 58 | 58 | } | 
| @@ -142,8 +142,8 @@ discard block | ||
| 142 | 142 | */ | 
| 143 | 143 |  	public function load_scripts() { | 
| 144 | 144 | |
| 145 | - wp_enqueue_script( 'test-content-js', plugins_url( 'assets/admin.js' , dirname( __FILE__ ) ) ); | |
| 146 | - wp_enqueue_style( 'test-content-css', plugins_url( 'assets/admin.css' , dirname( __FILE__ ) ) ); | |
| 145 | + wp_enqueue_script( 'test-content-js', plugins_url( 'assets/admin.js', dirname( __FILE__ ) ) ); | |
| 146 | + wp_enqueue_style( 'test-content-css', plugins_url( 'assets/admin.css', dirname( __FILE__ ) ) ); | |
| 147 | 147 | |
| 148 | 148 | $data = array( | 
| 149 | 149 | 'nonce' => wp_create_nonce( 'handle-test-data' ), | 
| @@ -165,7 +165,7 @@ discard block | ||
| 165 | 165 |  	public function admin_page() { | 
| 166 | 166 | echo '<div class="wrap" id="options_editor">' . "\n"; | 
| 167 | 167 | |
| 168 | - echo '<h2>' . esc_html__( 'Create Test Data' , 'dummybot' ) . '</h2>' . "\n"; | |
| 168 | + echo '<h2>' . esc_html__( 'Create Test Data', 'dummybot' ) . '</h2>' . "\n"; | |
| 169 | 169 | |
| 170 | 170 | echo "<div class='nav-tab-wrapper'>"; | 
| 171 | 171 | |