Completed
Branch master (6d8b39)
by
unknown
08:42
created
_controller/AdminPageFramework_Link_network_acmin_page.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,21 +23,21 @@
 block discarded – undo
23 23
     /**
24 24
      * Sets up hooks and properties.
25 25
      */
26
-    public function __construct( $oProp, $oMsg=null ) {
26
+    public function __construct( $oProp, $oMsg = null ) {
27 27
     
28 28
         parent::__construct( $oProp, $oMsg );
29 29
         
30
-        if ( in_array( $this->oProp->sPageNow, array( 'plugins.php' ) ) && 'plugin' === $this->oProp->aScriptInfo['sType'] ) {
30
+        if ( in_array( $this->oProp->sPageNow, array( 'plugins.php' ) ) && 'plugin' === $this->oProp->aScriptInfo[ 'sType' ] ) {
31 31
             
32 32
             // This filter for non-network-admin action links is added in the parent constructor.
33 33
             remove_filter( 
34
-                'plugin_action_links_' . plugin_basename( $this->oProp->aScriptInfo['sPath'] ),
34
+                'plugin_action_links_'.plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ),
35 35
                 array( $this, '_replyToAddSettingsLinkInPluginListingPage' ),
36 36
                 20
37 37
             );
38 38
             // Add the action link filter for the multi-site network admin.
39 39
             add_filter( 
40
-                'network_admin_plugin_action_links_' . plugin_basename( $this->oProp->aScriptInfo['sPath'] ), 
40
+                'network_admin_plugin_action_links_'.plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ), 
41 41
                 array( $this, '_replyToAddSettingsLinkInPluginListingPage' ) 
42 42
             );
43 43
         }
Please login to merge, or discard this patch.
_model/AdminPageFramework_Property_network_admin_page.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                 $GLOBALS, 
47 47
                 array( 'aAdminPageFramework', 'aPageClasses', $this->sClassName ) 
48 48
             ),
49
-            'options_' . $this->sClassName, // options_{instantiated class name}
49
+            'options_'.$this->sClassName, // options_{instantiated class name}
50 50
             $this->sOptionKey 
51 51
                 ? get_site_option( $this->sOptionKey, array() ) 
52 52
                 : array()
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      * @since       3.1.1       Made it return a boolean value.
65 65
      * @return      boolean     True if saved; otherwise, false.
66 66
      */
67
-    public function updateOption( $aOptions=null ) {
67
+    public function updateOption( $aOptions = null ) {
68 68
         
69 69
         if ( $this->_bDisableSavingOptions ) {
70 70
             return;
Please login to merge, or discard this patch.
_view/AdminPageFramework_PageLoadInfo_network_admin_page.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,14 +40,14 @@
 block discarded – undo
40 40
      */
41 41
     public static function instantiate( $oProp, $oMsg ) {
42 42
 
43
-        if ( ! is_network_admin() ) { 
43
+        if ( !is_network_admin() ) { 
44 44
             return;
45 45
         }     
46 46
         
47 47
         if ( in_array( $oProp->sClassName, self::$aClassNames ) )
48 48
             return self::$_oInstance;
49 49
         
50
-        self::$aClassNames[] = $oProp->sClassName;
50
+        self::$aClassNames[ ] = $oProp->sClassName;
51 51
         self::$_oInstance = new AdminPageFramework_PageLoadInfo_NetworkAdminPage( $oProp, $oMsg );
52 52
         
53 53
         return self::$_oInstance;
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,12 +40,13 @@
 block discarded – undo
40 40
      */
41 41
     public static function instantiate( $oProp, $oMsg ) {
42 42
 
43
-        if ( ! is_network_admin() ) { 
43
+        if ( ! is_network_admin() ) {
44 44
             return;
45 45
         }     
46 46
         
47
-        if ( in_array( $oProp->sClassName, self::$aClassNames ) )
48
-            return self::$_oInstance;
47
+        if ( in_array( $oProp->sClassName, self::$aClassNames ) ) {
48
+                    return self::$_oInstance;
49
+        }
49 50
         
50 51
         self::$aClassNames[] = $oProp->sClassName;
51 52
         self::$_oInstance = new AdminPageFramework_PageLoadInfo_NetworkAdminPage( $oProp, $oMsg );
Please login to merge, or discard this patch.
factory/user_meta/_controller/AdminPageFramework_Resource_user_meta.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,5 +20,5 @@
 block discarded – undo
20 20
  * @extends     AdminPageFramework_Resource_post_meta_box
21 21
  * @internal
22 22
  */
23
-class AdminPageFramework_Resource_user_meta extends AdminPageFramework_Resource_post_meta_box {    
23
+class AdminPageFramework_Resource_user_meta extends AdminPageFramework_Resource_post_meta_box {
24 24
 }
Please login to merge, or discard this patch.
development/factory/user_meta/AdminPageFramework_UserMeta_Router.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         
28 28
         parent::__construct( $oProp );
29 29
         
30
-        if ( ! $this->oProp->bIsAdmin ) {
30
+        if ( !$this->oProp->bIsAdmin ) {
31 31
             return;
32 32
         }
33 33
         
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         );
38 38
         
39 39
         // 3.7.10+
40
-        add_action( 'set_up_' . $this->oProp->sClassName, array( $this, '_replyToSetUpHooks' ) );
40
+        add_action( 'set_up_'.$this->oProp->sClassName, array( $this, '_replyToSetUpHooks' ) );
41 41
                         
42 42
     }
43 43
     
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function _isInThePage() {
52 52
                
53
-        if ( ! $this->oProp->bIsAdmin ) {
53
+        if ( !$this->oProp->bIsAdmin ) {
54 54
             return false;
55 55
         }
56 56
 
@@ -71,14 +71,14 @@  discard block
 block discarded – undo
71 71
     public function _replyToSetUpHooks( $oFactory ) {
72 72
         
73 73
         // Hooks to display fields.
74
-        add_action( 'show_user_profile', array( $this, '_replyToPrintFields' ) );   // profile.php
75
-        add_action( 'edit_user_profile', array( $this, '_replyToPrintFields' ) );   // profile.php
76
-        add_action( 'user_new_form', array( $this, '_replyToPrintFields' ) );   // user-new.php
74
+        add_action( 'show_user_profile', array( $this, '_replyToPrintFields' ) ); // profile.php
75
+        add_action( 'edit_user_profile', array( $this, '_replyToPrintFields' ) ); // profile.php
76
+        add_action( 'user_new_form', array( $this, '_replyToPrintFields' ) ); // user-new.php
77 77
         
78 78
         // Hooks to save field values.
79 79
         add_action( 'personal_options_update', array( $this, '_replyToSaveFieldValues' ) ); // profile.php
80
-        add_action( 'edit_user_profile_update', array( $this, '_replyToSaveFieldValues' ) );    // profile.php
81
-        add_action('user_register', array( $this, '_replyToSaveFieldValues' ) );    // user-new.php
80
+        add_action( 'edit_user_profile_update', array( $this, '_replyToSaveFieldValues' ) ); // profile.php
81
+        add_action( 'user_register', array( $this, '_replyToSaveFieldValues' ) ); // user-new.php
82 82
                        
83 83
     }        
84 84
     
Please login to merge, or discard this patch.
development/factory/meta_box/AdminPageFramework_MetaBox.php 2 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@
 block discarded – undo
56 56
      */ 
57 57
     public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) {
58 58
         
59
-        if ( ! $this->_isInstantiatable() ) { 
59
+        if ( ! $this->_isInstantiatable() ) {
60 60
             return; 
61 61
         }
62
-        if ( empty( $asPostTypeOrScreenID ) ) { 
62
+        if ( empty( $asPostTypeOrScreenID ) ) {
63 63
             return; 
64 64
         }        
65 65
         
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@  discard block
 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
-    public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) {
57
+    public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array( 'post' ), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework' ) {
58 58
         
59
-        if ( ! $this->_isInstantiatable() ) { 
59
+        if ( !$this->_isInstantiatable() ) { 
60 60
             return; 
61 61
         }
62 62
         if ( empty( $asPostTypeOrScreenID ) ) { 
@@ -66,15 +66,15 @@  discard block
 block discarded – undo
66 66
         // A property object needs to be done first.
67 67
         $_sProprtyClassName = isset( $this->aSubClassNames[ 'oProp' ] )
68 68
             ? $this->aSubClassNames[ 'oProp' ]
69
-            : 'AdminPageFramework_Property_' . $this->_sStructureType;        
70
-        $this->oProp                = new $_sProprtyClassName( 
69
+            : 'AdminPageFramework_Property_'.$this->_sStructureType;        
70
+        $this->oProp = new $_sProprtyClassName( 
71 71
             $this, 
72 72
             get_class( $this ), 
73 73
             $sCapability, 
74 74
             $sTextDomain, 
75 75
             $this->_sStructureType 
76 76
         );
77
-        $this->oProp->aPostTypes    = is_string( $asPostTypeOrScreenID ) 
77
+        $this->oProp->aPostTypes = is_string( $asPostTypeOrScreenID ) 
78 78
             ? array( $asPostTypeOrScreenID ) 
79 79
             : $asPostTypeOrScreenID;
80 80
         
Please login to merge, or discard this patch.
development/factory/meta_box/AdminPageFramework_MetaBox_Router.php 2 patches
Spacing   +6 added lines, -6 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
         parent::__construct( $this->oProp );
40 40
         
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
             ? $this->oUtil->sanitizeSlug( $sMetaBoxID ) 
43 43
             : strtolower( $this->oProp->sClassName );
44 44
         $this->oProp->sTitle        = $sTitle;
45
-        $this->oProp->sContext      = $sContext;    // 'normal', 'advanced', or 'side' 
46
-        $this->oProp->sPriority     = $sPriority;   // 'high', 'core', 'default' or 'low'    
45
+        $this->oProp->sContext      = $sContext; // 'normal', 'advanced', or 'side' 
46
+        $this->oProp->sPriority     = $sPriority; // 'high', 'core', 'default' or 'low'    
47 47
 
48
-        if ( ! $this->oProp->bIsAdmin ) {
48
+        if ( !$this->oProp->bIsAdmin ) {
49 49
             return;
50 50
         }
51 51
         
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function _isInThePage() {
68 68
 
69
-        if ( ! in_array( $this->oProp->sPageNow, array( 'post.php', 'post-new.php' ) ) ) {
69
+        if ( !in_array( $this->oProp->sPageNow, array( 'post.php', 'post-new.php' ) ) ) {
70 70
             return false;
71 71
         }
72 72
         
73
-        if ( ! in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {     
73
+        if ( !in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {     
74 74
             return false;    
75 75
         }    
76 76
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
             return false;
71 71
         }
72 72
         
73
-        if ( ! in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {     
73
+        if ( ! in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {
74 74
             return false;    
75 75
         }    
76 76
 
Please login to merge, or discard this patch.
factory/meta_box/_controller/AdminPageFramework_Resource_post_meta_box.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
      * @since 2.1.5
31 31
      * @internal
32 32
      */
33
-    public function _enqueueStyles( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) {
33
+    public function _enqueueStyles( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) {
34 34
         
35 35
         $_aHandleIDs = array();
36
-        foreach( ( array ) $aSRCs as $_sSRC ) {
37
-            $_aHandleIDs[] = $this->_enqueueStyle( $_sSRC, $aPostTypes, $aCustomArgs );
36
+        foreach ( ( array ) $aSRCs as $_sSRC ) {
37
+            $_aHandleIDs[ ] = $this->_enqueueStyle( $_sSRC, $aPostTypes, $aCustomArgs );
38 38
         }
39 39
         return $_aHandleIDs;
40 40
         
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
59 59
      * @internal
60 60
      */    
61
-    public function _enqueueStyle( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) {
61
+    public function _enqueueStyle( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) {
62 62
         
63 63
         $sSRC = trim( $sSRC );
64 64
         if ( empty( $sSRC ) ) { return ''; }
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
                 'sSRC'          => $sSRC,
75 75
                 'aPostTypes'    => empty( $aPostTypes ) ? $this->oProp->aPostTypes : $aPostTypes,
76 76
                 'sType'         => 'style',
77
-                'handle_id'     => 'style_' . $this->oProp->sClassName . '_' .  ( ++$this->oProp->iEnqueuedStyleIndex ),
77
+                'handle_id'     => 'style_'.$this->oProp->sClassName.'_'.( ++$this->oProp->iEnqueuedStyleIndex ),
78 78
             ),
79 79
             self::$_aStructure_EnqueuingResources
80 80
         );
81 81
         
82 82
         // Store the attributes in another container by url.
83
-        $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingStyles[ $_sSRCHash ]['handle_id'] ] = $this->oProp->aEnqueuingStyles[ $_sSRCHash ]['attributes'];
83
+        $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingStyles[ $_sSRCHash ][ 'handle_id' ] ] = $this->oProp->aEnqueuingStyles[ $_sSRCHash ][ 'attributes' ];
84 84
         
85 85
         return $this->oProp->aEnqueuingStyles[ $_sSRCHash ][ 'handle_id' ];
86 86
         
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
      * @since 2.1.5
93 93
      * @internal
94 94
      */
95
-    public function _enqueueScripts( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) {
95
+    public function _enqueueScripts( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) {
96 96
         
97 97
         $_aHandleIDs = array();
98
-        foreach( ( array ) $aSRCs as $_sSRC ) {
99
-            $_aHandleIDs[] = $this->_enqueueScript( $_sSRC, $aPostTypes, $aCustomArgs );
98
+        foreach ( ( array ) $aSRCs as $_sSRC ) {
99
+            $_aHandleIDs[ ] = $this->_enqueueScript( $_sSRC, $aPostTypes, $aCustomArgs );
100 100
         }
101 101
         return $_aHandleIDs;
102 102
         
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
      * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
122 122
      * @internal
123 123
      */
124
-    public function _enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) {
124
+    public function _enqueueScript( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) {
125 125
         
126
-        $sSRC       = trim( $sSRC );
126
+        $sSRC = trim( $sSRC );
127 127
         if ( empty( $sSRC ) ) { 
128 128
             return ''; 
129 129
         }
@@ -141,13 +141,13 @@  discard block
 block discarded – undo
141 141
                 'sSRC'          => $sSRC,
142 142
                 'aPostTypes'    => empty( $aPostTypes ) ? $this->oProp->aPostTypes : $aPostTypes,
143 143
                 'sType'         => 'script',
144
-                'handle_id'     => 'script_' . $this->oProp->sClassName . '_' .  ( ++$this->oProp->iEnqueuedScriptIndex ),
144
+                'handle_id'     => 'script_'.$this->oProp->sClassName.'_'.( ++$this->oProp->iEnqueuedScriptIndex ),
145 145
             ),
146 146
             self::$_aStructure_EnqueuingResources
147 147
         );
148 148
         
149 149
         // Store the attributes in another container by url.
150
-        $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingScripts[ $_sSRCHash ]['handle_id'] ] = $this->oProp->aEnqueuingScripts[ $_sSRCHash ]['attributes'];
150
+        $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingScripts[ $_sSRCHash ][ 'handle_id' ] ] = $this->oProp->aEnqueuingScripts[ $_sSRCHash ][ 'attributes' ];
151 151
         
152 152
         return $this->oProp->aEnqueuingScripts[ $_sSRCHash ][ 'handle_id' ];
153 153
         
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      * @since 3.0.0
160 160
      * @internal
161 161
      */
162
-    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs=array() ) {
162
+    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs = array() ) {
163 163
         return $this->_enqueueStyle( $sSRC, array(), $aCustomArgs );
164 164
     }
165 165
     /**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      * @since 3.0.0
169 169
      * @internal
170 170
      */    
171
-    public function _forceToEnqueueScript( $sSRC, $aCustomArgs=array() ) {
171
+    public function _forceToEnqueueScript( $sSRC, $aCustomArgs = array() ) {
172 172
         return $this->_enqueueScript( $sSRC, array(), $aCustomArgs );
173 173
     }
174 174
     
@@ -181,8 +181,8 @@  discard block
 block discarded – undo
181 181
      */
182 182
     protected function _enqueueSRCByCondition( $aEnqueueItem ) {
183 183
        
184
-        $_sCurrentPostType = isset( $_GET['post_type'] ) ? $_GET['post_type'] : ( isset( $GLOBALS['typenow'] ) ? $GLOBALS['typenow'] : null );
185
-        if ( in_array( $_sCurrentPostType, $aEnqueueItem['aPostTypes'] ) ) {
184
+        $_sCurrentPostType = isset( $_GET[ 'post_type' ] ) ? $_GET[ 'post_type' ] : ( isset( $GLOBALS[ 'typenow' ] ) ? $GLOBALS[ 'typenow' ] : null );
185
+        if ( in_array( $_sCurrentPostType, $aEnqueueItem[ 'aPostTypes' ] ) ) {
186 186
             return $this->_enqueueSRC( $aEnqueueItem );
187 187
         }
188 188
             
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,14 +124,14 @@
 block discarded – undo
124 124
     public function _enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) {
125 125
         
126 126
         $sSRC       = trim( $sSRC );
127
-        if ( empty( $sSRC ) ) { 
127
+        if ( empty( $sSRC ) ) {
128 128
             return ''; 
129 129
         }
130 130
         $sSRC       = $this->getResolvedSRC( $sSRC );
131 131
         
132 132
         // Setting the key based on the url prevents duplicate items
133 133
         $_sSRCHash  = md5( $sSRC ); 
134
-        if ( isset( $this->oProp->aEnqueuingScripts[ $_sSRCHash ] ) ) { 
134
+        if ( isset( $this->oProp->aEnqueuingScripts[ $_sSRCHash ] ) ) {
135 135
             return ''; 
136 136
         } 
137 137
         
Please login to merge, or discard this patch.
factory/meta_box/_controller/AdminPageFramework_HelpPane_post_meta_box.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     public function _replyToRegisterHelpTabText() {
31 31
 
32 32
         // Check if the currently loaded page is of meta box page.
33
-        if ( ! $this->_isInThePage() ) { 
33
+        if ( !$this->_isInThePage() ) { 
34 34
             return false; 
35 35
         }
36 36
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
      */
67 67
     public function _replyToDetermineToLoad( /* $oScreen */ ) {
68 68
         
69
-        if ( ! $this->_isInThePage() ) { 
69
+        if ( ! $this->_isInThePage() ) {
70 70
             return; 
71 71
         }
72 72
 
Please login to merge, or discard this patch.