Completed
Branch master (69418b)
by Daryl
01:50
created
includes/class-sidebar-details.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
 
67 67
 	}
68 68
 
69
-    /**
70
-     * @param int $post_id
71
-     */
69
+	/**
70
+	 * @param int $post_id
71
+	 */
72 72
 	public function save_post( $post_id ) {
73 73
 
74 74
 		$sidebar_id     = filter_input( INPUT_POST, 'custom-sidebar-select', FILTER_VALIDATE_INT );
75
-        $custom_sidebar = filter_input( INPUT_POST, 'custom-sidebar', FILTER_VALIDATE_BOOLEAN );
75
+		$custom_sidebar = filter_input( INPUT_POST, 'custom-sidebar', FILTER_VALIDATE_BOOLEAN );
76 76
 
77 77
 		if ( isset( $custom_sidebar ) ) {
78 78
 			$sidebar_id = Custom_Sidebars::get_sidebar_id( $post_id );
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
 
84 84
 	}
85 85
 
86
-    /**
87
-     * @param  int|null $post_id
88
-     * @return bool
89
-     */
86
+	/**
87
+	 * @param  int|null $post_id
88
+	 * @return bool
89
+	 */
90 90
 	public static function has_custom_sidebar( $post_id = null ) {
91 91
 
92 92
 		$value = false;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	public function render() {
53 53
 
54 54
 		$metabox = $this;
55
-		include dirname( __DIR__ ) . '/templates/custom-sidebar-details.php';
55
+		include dirname( __DIR__ ).'/templates/custom-sidebar-details.php';
56 56
 
57 57
 	}
58 58
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		global $wp_registered_sidebars;
62 62
 		
63 63
 		foreach ( $wp_registered_sidebars as $key => $sidebar ) {
64
-			printf( '<option value="%1$s"%3$s>%2$s</option>', $key, $sidebar['name'], selected( Custom_Sidebars::get_sidebar(), $key ) );
64
+			printf( '<option value="%1$s"%3$s>%2$s</option>', $key, $sidebar[ 'name' ], selected( Custom_Sidebars::get_sidebar(), $key ) );
65 65
 		}
66 66
 
67 67
 	}
@@ -71,14 +71,14 @@  discard block
 block discarded – undo
71 71
      */
72 72
 	public function save_post( $post_id ) {
73 73
 
74
-		$sidebar_id     = filter_input( INPUT_POST, 'custom-sidebar-select', FILTER_VALIDATE_INT );
74
+		$sidebar_id = filter_input( INPUT_POST, 'custom-sidebar-select', FILTER_VALIDATE_INT );
75 75
         $custom_sidebar = filter_input( INPUT_POST, 'custom-sidebar', FILTER_VALIDATE_BOOLEAN );
76 76
 
77 77
 		if ( isset( $custom_sidebar ) ) {
78 78
 			$sidebar_id = Custom_Sidebars::get_sidebar_id( $post_id );
79 79
 		}
80 80
 
81
-		update_post_meta( $post_id, '_custom_sidebar',    $custom_sidebar );
81
+		update_post_meta( $post_id, '_custom_sidebar', $custom_sidebar );
82 82
 		update_post_meta( $post_id, '_custom_sidebar_id', sanitize_text_field( $sidebar_id ) );
83 83
 
84 84
 	}
Please login to merge, or discard this patch.