Completed
Push — master ( 9b51ca...819e30 )
by Mike
02:21
created
uninstall.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,30 +3,30 @@
 block discarded – undo
3 3
 use testContent as test;
4 4
 
5 5
 // If uninstall is not called from WordPress, exit
6
-if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
6
+if (!defined('WP_UNINSTALL_PLUGIN')) {
7 7
     exit();
8 8
 }
9 9
 
10 10
 // Check if the current user has priveledges to run this method
11
-if ( ! current_user_can( 'activate_plugins' ) ){
11
+if (!current_user_can('activate_plugins')) {
12 12
     return;
13 13
 }
14 14
 
15
-require dirname( __FILE__ ) . '/includes/class-delete.php';
15
+require dirname(__FILE__).'/includes/class-delete.php';
16 16
 $delete = new test\Delete;
17 17
 
18 18
 // Loop through all post types and remove any test data
19
-$post_types = get_post_types( array( 'public' => true ), 'objects' );
20
-foreach ( $post_types as $post_type ) :
19
+$post_types = get_post_types(array('public' => true), 'objects');
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
 
26 26
 // Loop through all taxonomies and remove any data
27 27
 $taxonomies = get_taxonomies();
28
-foreach ( $taxonomies as $tax ) :
28
+foreach ($taxonomies as $tax) :
29 29
 
30
-    $delete->delete_terms( $tax );
30
+    $delete->delete_terms($tax);
31 31
 
32 32
 endforeach;
Please login to merge, or discard this patch.
test-content.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -21,21 +21,21 @@  discard block
 block discarded – undo
21 21
  *
22 22
  * @param string $class Class name.
23 23
  */
24
-function test_content_autoloader( $class ) {
25
- 	if ( __NAMESPACE__ !== explode( '\\', $class )[0] ){
24
+function test_content_autoloader($class) {
25
+ 	if (__NAMESPACE__ !== explode('\\', $class)[0]) {
26 26
  		return;
27 27
  	}
28 28
 
29
-	$class = str_replace( __NAMESPACE__ . '\\', '', $class );
30
-	$class = strtolower( preg_replace( '/(?<!^)([A-Z])/', '-\\1', $class ) );
29
+	$class = str_replace(__NAMESPACE__.'\\', '', $class);
30
+	$class = strtolower(preg_replace('/(?<!^)([A-Z])/', '-\\1', $class));
31 31
 
32
- 	$file  = dirname( __FILE__ ) . '/includes/class-' . $class . '.php';
32
+ 	$file = dirname(__FILE__).'/includes/class-'.$class.'.php';
33 33
 
34
- 	if ( file_exists( $file ) ) {
35
- 		require_once( $file );
34
+ 	if (file_exists($file)) {
35
+ 		require_once($file);
36 36
  	}
37 37
  }
38
- spl_autoload_register( __NAMESPACE__ . '\test_content_autoloader' );
38
+ spl_autoload_register(__NAMESPACE__.'\test_content_autoloader');
39 39
 
40 40
 
41 41
  /**
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
  function plugin() {
47 47
  	static $instance;
48 48
 
49
- 	if ( null === $instance ) {
49
+ 	if (null === $instance) {
50 50
  		$instance = new Plugin();
51 51
  	}
52 52
 
@@ -56,16 +56,16 @@  discard block
 block discarded – undo
56 56
 // Set our definitions for later use
57 57
  plugin()->set_definitions(
58 58
 	(object) array(
59
-		'basename'	=> plugin_basename( __FILE__ ),
60
-		'directory'	=> plugin_dir_path( __FILE__ ),
59
+		'basename'	=> plugin_basename(__FILE__),
60
+		'directory'	=> plugin_dir_path(__FILE__),
61 61
 		'file'		=> __FILE__,
62 62
 		'slug' 		=> 'structure',
63
-		'url'		=> plugin_dir_url( __FILE__ )
63
+		'url'		=> plugin_dir_url(__FILE__)
64 64
 	)
65 65
 );
66 66
 
67 67
  // Register hook providers.
68
- plugin()->register_hooks( new AdminPage() );
68
+ plugin()->register_hooks(new AdminPage());
69 69
 
70 70
 // Load textdomain hook
71
-add_action( 'plugins_loaded', array( plugin(), 'load_textdomain' ) );
71
+add_action('plugins_loaded', array(plugin(), 'load_textdomain'));
Please login to merge, or discard this patch.