Completed
Branch master (e9f65a)
by
unknown
03:51 queued 01:58
created
development/factory/_common/_abstract/AdminPageFramework_Factory_View.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
          * @return      string      the input id attribute
41 41
          */
42 42
         public function _replyToGetSectionName( /* $sSectionName, $aSectionset */ ) {
43
-            $_aParams = func_get_args() + array( null, null, );
43
+            $_aParams = func_get_args() + array( null, null,);
44 44
             return $_aParams[ 0 ];
45 45
         }
46 46
 
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
          * @since       3.6.0
69 69
          * @return      string
70 70
          */
71
-        public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ )  {
72
-            $_aParams = func_get_args() + array( null, null, );
71
+        public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) {
72
+            $_aParams = func_get_args() + array( null, null,);
73 73
             return $_aParams[ 0 ];
74 74
         }
75 75
         /**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
          * @return      string
80 80
          */
81 81
         public function _replyToGetFlatFieldName( /* $sFieldName, $aFieldset */ ) {
82
-            $_aParams = func_get_args() + array( null, null, );
82
+            $_aParams = func_get_args() + array( null, null,);
83 83
             return $_aParams[ 0 ];
84 84
         }
85 85
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
          * @return      string      the flat input name attribute
102 102
          */
103 103
         public function _replyToGetFlatInputName( /* $sFlatNameAttribute, $aField, $sKey */ ) {
104
-            $_aParams   = func_get_args() + array( null, null, null );
104
+            $_aParams = func_get_args() + array( null, null, null );
105 105
             return $_aParams[ 0 ];
106 106
         }
107 107
 
@@ -143,14 +143,14 @@  discard block
 block discarded – undo
143 143
                 'if'            => true,
144 144
                 'capability'    => '',
145 145
             );
146
-            if ( ! $aElementDefinition[ 'if' ] ) {
146
+            if ( !$aElementDefinition[ 'if' ] ) {
147 147
                 return false;
148 148
             }
149 149
             // For front-end forms that allow guests, the capability level can be empty. In that case, return true.
150
-            if ( ! $aElementDefinition[ 'capability' ] ) {
150
+            if ( !$aElementDefinition[ 'capability' ] ) {
151 151
                 return true;
152 152
             }
153
-            if ( ! current_user_can( $aElementDefinition[ 'capability' ] ) ) {
153
+            if ( !current_user_can( $aElementDefinition[ 'capability' ] ) ) {
154 154
                 return false;
155 155
             }
156 156
             return $bDefault;
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             $this,
187 187
             array(
188 188
                 // section_{instantiated class name}_{section id}
189
-                'section_head_' . $this->oProp->sClassName . '_' . $aSectionset[ 'section_id' ]
189
+                'section_head_'.$this->oProp->sClassName.'_'.$aSectionset[ 'section_id' ]
190 190
             ),
191 191
             $sSectionDescription
192 192
         );
@@ -203,15 +203,15 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public function _replyToGetFieldOutput( $sFieldOutput, $aFieldset ) {
205 205
 
206
-        $_sSectionPart  = $this->oUtil->getAOrB(
206
+        $_sSectionPart = $this->oUtil->getAOrB(
207 207
             isset( $aFieldset[ 'section_id' ] ) && '_default' !== $aFieldset[ 'section_id' ],
208
-            '_' . $aFieldset[ 'section_id' ],
208
+            '_'.$aFieldset[ 'section_id' ],
209 209
             ''
210 210
         );
211 211
         return $this->oUtil->addAndApplyFilters(
212 212
             $this,
213 213
             array(
214
-                'field_' . $this->oProp->sClassName . $_sSectionPart . '_' . $aFieldset[ 'field_id' ]
214
+                'field_'.$this->oProp->sClassName.$_sSectionPart.'_'.$aFieldset[ 'field_id' ]
215 215
             ),
216 216
             $sFieldOutput,
217 217
             $aFieldset // the field array
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
          * @since       3.6.0
69 69
          * @return      string
70 70
          */
71
-        public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ )  {
71
+        public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) {
72 72
             $_aParams = func_get_args() + array( null, null, );
73 73
             return $_aParams[ 0 ];
74 74
         }
Please login to merge, or discard this patch.
development/factory/_common/_abstract/_model/AdminPageFramework_Message.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
         'confirm_perform_task'                  => 'Please confirm your action.',
82 82
         'specified_option_been_deleted'         => 'The specified options have been deleted.',
83 83
         'nonce_verification_failed'             => 'A problem occurred while processing the form data. Please try again.',
84
-        'check_max_input_vars'                  => 'Not all form fields could not be sent. Please check your server settings of PHP <code>max_input_vars</code> and consult the server administrator to increase the value. <code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s',  // 3.5.11+
85
-        'send_email'                            => 'Is it okay to send the email?',     // 3.3.0+
86
-        'email_sent'                            => 'The email has been sent.',  // 3.3.0+, 3.3.5+ deprecated
84
+        'check_max_input_vars'                  => 'Not all form fields could not be sent. Please check your server settings of PHP <code>max_input_vars</code> and consult the server administrator to increase the value. <code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s', // 3.5.11+
85
+        'send_email'                            => 'Is it okay to send the email?', // 3.3.0+
86
+        'email_sent'                            => 'The email has been sent.', // 3.3.0+, 3.3.5+ deprecated
87 87
         'email_scheduled'                       => 'The email has been scheduled.', // 3.3.5+
88
-        'email_could_not_send'                  => 'There was a problem sending the email',     // 3.3.0+
88
+        'email_could_not_send'                  => 'There was a problem sending the email', // 3.3.0+
89 89
 
90 90
         // AdminPageFramework_PostType
91 91
         'title'                                 => 'Title',
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
         'upload_file'                           => 'Upload File',
113 113
         'use_this_file'                         => 'Use This File',
114 114
         'select_file'                           => 'Select File',
115
-        'remove_value'                          => 'Remove Value',  // 3.2.0+
116
-        'select_all'                            => 'Select All',    // 3.3.0+
117
-        'select_none'                           => 'Select None',   // 3.3.0+
115
+        'remove_value'                          => 'Remove Value', // 3.2.0+
116
+        'select_all'                            => 'Select All', // 3.3.0+
117
+        'select_none'                           => 'Select None', // 3.3.0+
118 118
         'no_term_found'                         => 'No term found.', // 3.3.2+
119 119
 
120 120
         // AdminPageFramework_Form_View___Script_{...}
121 121
         'select'                                => 'Select', // 3.4.2+
122
-        'insert'                                => 'Insert',  // 3.4.2+
122
+        'insert'                                => 'Insert', // 3.4.2+
123 123
         'use_this'                              => 'Use This', // 3.4.2+
124 124
         'return_to_library'                     => 'Return to Library', // 3.4.2+
125 125
 
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
 
132 132
         // Repeatable sections & fields
133 133
         'repeatable_section_is_disabled'        => 'The ability to repeat sections is disabled.', // 3.8.13+
134
-        'repeatable_field_is_disabled'          => 'The ability to repeat fields is disabled.',   // 3.8.13+
135
-        'warning_caption'                       => 'Warning',   // 3.8.13+
134
+        'repeatable_field_is_disabled'          => 'The ability to repeat fields is disabled.', // 3.8.13+
135
+        'warning_caption'                       => 'Warning', // 3.8.13+
136 136
 
137 137
         // AdminPageFramework_FormField
138 138
         'allowed_maximum_number_of_fields'      => 'The allowed maximum number of fields is {0}.',
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
      * @since       3.2.0       Changed it to create an instance per text domain basis.
210 210
      * @remark      This class should be instantiated via this method.
211 211
      */
212
-    public static function getInstance( $sTextDomain='admin-page-framework' ) {
212
+    public static function getInstance( $sTextDomain = 'admin-page-framework' ) {
213 213
 
214 214
         $_oInstance = isset( self::$_aInstancesByTextDomain[ $sTextDomain ] ) && ( self::$_aInstancesByTextDomain[ $sTextDomain ] instanceof AdminPageFramework_Message )
215 215
             ? self::$_aInstancesByTextDomain[ $sTextDomain ]
@@ -222,21 +222,21 @@  discard block
 block discarded – undo
222 222
          * Ensures that only one instance of this class object exists. ( no multiple instances of this object )
223 223
          * @deprecated  3.2.0
224 224
          */
225
-        public static function instantiate( $sTextDomain='admin-page-framework' ) {
225
+        public static function instantiate( $sTextDomain = 'admin-page-framework' ) {
226 226
             return self::getInstance( $sTextDomain );
227 227
         }
228 228
 
229 229
     /**
230 230
      * Sets up properties.
231 231
      */
232
-    public function __construct( $sTextDomain='admin-page-framework' ) {
232
+    public function __construct( $sTextDomain = 'admin-page-framework' ) {
233 233
 
234 234
         $this->_sTextDomain = $sTextDomain;
235 235
 
236 236
         // Fill the $aMessages property with the keys extracted from the $aDefaults property
237 237
         // with the value of null.  The null is set to let it trigger the __get() method
238 238
         // so that each translation item gets processed individually.
239
-        $this->aMessages    = array_fill_keys(
239
+        $this->aMessages = array_fill_keys(
240 240
             array_keys( $this->aDefaults ),
241 241
             null
242 242
         );
@@ -270,13 +270,13 @@  discard block
 block discarded – undo
270 270
      * @since       3.7.0      If no key is specified, return the entire mesage array.
271 271
      * @return      string|array
272 272
      */
273
-    public function get( $sKey='' ) {
274
-        if ( ! $sKey ) {
273
+    public function get( $sKey = '' ) {
274
+        if ( !$sKey ) {
275 275
             return $this->_getAllMessages();
276 276
         }
277 277
         return isset( $this->aMessages[ $sKey ] )
278 278
             ? __( $this->aMessages[ $sKey ], $this->_sTextDomain )
279
-            : __( $this->{$sKey}, $this->_sTextDomain );     // triggers __get()
279
+            : __( $this->{$sKey}, $this->_sTextDomain ); // triggers __get()
280 280
     }
281 281
         /**
282 282
          * Returns the all registered messag items.
Please login to merge, or discard this patch.
_common/_abstract/_view/AdminPageFramework_Factory_View__SettingNotice.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @since       3.7.9       Added the second parameter to accept an action hook name.
27 27
      */
28 28
 
29
-    public function __construct( $oFactory, $sActionHookName='admin_notices' ) {
29
+    public function __construct( $oFactory, $sActionHookName = 'admin_notices' ) {
30 30
 
31 31
         $this->oFactory = $oFactory;
32 32
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function _replyToPrintSettingNotice() {
47 47
 
48
-        if ( ! $this->_shouldProceed() ) {
48
+        if ( !$this->_shouldProceed() ) {
49 49
             return;
50 50
         }
51 51
         $this->oFactory->oForm->printSubmitNotices();
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
          */
60 60
         private function _shouldProceed() {
61 61
 
62
-            if ( ! $this->oFactory->isInThePage() ) {
62
+            if ( !$this->oFactory->isInThePage() ) {
63 63
                 return false;
64 64
             }
65 65
 
Please login to merge, or discard this patch.
factory/_common/_abstract/_view/AdminPageFramework_TabNavigationBar.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     /**
26 26
      * Stores the tab items.
27 27
      */
28
-    public $aTabs   = array();
28
+    public $aTabs = array();
29 29
 
30 30
     /**
31 31
      * Stores container attributes.
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
     );
36 36
 
37 37
     public $aTab = array(
38
-        'slug'       => null,  // (string) tab slug (id)
39
-        'title'      => null,  // (string) tab title
40
-        'href'       => null,  // (string) link url
41
-        'disabled'   => null,  // (boolean)
42
-        'class'      => null,  // (string) class selector to append to the class attribute
38
+        'slug'       => null, // (string) tab slug (id)
39
+        'title'      => null, // (string) tab title
40
+        'href'       => null, // (string) link url
41
+        'disabled'   => null, // (boolean)
42
+        'class'      => null, // (string) class selector to append to the class attribute
43 43
         'attributes' => array(),
44 44
     );
45 45
 
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
      * @param       array             $aTabs              An array holding each tab definitions
59 59
      * @param       array|string      $asActiveTabSlugs   The default tab slug.
60 60
      */
61
-    public function __construct( array $aTabs, $asActiveTabSlugs, $sTabTag='h2', $aAttributes=array( 'class' => 'nav-tab-wrapper', ), $aCallbacks=array() ) {
61
+    public function __construct( array $aTabs, $asActiveTabSlugs, $sTabTag = 'h2', $aAttributes = array( 'class' => 'nav-tab-wrapper',), $aCallbacks = array() ) {
62 62
 
63
-        $this->aCallbacks           = $aCallbacks + array(
63
+        $this->aCallbacks = $aCallbacks + array(
64 64
             'format'    => null,
65
-            'arguments' => null,  // custom arguments to pass to the callback functions.
65
+            'arguments' => null, // custom arguments to pass to the callback functions.
66 66
         );
67 67
         $this->aTabs                = $this->_getFormattedTabs( $aTabs );
68 68
         $this->aActiveSlugs         = $this->getAsArray( $asActiveTabSlugs );
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
          * @return      array
77 77
          */
78 78
         private function _getFormattedTabs( array $aTabs ) {
79
-            foreach( $aTabs as $_isKey => &$_aTab ) {
79
+            foreach ( $aTabs as $_isKey => &$_aTab ) {
80 80
                 $_aFormattedTab = $this->_getFormattedTab( $_aTab, $aTabs );
81 81
                 if ( isset( $_aFormattedTab[ 'slug' ] ) ) {
82 82
                     $_aTab = $_aFormattedTab;
@@ -127,12 +127,12 @@  discard block
 block discarded – undo
127 127
         private function _getTabs() {
128 128
 
129 129
             $_aOutput = array();
130
-            foreach( $this->aTabs as $_aTab ) {
130
+            foreach ( $this->aTabs as $_aTab ) {
131 131
                 $_sTab = $this->_getTab( $_aTab );
132
-                if ( ! $_sTab ) {
132
+                if ( !$_sTab ) {
133 133
                     continue;
134 134
                 }
135
-                $_aOutput[] = $_sTab;
135
+                $_aOutput[ ] = $_sTab;
136 136
             }
137 137
 
138 138
             $_aContainerAttributes = $this->aAttributes + array( 'class' => null );
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
             return empty( $_aOutput )
145 145
                 ? ''
146
-                : "<{$this->sTabTag} " . $this->getAttributes( $_aContainerAttributes ) . ">"
146
+                : "<{$this->sTabTag} ".$this->getAttributes( $_aContainerAttributes ).">"
147 147
                     . implode( '', $_aOutput )
148 148
                 . "</{$this->sTabTag}>";
149 149
 
Please login to merge, or discard this patch.
_common/_abstract/_view/AdminPageFramework_Factory___Script_Base.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      *
29 29
      * @since       3.3.0
30 30
      */
31
-    public function __construct( $oMsg=null ) {
31
+    public function __construct( $oMsg = null ) {
32 32
 
33 33
         if ( $this->hasBeenCalled( get_class( $this ) ) ) {
34 34
             return;
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function _replyToPrintScript() {
89 89
         $_sScript = $this->getScript( $this->oMsg );
90
-        if ( ! $_sScript ) {
90
+        if ( !$_sScript ) {
91 91
             return;
92 92
         }
93
-        echo "<script type='text/javascript' class='" . strtolower( get_class( $this ) ) . "'>"
93
+        echo "<script type='text/javascript' class='".strtolower( get_class( $this ) )."'>"
94 94
                 . '/* <![CDATA[ */'
95 95
                 . $_sScript
96 96
                 . '/* ]]> */'
Please login to merge, or discard this patch.
factory/meta_box/_controller/AdminPageFramework_Resource_post_meta_box.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
      * @since 2.1.5
30 30
      * @internal
31 31
      */
32
-    public function _enqueueStyles( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) {
32
+    public function _enqueueStyles( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) {
33 33
 
34 34
         $_aHandleIDs = array();
35
-        foreach( ( array ) $aSRCs as $_sSRC ) {
36
-            $_aHandleIDs[] = $this->_enqueueStyle( $_sSRC, $aPostTypes, $aCustomArgs );
35
+        foreach ( ( array ) $aSRCs as $_sSRC ) {
36
+            $_aHandleIDs[ ] = $this->_enqueueStyle( $_sSRC, $aPostTypes, $aCustomArgs );
37 37
         }
38 38
         return $_aHandleIDs;
39 39
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
58 58
      * @internal
59 59
      */
60
-    public function _enqueueStyle( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) {
60
+    public function _enqueueStyle( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) {
61 61
 
62 62
         $sSRC = trim( $sSRC );
63 63
         if ( empty( $sSRC ) ) { return ''; }
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
                 'sSRC'          => $sSRC,
74 74
                 'aPostTypes'    => empty( $aPostTypes ) ? $this->oProp->aPostTypes : $aPostTypes,
75 75
                 'sType'         => 'style',
76
-                'handle_id'     => 'style_' . $this->oProp->sClassName . '_' .  ( ++$this->oProp->iEnqueuedStyleIndex ),
76
+                'handle_id'     => 'style_'.$this->oProp->sClassName.'_'.( ++$this->oProp->iEnqueuedStyleIndex ),
77 77
             ),
78 78
             self::$_aStructure_EnqueuingResources
79 79
         );
80 80
 
81 81
         // Store the attributes in another container by url.
82
-        $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingStyles[ $_sSRCHash ]['handle_id'] ] = $this->oProp->aEnqueuingStyles[ $_sSRCHash ]['attributes'];
82
+        $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingStyles[ $_sSRCHash ][ 'handle_id' ] ] = $this->oProp->aEnqueuingStyles[ $_sSRCHash ][ 'attributes' ];
83 83
 
84 84
         return $this->oProp->aEnqueuingStyles[ $_sSRCHash ][ 'handle_id' ];
85 85
 
@@ -91,11 +91,11 @@  discard block
 block discarded – undo
91 91
      * @since 2.1.5
92 92
      * @internal
93 93
      */
94
-    public function _enqueueScripts( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) {
94
+    public function _enqueueScripts( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) {
95 95
 
96 96
         $_aHandleIDs = array();
97
-        foreach( ( array ) $aSRCs as $_sSRC ) {
98
-            $_aHandleIDs[] = $this->_enqueueScript( $_sSRC, $aPostTypes, $aCustomArgs );
97
+        foreach ( ( array ) $aSRCs as $_sSRC ) {
98
+            $_aHandleIDs[ ] = $this->_enqueueScript( $_sSRC, $aPostTypes, $aCustomArgs );
99 99
         }
100 100
         return $_aHandleIDs;
101 101
 
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
      * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
121 121
      * @internal
122 122
      */
123
-    public function _enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) {
123
+    public function _enqueueScript( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) {
124 124
 
125
-        $sSRC       = trim( $sSRC );
125
+        $sSRC = trim( $sSRC );
126 126
         if ( empty( $sSRC ) ) {
127 127
             return '';
128 128
         }
@@ -140,13 +140,13 @@  discard block
 block discarded – undo
140 140
                 'sSRC'          => $sSRC,
141 141
                 'aPostTypes'    => empty( $aPostTypes ) ? $this->oProp->aPostTypes : $aPostTypes,
142 142
                 'sType'         => 'script',
143
-                'handle_id'     => 'script_' . $this->oProp->sClassName . '_' .  ( ++$this->oProp->iEnqueuedScriptIndex ),
143
+                'handle_id'     => 'script_'.$this->oProp->sClassName.'_'.( ++$this->oProp->iEnqueuedScriptIndex ),
144 144
             ),
145 145
             self::$_aStructure_EnqueuingResources
146 146
         );
147 147
 
148 148
         // Store the attributes in another container by url.
149
-        $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingScripts[ $_sSRCHash ]['handle_id'] ] = $this->oProp->aEnqueuingScripts[ $_sSRCHash ]['attributes'];
149
+        $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingScripts[ $_sSRCHash ][ 'handle_id' ] ] = $this->oProp->aEnqueuingScripts[ $_sSRCHash ][ 'attributes' ];
150 150
 
151 151
         return $this->oProp->aEnqueuingScripts[ $_sSRCHash ][ 'handle_id' ];
152 152
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      * @since 3.0.0
159 159
      * @internal
160 160
      */
161
-    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs=array() ) {
161
+    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs = array() ) {
162 162
         return $this->_enqueueStyle( $sSRC, array(), $aCustomArgs );
163 163
     }
164 164
     /**
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      * @since 3.0.0
168 168
      * @internal
169 169
      */
170
-    public function _forceToEnqueueScript( $sSRC, $aCustomArgs=array() ) {
170
+    public function _forceToEnqueueScript( $sSRC, $aCustomArgs = array() ) {
171 171
         return $this->_enqueueScript( $sSRC, array(), $aCustomArgs );
172 172
     }
173 173
 
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
      */
181 181
     protected function _enqueueSRCByCondition( $aEnqueueItem ) {
182 182
 
183
-        $_sCurrentPostType = isset( $_GET['post_type'] ) ? $_GET['post_type'] : ( isset( $GLOBALS['typenow'] ) ? $GLOBALS['typenow'] : null );
184
-        if ( in_array( $_sCurrentPostType, $aEnqueueItem['aPostTypes'] ) ) {
183
+        $_sCurrentPostType = isset( $_GET[ 'post_type' ] ) ? $_GET[ 'post_type' ] : ( isset( $GLOBALS[ 'typenow' ] ) ? $GLOBALS[ 'typenow' ] : null );
184
+        if ( in_array( $_sCurrentPostType, $aEnqueueItem[ 'aPostTypes' ] ) ) {
185 185
             return $this->_enqueueSRC( $aEnqueueItem );
186 186
         }
187 187
 
Please login to merge, or discard this patch.
development/factory/meta_box/AdminPageFramework_MetaBox_View.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
         // Use nonce for verification
32 32
         $_aOutput   = array();
33
-        $_aOutput[] = wp_nonce_field(
33
+        $_aOutput[ ] = wp_nonce_field(
34 34
             $this->oProp->sMetaBoxID,
35 35
             $this->oProp->sMetaBoxID,
36 36
             true,
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 
40 40
         // Get the fields output. If no field is added, the form object is not instantiated.
41 41
         if ( isset( $this->oForm ) ) {
42
-            $_aOutput[] = $this->oForm->get();
42
+            $_aOutput[ ] = $this->oForm->get();
43 43
         }
44 44
 
45 45
         // Do actions
46
-        $this->oUtil->addAndDoActions( $this, 'do_' . $this->oProp->sClassName, $this );
46
+        $this->oUtil->addAndDoActions( $this, 'do_'.$this->oProp->sClassName, $this );
47 47
 
48 48
         // Render the filtered output.
49 49
         echo $this->oUtil->addAndApplyFilters(
Please login to merge, or discard this patch.
development/factory/meta_box/AdminPageFramework_MetaBox_Controller.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -17,32 +17,32 @@
 block discarded – undo
17 17
 abstract class AdminPageFramework_MetaBox_Controller extends AdminPageFramework_MetaBox_View {
18 18
 
19 19
     /**
20
-    * The method for all necessary set-ups.
21
-    *
22
-    * <h4>Example</h4>
23
-    * <code> public function setUp() {
24
-    *     $this->addSettingFields(
25
-    *         array(
26
-    *             'field_id'    => 'sample_metabox_text_field',
27
-    *             'title'       => 'Text Input',
28
-    *             'description' => 'The description for the field.',
29
-    *             'type'        => 'text',
30
-    *         ),
31
-    *         array(
32
-    *             'field_id'    => 'sample_metabox_textarea_field',
33
-    *             'title'       => 'Textarea',
34
-    *             'description' => 'The description for the field.',
35
-    *             'type'        => 'textarea',
36
-    *             'default'     => 'This is a default text value.',
37
-    *         )
38
-    *     );
39
-    * }</code>
40
-    *
41
-    * @abstract
42
-    * @since        2.0.0
43
-    * @remark       The user should override this method.
44
-    * @return       void
45
-    */
20
+     * The method for all necessary set-ups.
21
+     *
22
+     * <h4>Example</h4>
23
+     * <code> public function setUp() {
24
+     *     $this->addSettingFields(
25
+     *         array(
26
+     *             'field_id'    => 'sample_metabox_text_field',
27
+     *             'title'       => 'Text Input',
28
+     *             'description' => 'The description for the field.',
29
+     *             'type'        => 'text',
30
+     *         ),
31
+     *         array(
32
+     *             'field_id'    => 'sample_metabox_textarea_field',
33
+     *             'title'       => 'Textarea',
34
+     *             'description' => 'The description for the field.',
35
+     *             'type'        => 'textarea',
36
+     *             'default'     => 'This is a default text value.',
37
+     *         )
38
+     *     );
39
+     * }</code>
40
+     *
41
+     * @abstract
42
+     * @since        2.0.0
43
+     * @remark       The user should override this method.
44
+     * @return       void
45
+     */
46 46
     public function setUp() {}
47 47
 
48 48
     /**
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
      *
53 53
      * @since 3.0.0
54 54
      */
55
-    public function enqueueStyles( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) {
55
+    public function enqueueStyles( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) {
56 56
         return $this->oResource->_enqueueStyles( $aSRCs, $aPostTypes, $aCustomArgs );
57 57
     }
58 58
     /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @param       array       (optional) The argument array for more advanced parameters.
76 76
      * @return      string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
77 77
      */
78
-    public function enqueueStyle( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) {
78
+    public function enqueueStyle( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) {
79 79
         return $this->oResource->_enqueueStyle( $sSRC, $aPostTypes, $aCustomArgs );
80 80
     }
81 81
     /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      *
84 84
      * @since 3.0.0
85 85
      */
86
-    public function enqueueScripts( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) {
86
+    public function enqueueScripts( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) {
87 87
         return $this->oResource->_enqueueScripts( $aSRCs, $aPostTypes, $aCustomArgs );
88 88
     }
89 89
     /**
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      * @param       array       (optional) The argument array for more advanced parameters.
119 119
      * @return      string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
120 120
      */
121
-    public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) {
121
+    public function enqueueScript( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) {
122 122
         return $this->oResource->_enqueueScript( $sSRC, $aPostTypes, $aCustomArgs );
123 123
     }
124 124
 
Please login to merge, or discard this patch.
development/factory/meta_box/AdminPageFramework_MetaBox_Router.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @param       string          $sTextDomain            (optional) The text domain applied to the displayed text messages. Default: `admin-page-framework`.
34 34
      * @return      void
35 35
      */
36
-    public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) {
36
+    public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array( 'post' ), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework' ) {
37 37
 
38 38
         parent::__construct( $this->oProp );
39 39
 
@@ -41,15 +41,15 @@  discard block
 block discarded – undo
41 41
             ? $this->oUtil->sanitizeSlug( $sMetaBoxID )
42 42
             : strtolower( $this->oProp->sClassName );
43 43
         $this->oProp->sTitle        = $sTitle;
44
-        $this->oProp->sContext      = $sContext;    // 'normal', 'advanced', or 'side'
45
-        $this->oProp->sPriority     = $sPriority;   // 'high', 'core', 'default' or 'low'
44
+        $this->oProp->sContext      = $sContext; // 'normal', 'advanced', or 'side'
45
+        $this->oProp->sPriority     = $sPriority; // 'high', 'core', 'default' or 'low'
46 46
 
47
-        if ( ! $this->oProp->bIsAdmin ) {
47
+        if ( !$this->oProp->bIsAdmin ) {
48 48
             return;
49 49
         }
50 50
 
51 51
         // 3.8.14
52
-        add_action( 'set_up_' . $this->oProp->sClassName, array( $this, '_replyToCallLoadMethods' ), 100 );
52
+        add_action( 'set_up_'.$this->oProp->sClassName, array( $this, '_replyToCallLoadMethods' ), 100 );
53 53
 
54 54
         $this->oUtil->registerAction(
55 55
             $this->oProp->bIsAdminAjax
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
             return true;
87 87
         }
88 88
 
89
-        if ( ! in_array( $this->oProp->sPageNow, array( 'post.php', 'post-new.php' ) ) ) {
89
+        if ( !in_array( $this->oProp->sPageNow, array( 'post.php', 'post-new.php' ) ) ) {
90 90
             return false;
91 91
         }
92 92
 
93
-        if ( ! in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {
93
+        if ( !in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {
94 94
             return false;
95 95
         }
96 96
         return true;
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
      */
106 106
     protected function _isValidAjaxReferrer() {
107 107
 
108
-        if ( ! $this->oProp->bIsAdminAjax ) {
108
+        if ( !$this->oProp->bIsAdminAjax ) {
109 109
             return false;
110 110
         }
111 111
         $_aReferrer = parse_url( $this->oProp->sAjaxReferrer ) + array( 'query' => '', 'path' => '' );
112 112
         parse_str( $_aReferrer[ 'query' ], $_aQuery );
113 113
 
114 114
         $_sBaseName = basename( $_aReferrer[ 'path' ] );
115
-        if ( ! in_array( $_sBaseName, array( 'post.php', 'post-new.php' ) ) ) {
115
+        if ( !in_array( $_sBaseName, array( 'post.php', 'post-new.php' ) ) ) {
116 116
             return false;
117 117
         }
118 118
         // post-new.php?post_type={...} or post.php?post={n}&action=edit
Please login to merge, or discard this patch.