Completed
Branch master (b13b1d)
by Michael
19:31
created
factory/admin_page/_view/AdminPageFramework_PageLoadInfo_Page.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         if ( in_array( $oProp->sClassName, self::$aClassNames ) )
32 32
             return self::$_oInstance;
33 33
         
34
-        self::$aClassNames[] = $oProp->sClassName;
34
+        self::$aClassNames[ ] = $oProp->sClassName;
35 35
         self::$_oInstance = new AdminPageFramework_PageLoadInfo_Page( $oProp, $oMsg );
36 36
         
37 37
         return self::$_oInstance;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@
 block discarded – undo
27 27
      */
28 28
     public static function instantiate( $oProp, $oMsg ) {
29 29
         
30
-        if ( in_array( $oProp->sClassName, self::$aClassNames ) )
31
-            return self::$_oInstance;
30
+        if ( in_array( $oProp->sClassName, self::$aClassNames ) ) {
31
+                    return self::$_oInstance;
32
+        }
32 33
         
33 34
         self::$aClassNames[] = $oProp->sClassName;
34 35
         self::$_oInstance = new AdminPageFramework_PageLoadInfo_PostType( $oProp, $oMsg );
Please login to merge, or discard this patch.
factory/admin_page/_view/AdminPageFramework_View__PageMataBoxRenderer.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
20 20
            
21 21
     /**
22 22
      * Renders a registered meta box.
23
- 
24 23
      * @return      void
25 24
      * @param       string $sContext `side`, `normal`, or `advanced`.
26 25
      * @since       3.0.0
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     public function render( $sContext ) {
30 30
                
31 31
         // If nothing is registered do not render even the container.
32
-        if ( ! $this->doesMetaBoxExist() ) {
32
+        if ( !$this->doesMetaBoxExist() ) {
33 33
             return;
34 34
         }
35 35
         
Please login to merge, or discard this patch.
factory/admin_page/_view/AdminPageFramework_View__PageMetaboxEnabler.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
          */
51 51
         public function _replyToEnableMetaBox() {
52 52
             
53
-            if ( ! $this->oFactory->oProp->isPageAdded() ) {     
53
+            if ( !$this->oFactory->oProp->isPageAdded() ) {     
54 54
                 return;
55 55
             }
56
-            if ( ! $this->_isMetaBoxAdded() ) {
56
+            if ( !$this->_isMetaBoxAdded() ) {
57 57
                 return;
58 58
             }
59 59
             
60
-            $_sCurrentScreenID =  $this->getCurrentScreenID();
60
+            $_sCurrentScreenID = $this->getCurrentScreenID();
61 61
 
62 62
             // Trigger the add_meta_boxes hooks to allow meta boxes to be added.
63 63
             do_action( "add_meta_boxes_{$_sCurrentScreenID}", null );
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             // the network admin adds '-network' in the screen ID and the hooks with that id won't be triggered so use the 'page_hook' global variable.
88 88
             if ( isset( $GLOBALS[ 'page_hook' ] ) ) {
89 89
                 add_action( 
90
-                    "admin_footer-{$GLOBALS['page_hook']}", 
90
+                    "admin_footer-{$GLOBALS[ 'page_hook' ]}", 
91 91
                     array( $this, '_replyToAddMetaboxScript' ) 
92 92
                 );    
93 93
             }
@@ -111,11 +111,11 @@  discard block
 block discarded – undo
111 111
                 }
112 112
                 
113 113
                 $_sPageSlug = $this->getElement( $_GET, 'page', '' );
114
-                if ( ! $_sPageSlug ) {     
114
+                if ( !$_sPageSlug ) {     
115 115
                     return false;
116 116
                 }
117 117
                 
118
-                foreach( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) {
118
+                foreach ( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) {
119 119
                     if ( $this->_isPageOfMetaBox( $_sPageSlug, $_oMetaBox ) ) { 
120 120
                         return true; 
121 121
                     }
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
                  */
134 134
                 private function _isPageOfMetaBox( $sPageSlug, $oMetaBox ) {
135 135
                     
136
-                    if ( in_array( $sPageSlug , $oMetaBox->oProp->aPageSlugs ) ) {
136
+                    if ( in_array( $sPageSlug, $oMetaBox->oProp->aPageSlugs ) ) {
137 137
                         return true; // for numeric keys with a string value.
138 138
                     }
139
-                    if ( ! array_key_exists( $sPageSlug , $oMetaBox->oProp->aPageSlugs ) ) {
139
+                    if ( !array_key_exists( $sPageSlug, $oMetaBox->oProp->aPageSlugs ) ) {
140 140
                         return false; // for keys of page slugs, the key does not exist, it means not added.
141 141
                     }
142 142
                     
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
          */
51 51
         public function _replyToEnableMetaBox() {
52 52
             
53
-            if ( ! $this->oFactory->oProp->isPageAdded() ) {     
53
+            if ( ! $this->oFactory->oProp->isPageAdded() ) {
54 54
                 return;
55 55
             }
56 56
             if ( ! $this->_isMetaBoxAdded() ) {
@@ -111,12 +111,12 @@  discard block
 block discarded – undo
111 111
                 }
112 112
                 
113 113
                 $_sPageSlug = $this->getElement( $_GET, 'page', '' );
114
-                if ( ! $_sPageSlug ) {     
114
+                if ( ! $_sPageSlug ) {
115 115
                     return false;
116 116
                 }
117 117
                 
118 118
                 foreach( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) {
119
-                    if ( $this->_isPageOfMetaBox( $_sPageSlug, $_oMetaBox ) ) { 
119
+                    if ( $this->_isPageOfMetaBox( $_sPageSlug, $_oMetaBox ) ) {
120 120
                         return true; 
121 121
                     }
122 122
                 }
Please login to merge, or discard this patch.
admin_page/_view/AdminPageFramework_View__PageRenderer__InPageTabs.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             $_sTag              = $this->_getInPageTabTag( $sTag, $_aPage );
74 74
              
75 75
             // If the in-page tabs' visibility is set to false, returns the title.
76
-            if ( ! $_aPage[ 'show_in_page_tabs' ] ) {
76
+            if ( !$_aPage[ 'show_in_page_tabs' ] ) {
77 77
                 return isset( $aInPageTabs[ $_sCurrentTabSlug ][ 'title' ] ) 
78 78
                     ? "<{$_sTag}>" 
79 79
                             . $aInPageTabs[ $_sCurrentTabSlug ][ 'title' ]
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
             private function _getInPageTabNavigationBar( array $aTabs, $sActiveTab, $sCurrentPageSlug, $sTag ) {
101 101
 
102 102
                 $_oTabBar = new AdminPageFramework_TabNavigationBar(
103
-                    $aTabs,      // tabs
103
+                    $aTabs, // tabs
104 104
                     $sActiveTab, // active tab slug
105
-                    $sTag,       // container tag
105
+                    $sTag, // container tag
106 106
                     array(       // container attributes
107 107
                         'class' => 'in-page-tab',
108 108
                     ),
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                  * @since           3.5.10
131 131
                  * @since           3.6.3       Moved from `AdminPageFramework_Page_View`.
132 132
                  */
133
-                public function _replyToFormatNavigationTabItem_InPageTab( array $aTab, array $aStructure, array $aTabs, array $aArguments=array() ) {
133
+                public function _replyToFormatNavigationTabItem_InPageTab( array $aTab, array $aStructure, array $aTabs, array $aArguments = array() ) {
134 134
                     $_oFormatter = new AdminPageFramework_Format_NavigationTab_InPageTab(
135 135
                         $aTab,
136 136
                         $aStructure,
Please login to merge, or discard this patch.
development/factory/admin_page/_view/AdminPageFramework_View__Resource.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
                  */
68 68
                 public function _appendInlineAssets( $sInline, &$aContainer ) {
69 69
                     $_aInlines = array_unique( $aContainer );
70
-                    $sInline   = PHP_EOL . $sInline;
71
-                    foreach( $_aInlines as $_iIndex => $_sInline ) {
72
-                        $sInline .= $_sInline . PHP_EOL;
70
+                    $sInline   = PHP_EOL.$sInline;
71
+                    foreach ( $_aInlines as $_iIndex => $_sInline ) {
72
+                        $sInline .= $_sInline.PHP_EOL;
73 73
                         unset( $_aInlines[ $_iIndex ] );
74 74
                     }
75 75
                     $aContainer = $_aInlines; // update the container array.
@@ -83,23 +83,23 @@  discard block
 block discarded – undo
83 83
         private function _parseAssets( $oFactory ) {
84 84
             
85 85
             // page
86
-            $_aPageStyles      = $this->getElementAsArray(
86
+            $_aPageStyles = $this->getElementAsArray(
87 87
                 $oFactory->oProp->aPages,
88 88
                 array( $this->sCurrentPageSlug, 'style' )
89 89
             );               
90 90
             $this->_enqueuePageAssets( $_aPageStyles, 'style' );
91 91
             
92
-            $_aPageScripts     = $this->getElementAsArray(
92
+            $_aPageScripts = $this->getElementAsArray(
93 93
                 $oFactory->oProp->aPages,
94 94
                 array( $this->sCurrentPageSlug, 'script' )
95 95
             );
96 96
             $this->_enqueuePageAssets( $_aPageScripts, 'script' );
97 97
             
98 98
             // In-page tabs 
99
-            if ( ! $this->sCurrentTabSlug ) {
99
+            if ( !$this->sCurrentTabSlug ) {
100 100
                 return;
101 101
             }        
102
-            $_aInPageTabStyles  = $this->getElementAsArray(
102
+            $_aInPageTabStyles = $this->getElementAsArray(
103 103
                 $oFactory->oProp->aInPageTabs,
104 104
                 array( $this->sCurrentPageSlug, $this->sCurrentTabSlug, 'style' )
105 105
             );              
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
              * @since       3.6.3
117 117
              * @return      void
118 118
              */    
119
-            private function _enqueuePageAssets( array $aPageAssets, $sType='style' ) {
120
-                $_sMathodName = "_enqueueAsset_" . $sType;
121
-                foreach( $aPageAssets as $_asPageAsset ) {
122
-                    $this->{$_sMathodName}( $_asPageAsset);
119
+            private function _enqueuePageAssets( array $aPageAssets, $sType = 'style' ) {
120
+                $_sMathodName = "_enqueueAsset_".$sType;
121
+                foreach ( $aPageAssets as $_asPageAsset ) {
122
+                    $this->{$_sMathodName}( $_asPageAsset );
123 123
                 }
124 124
             }
125 125
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                     }
145 145
                     
146 146
                     // Insert the CSS rule in the head tag.
147
-                    $this->aCSSRules[] = $_sSRC;
147
+                    $this->aCSSRules[ ] = $_sSRC;
148 148
                     
149 149
                 }                    
150 150
      
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                     }                
170 170
                     
171 171
                     // Insert the scripts in the head tag.                
172
-                    $this->aScripts[] = $_sSRC;
172
+                    $this->aScripts[ ] = $_sSRC;
173 173
                     
174 174
                 }        
175 175
                 
Please login to merge, or discard this patch.
development/factory/meta_box/AdminPageFramework_MetaBox.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@
 block discarded – undo
54 54
      * @param       string            $sTextDomain              (optional) The text domain applied to the displayed text messages. Default: `admin-page-framework`.
55 55
      * @return      void
56 56
      */ 
57
-    function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) {
57
+    function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array( 'post' ), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework' ) {
58 58
         
59
-        if ( ! $this->_isInstantiatable() ) { return; }
59
+        if ( !$this->_isInstantiatable() ) { return; }
60 60
         
61 61
         /* The property object needs to be done first */
62 62
         $this->oProp                = new AdminPageFramework_Property_MetaBox( $this, get_class( $this ), $sCapability, $sTextDomain, self::$_sStructureType );
Please login to merge, or discard this patch.
development/factory/meta_box/AdminPageFramework_MetaBox_Controller.php 3 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -18,32 +18,32 @@
 block discarded – undo
18 18
 abstract class AdminPageFramework_MetaBox_Controller extends AdminPageFramework_MetaBox_View {
19 19
        
20 20
     /**
21
-    * The method for all necessary set-ups.
22
-    * 
23
-    * <h4>Example</h4>
24
-    * <code> public function setUp() {     
25
-    *     $this->addSettingFields(
26
-    *         array(
27
-    *             'field_id'    => 'sample_metabox_text_field',
28
-    *             'title'       => 'Text Input',
29
-    *             'description' => 'The description for the field.',
30
-    *             'type'        => 'text',
31
-    *         ),
32
-    *         array(
33
-    *             'field_id'    => 'sample_metabox_textarea_field',
34
-    *             'title'       => 'Textarea',
35
-    *             'description' => 'The description for the field.',
36
-    *             'type'        => 'textarea',
37
-    *             'default'     => 'This is a default text value.',
38
-    *         )
39
-    *     );     
40
-    * }</code>
41
-    * 
42
-    * @abstract
43
-    * @since        2.0.0
44
-    * @remark       The user should override this method.
45
-    * @return       void
46
-    */  
21
+     * The method for all necessary set-ups.
22
+     * 
23
+     * <h4>Example</h4>
24
+     * <code> public function setUp() {     
25
+     *     $this->addSettingFields(
26
+     *         array(
27
+     *             'field_id'    => 'sample_metabox_text_field',
28
+     *             'title'       => 'Text Input',
29
+     *             'description' => 'The description for the field.',
30
+     *             'type'        => 'text',
31
+     *         ),
32
+     *         array(
33
+     *             'field_id'    => 'sample_metabox_textarea_field',
34
+     *             'title'       => 'Textarea',
35
+     *             'description' => 'The description for the field.',
36
+     *             'type'        => 'textarea',
37
+     *             'default'     => 'This is a default text value.',
38
+     *         )
39
+     *     );     
40
+     * }</code>
41
+     * 
42
+     * @abstract
43
+     * @since        2.0.0
44
+     * @remark       The user should override this method.
45
+     * @return       void
46
+     */  
47 47
     public function setUp() {}    
48 48
 
49 49
     /**
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      * 
67 67
      * @since 3.5.0
68 68
      */
69
-    public function enqueueStyles( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) {
69
+    public function enqueueStyles( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) {
70 70
         return $this->oResource->_enqueueStyles( $aSRCs, $aPostTypes, $aCustomArgs );
71 71
     }
72 72
     /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      * @param       array       (optional) The argument array for more advanced parameters.
90 90
      * @return      string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
91 91
      */    
92
-    public function enqueueStyle( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) {
92
+    public function enqueueStyle( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) {
93 93
         return $this->oResource->_enqueueStyle( $sSRC, $aPostTypes, $aCustomArgs );     
94 94
     }
95 95
     /**
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * 
98 98
      * @since 3.5.0
99 99
      */
100
-    public function enqueueScripts( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) {
100
+    public function enqueueScripts( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) {
101 101
         return $this->oResource->_enqueueScripts( $aSRCs, $aPostTypes, $aCustomArgs );
102 102
     }    
103 103
     /**
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      * @param       array       (optional) The argument array for more advanced parameters.
133 133
      * @return      string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
134 134
      */
135
-    public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) {    
135
+    public function enqueueScript( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) {    
136 136
         return $this->oResource->_enqueueScript( $sSRC, $aPostTypes, $aCustomArgs );
137 137
     }    
138 138
         
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
      * @param       array       (optional) The argument array for more advanced parameters.
133 133
      * @return      string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
134 134
      */
135
-    public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) {    
135
+    public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) {
136 136
         return $this->oResource->_enqueueScript( $sSRC, $aPostTypes, $aCustomArgs );
137 137
     }    
138 138
         
Please login to merge, or discard this patch.
development/factory/meta_box/AdminPageFramework_MetaBox_Model.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,11 +136,11 @@
 block discarded – undo
136 136
      * 
137 137
      * Triggered when a post has not been created so no post id is assigned.
138 138
      * 
139
-	 * @internal
139
+     * @internal
140 140
      * @since       3.3.0
141 141
      * @callback    filter      wp_insert_attachment_data
142 142
      * @callback    filter      wp_insert_post_data
143
-	 * @param       array       $aPostData      An array of slashed post data.
143
+     * @param       array       $aPostData      An array of slashed post data.
144 144
      * @param       array       $aUnmodified    An array of sanitized, but otherwise unmodified post data.
145 145
      */
146 146
     public function _replyToFilterSavingData( $aPostData, $aUnmodified ) {
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
75 75
      * @callback    action      add_meta_boxes
76 76
      */ 
77 77
     public function _replyToAddMetaBox() {
78
-        foreach( $this->oProp->aPostTypes as $sPostType ) {
78
+        foreach ( $this->oProp->aPostTypes as $sPostType ) {
79 79
             add_meta_box( 
80
-                $this->oProp->sMetaBoxID,                       // id
81
-                $this->oProp->sTitle,                           // title
80
+                $this->oProp->sMetaBoxID, // id
81
+                $this->oProp->sTitle, // title
82 82
                 array( $this, '_replyToPrintMetaBoxContents' ), // callback
83
-                $sPostType,                                     // post type
84
-                $this->oProp->sContext,                         // context
85
-                $this->oProp->sPriority,                        // priority
83
+                $sPostType, // post type
84
+                $this->oProp->sContext, // context
85
+                $this->oProp->sPriority, // priority
86 86
                 null                                            // argument - deprecated $this->oForm->aFields
87 87
             );
88 88
         }      
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
          * @internal
115 115
          * @return      integer     The found post ID. `0` if not found.
116 116
          */
117
-        private function _getPostID()  {
117
+        private function _getPostID() {
118 118
             
119 119
             // for an editing post page.
120 120
             if ( isset( $GLOBALS[ 'post' ]->ID ) ) {
@@ -146,14 +146,14 @@  discard block
 block discarded – undo
146 146
     public function _replyToFilterSavingData( $aPostData, $aUnmodified ) {
147 147
 
148 148
         // Perform initial checks.
149
-        if ( ! $this->_shouldProceedValidation( $aUnmodified ) ) { 
149
+        if ( !$this->_shouldProceedValidation( $aUnmodified ) ) { 
150 150
             return $aPostData; 
151 151
         }
152 152
                 
153 153
         // Retrieve the submitted data. 
154
-        $_aInputs       = $this->oForm->getSubmittedData(
155
-            $_POST,     // subject data to be parsed
156
-            true,       // extract data with the fieldset structure
154
+        $_aInputs = $this->oForm->getSubmittedData(
155
+            $_POST, // subject data to be parsed
156
+            true, // extract data with the fieldset structure
157 157
             false       // strip slashes
158 158
         );
159 159
         $_aInputsRaw    = $_aInputs; // store one for the last input array.
@@ -188,8 +188,8 @@  discard block
 block discarded – undo
188 188
         }
189 189
                     
190 190
         $this->oForm->updateMetaDataByType( 
191
-            $_iPostID,   // object id
192
-            $_aInputs,   // user submit form data
191
+            $_iPostID, // object id
192
+            $_aInputs, // user submit form data
193 193
             $this->oForm->dropRepeatableElements( $_aSavedMeta ), // Drop repeatable section elements from the saved meta array.
194 194
             $this->oForm->sStructureType   // fields type
195 195
         );        
@@ -246,14 +246,14 @@  discard block
 block discarded – undo
246 246
             }
247 247
      
248 248
             // If our nonce isn't there, or we can't verify it, bail
249
-            if ( ! isset( $_POST[ $this->oProp->sMetaBoxID ] ) ) {
249
+            if ( !isset( $_POST[ $this->oProp->sMetaBoxID ] ) ) {
250 250
                 return false;
251 251
             }
252
-            if ( ! wp_verify_nonce( $_POST[ $this->oProp->sMetaBoxID ], $this->oProp->sMetaBoxID ) ) {
252
+            if ( !wp_verify_nonce( $_POST[ $this->oProp->sMetaBoxID ], $this->oProp->sMetaBoxID ) ) {
253 253
                 return false;
254 254
             }
255 255
             
256
-            if ( ! in_array( $aUnmodified[ 'post_type' ], $this->oProp->aPostTypes ) ) {
256
+            if ( !in_array( $aUnmodified[ 'post_type' ], $this->oProp->aPostTypes ) ) {
257 257
                 return false;
258 258
             }              
259 259
             
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
          * @internal
115 115
          * @return      integer     The found post ID. `0` if not found.
116 116
          */
117
-        private function _getPostID()  {
117
+        private function _getPostID() {
118 118
             
119 119
             // for an editing post page.
120 120
             if ( isset( $GLOBALS[ 'post' ]->ID ) ) {
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     public function _replyToFilterSavingData( $aPostData, $aUnmodified ) {
147 147
 
148 148
         // Perform initial checks.
149
-        if ( ! $this->_shouldProceedValidation( $aUnmodified ) ) { 
149
+        if ( ! $this->_shouldProceedValidation( $aUnmodified ) ) {
150 150
             return $aPostData; 
151 151
         }
152 152
                 
@@ -236,12 +236,12 @@  discard block
 block discarded – undo
236 236
          */
237 237
         private function _shouldProceedValidation( array $aUnmodified ) {
238 238
             
239
-            if ( 'auto-draft' === $aUnmodified[ 'post_status' ] ) { 
239
+            if ( 'auto-draft' === $aUnmodified[ 'post_status' ] ) {
240 240
                 return false; 
241 241
             }            
242 242
             
243 243
             // Bail if we're doing an auto save
244
-            if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { 
244
+            if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
245 245
                 return false;
246 246
             }
247 247
      
Please login to merge, or discard this patch.
development/factory/meta_box/AdminPageFramework_MetaBox_Router.php 2 patches
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */ 
37 37
     public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) {
38 38
         
39
-        if ( empty( $asPostTypeOrScreenID ) ) { 
39
+        if ( empty( $asPostTypeOrScreenID ) ) {
40 40
             return; 
41 41
         }
42 42
                 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             return false;
81 81
         }
82 82
         
83
-        if ( ! in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {     
83
+        if ( ! in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {
84 84
             return false;    
85 85
         }    
86 86
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function _replyToDetermineToLoad( $oScreen ) {
114 114
  
115
-        if ( ! $this->_isInThePage() ) { 
115
+        if ( ! $this->_isInThePage() ) {
116 116
             return; 
117 117
         }
118 118
         
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @param       string          $sTextDomain            (optional) The text domain applied to the displayed text messages. Default: `admin-page-framework`.
35 35
      * @return      void
36 36
      */ 
37
-    public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) {
37
+    public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array( 'post' ), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework' ) {
38 38
         
39 39
         if ( empty( $asPostTypeOrScreenID ) ) { 
40 40
             return; 
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
         
55 55
         $this->oProp->sMetaBoxID    = $sMetaBoxID ? $this->oUtil->sanitizeSlug( $sMetaBoxID ) : strtolower( $_sClassName );
56 56
         $this->oProp->sTitle        = $sTitle;
57
-        $this->oProp->sContext      = $sContext;    // 'normal', 'advanced', or 'side' 
58
-        $this->oProp->sPriority     = $sPriority;   // 'high', 'core', 'default' or 'low'    
57
+        $this->oProp->sContext      = $sContext; // 'normal', 'advanced', or 'side' 
58
+        $this->oProp->sPriority     = $sPriority; // 'high', 'core', 'default' or 'low'    
59 59
 
60 60
         if ( $this->oProp->bIsAdmin ) {
61 61
             $this->oUtil->registerAction(
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function _isInThePage() {
78 78
 
79
-        if ( ! in_array( $this->oProp->sPageNow, array( 'post.php', 'post-new.php' ) ) ) {
79
+        if ( !in_array( $this->oProp->sPageNow, array( 'post.php', 'post-new.php' ) ) ) {
80 80
             return false;
81 81
         }
82 82
         
83
-        if ( ! in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {     
83
+        if ( !in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {     
84 84
             return false;    
85 85
         }    
86 86
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     protected  function _isInstantiatable() {
97 97
         
98 98
         // Disable in admin-ajax.php
99
-        if ( isset( $GLOBALS['pagenow'] ) && 'admin-ajax.php' === $GLOBALS['pagenow'] ) {
99
+        if ( isset( $GLOBALS[ 'pagenow' ] ) && 'admin-ajax.php' === $GLOBALS[ 'pagenow' ] ) {
100 100
             return false;
101 101
         }
102 102
         return true;
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
          * When the current_screen action is already triggered, the parameter will not be passed. 
117 117
          * So retrieve the screen object anyway.
118 118
          */
119
-        $_oScreen  = get_current_screen();
119
+        $_oScreen = get_current_screen();
120 120
         
121
-        if ( ! $this->_isInThePage() ) { 
121
+        if ( !$this->_isInThePage() ) { 
122 122
             return; 
123 123
         }
124 124
         
Please login to merge, or discard this patch.