@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | self::$_bIsLoadedJSScripts_Widget = true; |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | - if ( self::$_bIsLoadedJSScripts ) { |
|
| 160 | + if ( self::$_bIsLoadedJSScripts ) { |
|
| 161 | 161 | return; |
| 162 | 162 | } |
| 163 | 163 | self::$_bIsLoadedJSScripts = true; |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | * |
| 256 | 256 | * @since 3.0.0 |
| 257 | 257 | */ |
| 258 | - protected function _getSortableFieldEnablerScript( $sFieldsContainerID ) { |
|
| 258 | + protected function _getSortableFieldEnablerScript( $sFieldsContainerID ) { |
|
| 259 | 259 | |
| 260 | 260 | $_sScript = <<<JAVASCRIPTS |
| 261 | 261 | jQuery( document ).ready( function() { |
@@ -272,8 +272,8 @@ discard block |
||
| 272 | 272 | 'href' => empty( $aArguments[ 'disabled' ] ) |
| 273 | 273 | ? null |
| 274 | 274 | : '#TB_inline?width=' . $aArguments[ 'disabled' ][ 'box_width' ] |
| 275 | - . '&height=' . $aArguments[ 'disabled' ][ 'box_height' ] |
|
| 276 | - . '&inlineId=' . 'repeatable_field_disabled_' . $sFieldsContainerID, |
|
| 275 | + . '&height=' . $aArguments[ 'disabled' ][ 'box_height' ] |
|
| 276 | + . '&inlineId=' . 'repeatable_field_disabled_' . $sFieldsContainerID, |
|
| 277 | 277 | ); |
| 278 | 278 | return $this->getAttributes( $_sPlusButtonAttributes ); |
| 279 | 279 | } |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | private function ___getRemoveButtonAttributes( $sFieldsContainerID, $sSmallButtonSelector, $iFieldCount ) { |
| 286 | 286 | $_aMinusButtonAttributes = array( |
| 287 | 287 | 'class' => 'repeatable-field-remove-button button-secondary repeatable-field-button button' |
| 288 | - . $sSmallButtonSelector, |
|
| 288 | + . $sSmallButtonSelector, |
|
| 289 | 289 | 'title' => $this->oMsg->get( 'remove' ), |
| 290 | 290 | 'style' => $iFieldCount <= 1 |
| 291 | 291 | ? 'visibility: hidden' |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * @param object $oMsg An object storing the system messages. |
| 68 | 68 | * @param array $aCallbacks An array storing the form-field specific callbacks. |
| 69 | 69 | */ |
| 70 | - public function __construct( $aFieldset, $aOptions, $aErrors, &$aFieldTypeDefinitions, &$oMsg, array $aCallbacks=array() ) { |
|
| 70 | + public function __construct( $aFieldset, $aOptions, $aErrors, &$aFieldTypeDefinitions, &$oMsg, array $aCallbacks = array() ) { |
|
| 71 | 71 | |
| 72 | 72 | // Set up the properties that will be accessed later in the methods. |
| 73 | 73 | $this->aFieldset = $this->_getFormatted( $aFieldset, $aFieldTypeDefinitions ); |
@@ -76,13 +76,13 @@ discard block |
||
| 76 | 76 | $this->aErrors = $this->getAsArray( $aErrors ); |
| 77 | 77 | $this->oMsg = $oMsg; |
| 78 | 78 | $this->aCallbacks = $aCallbacks + array( |
| 79 | - 'hfID' => null, // the input id attribute |
|
| 80 | - 'hfTagID' => null, // the fieldset/field row container id attribute |
|
| 81 | - 'hfName' => null, // the input name attribute |
|
| 82 | - 'hfNameFlat' => null, // the flat input name attribute |
|
| 79 | + 'hfID' => null, // the input id attribute |
|
| 80 | + 'hfTagID' => null, // the fieldset/field row container id attribute |
|
| 81 | + 'hfName' => null, // the input name attribute |
|
| 82 | + 'hfNameFlat' => null, // the flat input name attribute |
|
| 83 | 83 | 'hfInputName' => null, |
| 84 | 84 | 'hfInputNameFlat' => null, |
| 85 | - 'hfClass' => null, // the class attribute |
|
| 85 | + 'hfClass' => null, // the class attribute |
|
| 86 | 86 | ); |
| 87 | 87 | |
| 88 | 88 | // 2. Load necessary JavaScript scripts. |
@@ -149,9 +149,9 @@ discard block |
||
| 149 | 149 | * @since 3.2.0 Added the `$sFieldsType` parameter. |
| 150 | 150 | * @internal |
| 151 | 151 | */ |
| 152 | - private function _loadScripts( $sStructureType='' ) { |
|
| 152 | + private function _loadScripts( $sStructureType = '' ) { |
|
| 153 | 153 | |
| 154 | - if ( 'widget' === $sStructureType && ! self::$_bIsLoadedJSScripts_Widget ) { |
|
| 154 | + if ( 'widget' === $sStructureType && !self::$_bIsLoadedJSScripts_Widget ) { |
|
| 155 | 155 | new AdminPageFramework_Form_View___Script_Widget; |
| 156 | 156 | self::$_bIsLoadedJSScripts_Widget = true; |
| 157 | 157 | } |
@@ -176,8 +176,8 @@ discard block |
||
| 176 | 176 | */ |
| 177 | 177 | protected function _getRepeaterFieldEnablerScript( $sFieldsContainerID, $iFieldCount, $aSettings ) { |
| 178 | 178 | |
| 179 | - $_sSmallButtons = '"' . $this->___getRepeatableButtonHTML( $sFieldsContainerID, ( array ) $aSettings, $iFieldCount, true ) . '"'; |
|
| 180 | - $_sNestedFieldsButtons = '"' . $this->___getRepeatableButtonHTML( $sFieldsContainerID, ( array ) $aSettings, $iFieldCount, false ) . '"'; |
|
| 179 | + $_sSmallButtons = '"'.$this->___getRepeatableButtonHTML( $sFieldsContainerID, ( array ) $aSettings, $iFieldCount, true ).'"'; |
|
| 180 | + $_sNestedFieldsButtons = '"'.$this->___getRepeatableButtonHTML( $sFieldsContainerID, ( array ) $aSettings, $iFieldCount, false ).'"'; |
|
| 181 | 181 | $_aJSArray = json_encode( $aSettings ); |
| 182 | 182 | $_sScript = <<<JAVASCRIPTS |
| 183 | 183 | jQuery( document ).ready( function() { |
@@ -223,36 +223,36 @@ discard block |
||
| 223 | 223 | * @since 3.8.0 |
| 224 | 224 | * @return string |
| 225 | 225 | */ |
| 226 | - private function ___getRepeatableButtonHTML( $sFieldsContainerID, array $aArguments, $iFieldCount, $bSmall=true ) { |
|
| 226 | + private function ___getRepeatableButtonHTML( $sFieldsContainerID, array $aArguments, $iFieldCount, $bSmall = true ) { |
|
| 227 | 227 | |
| 228 | 228 | // @todo Move this formatting routine to the field-set formatter class. |
| 229 | 229 | $_oFormatter = new AdminPageFramework_Form_Model___Format_RepeatableField( $aArguments, $this->oMsg ); |
| 230 | 230 | $_aArguments = $_oFormatter->get(); |
| 231 | 231 | $_sSmallButtonSelector = $bSmall ? ' button-small' : ''; |
| 232 | 232 | if ( version_compare( $GLOBALS[ 'wp_version' ], '5.3', '>=' ) ) { |
| 233 | - return "<div " . $this->___getContainerAttributes( $_aArguments ) . " >" |
|
| 234 | - . "<a " . $this->___getRemoveButtonAttributes( $sFieldsContainerID, $_sSmallButtonSelector, $iFieldCount ) . ">" |
|
| 233 | + return "<div ".$this->___getContainerAttributes( $_aArguments )." >" |
|
| 234 | + . "<a ".$this->___getRemoveButtonAttributes( $sFieldsContainerID, $_sSmallButtonSelector, $iFieldCount ).">" |
|
| 235 | 235 | . "<span class='dashicons dashicons-minus'></span>" |
| 236 | 236 | . "</a>" |
| 237 | - . "<a " . $this->___getAddButtonAttribtes( $_aArguments, $sFieldsContainerID, $_sSmallButtonSelector ) . ">" |
|
| 237 | + . "<a ".$this->___getAddButtonAttribtes( $_aArguments, $sFieldsContainerID, $_sSmallButtonSelector ).">" |
|
| 238 | 238 | . "<span class='dashicons dashicons-plus-alt2'></span>" |
| 239 | 239 | ."</a>" |
| 240 | 240 | . "</div>" |
| 241 | 241 | . $this->getModalForDisabledRepeatableElement( |
| 242 | - 'repeatable_field_disabled_' . $sFieldsContainerID, |
|
| 242 | + 'repeatable_field_disabled_'.$sFieldsContainerID, |
|
| 243 | 243 | $_aArguments[ 'disabled' ] |
| 244 | 244 | ); |
| 245 | 245 | } |
| 246 | - return "<div " . $this->___getContainerAttributes( $_aArguments ) . " >" |
|
| 247 | - . "<a " . $this->___getRemoveButtonAttributes( $sFieldsContainerID, $_sSmallButtonSelector, $iFieldCount ) . ">" |
|
| 246 | + return "<div ".$this->___getContainerAttributes( $_aArguments )." >" |
|
| 247 | + . "<a ".$this->___getRemoveButtonAttributes( $sFieldsContainerID, $_sSmallButtonSelector, $iFieldCount ).">" |
|
| 248 | 248 | . "-" |
| 249 | 249 | . "</a>" |
| 250 | - . "<a " . $this->___getAddButtonAttribtes( $_aArguments, $sFieldsContainerID, $_sSmallButtonSelector ) . ">" |
|
| 250 | + . "<a ".$this->___getAddButtonAttribtes( $_aArguments, $sFieldsContainerID, $_sSmallButtonSelector ).">" |
|
| 251 | 251 | . "+" |
| 252 | 252 | ."</a>" |
| 253 | 253 | . "</div>" |
| 254 | 254 | . $this->getModalForDisabledRepeatableElement( |
| 255 | - 'repeatable_field_disabled_' . $sFieldsContainerID, |
|
| 255 | + 'repeatable_field_disabled_'.$sFieldsContainerID, |
|
| 256 | 256 | $_aArguments[ 'disabled' ] |
| 257 | 257 | ); |
| 258 | 258 | |
@@ -271,9 +271,9 @@ discard block |
||
| 271 | 271 | 'data-id' => $sFieldsContainerID, |
| 272 | 272 | 'href' => empty( $aArguments[ 'disabled' ] ) |
| 273 | 273 | ? null |
| 274 | - : '#TB_inline?width=' . $aArguments[ 'disabled' ][ 'box_width' ] |
|
| 275 | - . '&height=' . $aArguments[ 'disabled' ][ 'box_height' ] |
|
| 276 | - . '&inlineId=' . 'repeatable_field_disabled_' . $sFieldsContainerID, |
|
| 274 | + : '#TB_inline?width='.$aArguments[ 'disabled' ][ 'box_width' ] |
|
| 275 | + . '&height='.$aArguments[ 'disabled' ][ 'box_height' ] |
|
| 276 | + . '&inlineId='.'repeatable_field_disabled_'.$sFieldsContainerID, |
|
| 277 | 277 | ); |
| 278 | 278 | return $this->getAttributes( $_sPlusButtonAttributes ); |
| 279 | 279 | } |
@@ -300,10 +300,10 @@ discard block |
||
| 300 | 300 | * @return string |
| 301 | 301 | */ |
| 302 | 302 | private function ___getContainerAttributes( $aArguments ) { |
| 303 | - $_aContainerAttributes = array( |
|
| 303 | + $_aContainerAttributes = array( |
|
| 304 | 304 | 'class' => $this->getClassAttribute( |
| 305 | 305 | 'admin-page-framework-repeatable-field-buttons', |
| 306 | - ! empty( $aArguments[ 'disabled' ] ) |
|
| 306 | + !empty( $aArguments[ 'disabled' ] ) |
|
| 307 | 307 | ? 'disabled' |
| 308 | 308 | : '' |
| 309 | 309 | ), |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | unset( $aArguments[ 'disabled' ] ); |
| 317 | 317 | } |
| 318 | 318 | return $this->getAttributes( $_aContainerAttributes ) |
| 319 | - . ' ' . $this->getDataAttributes( $aArguments ); |
|
| 319 | + . ' '.$this->getDataAttributes( $aArguments ); |
|
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | /** |
@@ -93,8 +93,8 @@ |
||
| 93 | 93 | |
| 94 | 94 | // Extract the first part as it does not have braces |
| 95 | 95 | $_sName = array_shift( $aParts ); |
| 96 | - foreach( $aParts as $_sPart ) { |
|
| 97 | - $_sName .= '[' . $_sPart . ']'; |
|
| 96 | + foreach ( $aParts as $_sPart ) { |
|
| 97 | + $_sName .= '['.$_sPart.']'; |
|
| 98 | 98 | } |
| 99 | 99 | return $_sName; |
| 100 | 100 | |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | * Represents the structure of the sub-field definition array. |
| 25 | 25 | */ |
| 26 | 26 | static public $aStructure = array( |
| 27 | - '_is_sub_field' => false, // @todo change this key name as all the parsed field is technically a sub-field. |
|
| 28 | - '_index' => 0, // indicates the field index |
|
| 27 | + '_is_sub_field' => false, // @todo change this key name as all the parsed field is technically a sub-field. |
|
| 28 | + '_index' => 0, // indicates the field index |
|
| 29 | 29 | '_is_multiple_fields' => false, |
| 30 | 30 | '_saved_value' => null, |
| 31 | 31 | '_is_value_set_by_user' => false, |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | '_fields_container_id' => '', |
| 40 | 40 | '_fieldset_container_id' => '', |
| 41 | 41 | |
| 42 | - '_field_object' => null, // 3.6.0+ |
|
| 43 | - '_parent_field_object' => null, // 3.6.0+ Stores the parent field object to be accessed from the nested fields to generate id and name attribute models. |
|
| 42 | + '_field_object' => null, // 3.6.0+ |
|
| 43 | + '_parent_field_object' => null, // 3.6.0+ Stores the parent field object to be accessed from the nested fields to generate id and name attribute models. |
|
| 44 | 44 | ); |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | $_aField = $this->aField + self::$aStructure; |
| 89 | 89 | |
| 90 | - $_aField[ '_is_sub_field' ] = is_numeric( $this->isIndex ) && 0 < $this->isIndex; // 3.5.3+ |
|
| 90 | + $_aField[ '_is_sub_field' ] = is_numeric( $this->isIndex ) && 0 < $this->isIndex; // 3.5.3+ |
|
| 91 | 91 | $_aField[ '_index' ] = $this->isIndex; |
| 92 | 92 | |
| 93 | 93 | // 'input_id' - something like ({section id}_){field_id}__{index} e.g. my_section_id_my_field_id__0 |
@@ -134,8 +134,8 @@ discard block |
||
| 134 | 134 | 'value' => $_aField[ 'value' ], |
| 135 | 135 | 'type' => $_aField[ 'type' ], // text, password, etc. |
| 136 | 136 | 'disabled' => null, |
| 137 | - 'data-id_model' => $_aField[ '_input_id_model' ], // 3.3.1+ |
|
| 138 | - 'data-name_model' => $_aField[ '_input_name_model' ], // 3.3.1+ |
|
| 137 | + 'data-id_model' => $_aField[ '_input_id_model' ], // 3.3.1+ |
|
| 138 | + 'data-name_model' => $_aField[ '_input_name_model' ], // 3.3.1+ |
|
| 139 | 139 | ) |
| 140 | 140 | ), |
| 141 | 141 | // this allows sub-fields with different field types to set the default key-values for the sub-field. |
@@ -33,23 +33,23 @@ discard block |
||
| 33 | 33 | * @internal |
| 34 | 34 | */ |
| 35 | 35 | static public $aStructure = array( |
| 36 | - '_section_index' => null, // 3.0.0+ - internally set to indicate the section index for repeatable sections. |
|
| 36 | + '_section_index' => null, // 3.0.0+ - internally set to indicate the section index for repeatable sections. |
|
| 37 | 37 | |
| 38 | 38 | 'tag_id' => null, |
| 39 | - '_tag_id_model' => '', // 3.6.0+ |
|
| 39 | + '_tag_id_model' => '', // 3.6.0+ |
|
| 40 | 40 | |
| 41 | - '_field_name' => '', // 3.6.0+ |
|
| 42 | - '_field_name_model' => '', // 3.6.0+ |
|
| 41 | + '_field_name' => '', // 3.6.0+ |
|
| 42 | + '_field_name_model' => '', // 3.6.0+ |
|
| 43 | 43 | |
| 44 | - '_field_name_flat' => '', // 3.6.0+ |
|
| 45 | - '_field_name_flat_model' => '', // 3.6.0+ |
|
| 44 | + '_field_name_flat' => '', // 3.6.0+ |
|
| 45 | + '_field_name_flat_model' => '', // 3.6.0+ |
|
| 46 | 46 | |
| 47 | - '_field_address' => '', // 3.6.0+ |
|
| 48 | - '_field_address_model' => '', // 3.6.0+ |
|
| 47 | + '_field_address' => '', // 3.6.0+ |
|
| 48 | + '_field_address_model' => '', // 3.6.0+ |
|
| 49 | 49 | |
| 50 | - '_parent_field_object' => null, // 3.6.0+ Assigned when a field creates a nested field. |
|
| 50 | + '_parent_field_object' => null, // 3.6.0+ Assigned when a field creates a nested field. |
|
| 51 | 51 | |
| 52 | - '_parent_tag_id' => null, // 3.8.0+ Set outside the class. |
|
| 52 | + '_parent_tag_id' => null, // 3.8.0+ Set outside the class. |
|
| 53 | 53 | |
| 54 | 54 | ); |
| 55 | 55 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $_aFieldset = $this->aFieldset + self::$aStructure; |
| 93 | 93 | |
| 94 | 94 | // The section index must be set before generating a field tag id as it uses a section index. |
| 95 | - $_aFieldset[ '_section_index' ] = $this->iSectionIndex; |
|
| 95 | + $_aFieldset[ '_section_index' ] = $this->iSectionIndex; |
|
| 96 | 96 | $_oFieldTagIDGenerator = new AdminPageFramework_Form_View___Generate_FieldTagID( |
| 97 | 97 | $_aFieldset, |
| 98 | 98 | $_aFieldset[ '_caller_object' ]->aCallbacks[ 'hfTagID' ] |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | // 3.8.0+ Format nested fieldsets. |
| 128 | 128 | if ( $this->hasFieldDefinitionsInContent( $_aFieldset ) ) { |
| 129 | - foreach( $_aFieldset[ 'content' ] as &$_aNestedFieldset ) { |
|
| 129 | + foreach ( $_aFieldset[ 'content' ] as &$_aNestedFieldset ) { |
|
| 130 | 130 | // The inline-mixed type has a string element. |
| 131 | 131 | if ( is_scalar( $_aNestedFieldset ) ) { |
| 132 | 132 | continue; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | 'is_recursive' => true, |
| 67 | 67 | 'exclude_dir_paths' => array(), |
| 68 | 68 | 'exclude_dir_names' => array( 'asset', 'assets', 'css', 'js', 'image', 'images', 'license', 'document', 'documents' ), |
| 69 | - 'allowed_extensions' => array( 'php', ), // 'inc' |
|
| 69 | + 'allowed_extensions' => array( 'php',), // 'inc' |
|
| 70 | 70 | 'include_function' => 'include', |
| 71 | 71 | 'exclude_class_names' => array( /* 'SomeClass', 'SomeOtherClass' */ ), |
| 72 | 72 | ); |
@@ -105,10 +105,10 @@ discard block |
||
| 105 | 105 | * |
| 106 | 106 | * @remark The directory paths set for the 'exclude_dir_paths' option should use the system directory separator. |
| 107 | 107 | */ |
| 108 | - public function __construct( $asScanDirPaths, array $aOptions=array(), array $aClasses=array() ) { |
|
| 108 | + public function __construct( $asScanDirPaths, array $aOptions = array(), array $aClasses = array() ) { |
|
| 109 | 109 | |
| 110 | 110 | $_aOptions = $aOptions + self::$_aStructure_Options; |
| 111 | - $this->_aClasses = $aClasses + $this->_getClassArray( $asScanDirPaths, $_aOptions ); |
|
| 111 | + $this->_aClasses = $aClasses + $this->_getClassArray( $asScanDirPaths, $_aOptions ); |
|
| 112 | 112 | $this->_registerClasses( $_aOptions[ 'include_function' ] ); |
| 113 | 113 | |
| 114 | 114 | } |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | return array(); |
| 135 | 135 | } |
| 136 | 136 | $_aFilePaths = array(); |
| 137 | - foreach( ( array ) $asScanDirPaths as $_sClassDirPath ) { |
|
| 137 | + foreach ( ( array ) $asScanDirPaths as $_sClassDirPath ) { |
|
| 138 | 138 | if ( realpath( $_sClassDirPath ) ) { |
| 139 | 139 | $_aFilePaths = array_merge( $this->getFilePaths( $_sClassDirPath, $aSearchOptions ), $_aFilePaths ); |
| 140 | 140 | } |
@@ -142,11 +142,11 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | // Store classes in an array. |
| 144 | 144 | $_aClasses = array(); |
| 145 | - foreach( $_aFilePaths as $_sFilePath ) { |
|
| 145 | + foreach ( $_aFilePaths as $_sFilePath ) { |
|
| 146 | 146 | |
| 147 | 147 | // Class name without a file extension. |
| 148 | 148 | $_sClassNameWOExt = pathinfo( $_sFilePath, PATHINFO_FILENAME ); |
| 149 | - if ( in_array( $_sClassNameWOExt, $aSearchOptions['exclude_class_names'] ) ) { |
|
| 149 | + if ( in_array( $_sClassNameWOExt, $aSearchOptions[ 'exclude_class_names' ] ) ) { |
|
| 150 | 150 | continue; |
| 151 | 151 | } |
| 152 | 152 | $_aClasses[ $_sClassNameWOExt ] = $_sFilePath; |
@@ -176,26 +176,26 @@ discard block |
||
| 176 | 176 | */ |
| 177 | 177 | protected function getFilePaths( $sClassDirPath, array $aSearchOptions ) { |
| 178 | 178 | |
| 179 | - $sClassDirPath = rtrim( $sClassDirPath, '\\/' ) . DIRECTORY_SEPARATOR; // ensures the trailing (back/)slash exists. |
|
| 180 | - $_aAllowedExtensions = $aSearchOptions['allowed_extensions']; |
|
| 181 | - $_aExcludeDirPaths = ( array ) $aSearchOptions['exclude_dir_paths']; |
|
| 182 | - $_aExcludeDirNames = ( array ) $aSearchOptions['exclude_dir_names']; |
|
| 179 | + $sClassDirPath = rtrim( $sClassDirPath, '\\/' ).DIRECTORY_SEPARATOR; // ensures the trailing (back/)slash exists. |
|
| 180 | + $_aAllowedExtensions = $aSearchOptions[ 'allowed_extensions' ]; |
|
| 181 | + $_aExcludeDirPaths = ( array ) $aSearchOptions[ 'exclude_dir_paths' ]; |
|
| 182 | + $_aExcludeDirNames = ( array ) $aSearchOptions[ 'exclude_dir_names' ]; |
|
| 183 | 183 | $_bIsRecursive = $aSearchOptions[ 'is_recursive' ]; |
| 184 | 184 | |
| 185 | 185 | if ( defined( 'GLOB_BRACE' ) ) { // in some OSes this flag constant is not available. |
| 186 | 186 | $_aFilePaths = $_bIsRecursive |
| 187 | - ? $this->doRecursiveGlob( $sClassDirPath . '*.' . $this->_getGlobPatternExtensionPart( $_aAllowedExtensions ), GLOB_BRACE, $_aExcludeDirPaths, $_aExcludeDirNames ) |
|
| 188 | - : ( array ) glob( $sClassDirPath . '*.' . $this->_getGlobPatternExtensionPart( $_aAllowedExtensions ), GLOB_BRACE ); |
|
| 187 | + ? $this->doRecursiveGlob( $sClassDirPath.'*.'.$this->_getGlobPatternExtensionPart( $_aAllowedExtensions ), GLOB_BRACE, $_aExcludeDirPaths, $_aExcludeDirNames ) |
|
| 188 | + : ( array ) glob( $sClassDirPath.'*.'.$this->_getGlobPatternExtensionPart( $_aAllowedExtensions ), GLOB_BRACE ); |
|
| 189 | 189 | return array_filter( $_aFilePaths ); // drop non-value elements. |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | // For the Solaris operation system. |
| 193 | 193 | $_aFilePaths = array(); |
| 194 | - foreach( $_aAllowedExtensions as $__sAllowedExtension ) { |
|
| 194 | + foreach ( $_aAllowedExtensions as $__sAllowedExtension ) { |
|
| 195 | 195 | |
| 196 | 196 | $__aFilePaths = $_bIsRecursive |
| 197 | - ? $this->doRecursiveGlob( $sClassDirPath . '*.' . $__sAllowedExtension, 0, $_aExcludeDirPaths, $_aExcludeDirNames ) |
|
| 198 | - : ( array ) glob( $sClassDirPath . '*.' . $__sAllowedExtension ); |
|
| 197 | + ? $this->doRecursiveGlob( $sClassDirPath.'*.'.$__sAllowedExtension, 0, $_aExcludeDirPaths, $_aExcludeDirNames ) |
|
| 198 | + : ( array ) glob( $sClassDirPath.'*.'.$__sAllowedExtension ); |
|
| 199 | 199 | |
| 200 | 200 | $_aFilePaths = array_merge( $__aFilePaths, $_aFilePaths ); |
| 201 | 201 | |
@@ -208,28 +208,28 @@ discard block |
||
| 208 | 208 | * Constructs the file pattern of the file extension part used for the glob() function with the given file extensions. |
| 209 | 209 | * @internal |
| 210 | 210 | */ |
| 211 | - protected function _getGlobPatternExtensionPart( array $aExtensions=array( 'php', 'inc' ) ) { |
|
| 211 | + protected function _getGlobPatternExtensionPart( array $aExtensions = array( 'php', 'inc' ) ) { |
|
| 212 | 212 | return empty( $aExtensions ) |
| 213 | 213 | ? '*' |
| 214 | - : '{' . implode( ',', $aExtensions ) . '}'; |
|
| 214 | + : '{'.implode( ',', $aExtensions ).'}'; |
|
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | /** |
| 218 | 218 | * The recursive version of the glob() function. |
| 219 | 219 | * @internal |
| 220 | 220 | */ |
| 221 | - protected function doRecursiveGlob( $sPathPatten, $nFlags=0, array $aExcludeDirs=array(), array $aExcludeDirNames=array() ) { |
|
| 221 | + protected function doRecursiveGlob( $sPathPatten, $nFlags = 0, array $aExcludeDirs = array(), array $aExcludeDirNames = array() ) { |
|
| 222 | 222 | |
| 223 | 223 | $_aFiles = glob( $sPathPatten, $nFlags ); |
| 224 | 224 | $_aFiles = is_array( $_aFiles ) ? $_aFiles : array(); // glob() can return false. |
| 225 | - $_aDirs = glob( dirname( $sPathPatten ) . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR|GLOB_NOSORT ); |
|
| 225 | + $_aDirs = glob( dirname( $sPathPatten ).DIRECTORY_SEPARATOR.'*', GLOB_ONLYDIR | GLOB_NOSORT ); |
|
| 226 | 226 | $_aDirs = is_array( $_aDirs ) ? $_aDirs : array(); |
| 227 | 227 | foreach ( $_aDirs as $_sDirPath ) { |
| 228 | 228 | |
| 229 | 229 | if ( in_array( $_sDirPath, $aExcludeDirs ) ) { continue; } |
| 230 | 230 | if ( in_array( pathinfo( $_sDirPath, PATHINFO_DIRNAME ), $aExcludeDirNames ) ) { continue; } |
| 231 | 231 | |
| 232 | - $_aFiles = array_merge( $_aFiles, $this->doRecursiveGlob( $_sDirPath . DIRECTORY_SEPARATOR . basename( $sPathPatten ), $nFlags, $aExcludeDirs ) ); |
|
| 232 | + $_aFiles = array_merge( $_aFiles, $this->doRecursiveGlob( $_sDirPath.DIRECTORY_SEPARATOR.basename( $sPathPatten ), $nFlags, $aExcludeDirs ) ); |
|
| 233 | 233 | |
| 234 | 234 | } |
| 235 | 235 | return $_aFiles; |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | * @return void |
| 245 | 245 | */ |
| 246 | 246 | protected function _registerClasses( $sIncludeFunction ) { |
| 247 | - spl_autoload_register( array( $this, '_replyToAutoLoad_' . $sIncludeFunction ) ); |
|
| 247 | + spl_autoload_register( array( $this, '_replyToAutoLoad_'.$sIncludeFunction ) ); |
|
| 248 | 248 | } |
| 249 | 249 | /**#@+ |
| 250 | 250 | * Responds to the PHP auto-loader and includes the passed class based on the previously stored path associated with the class name in the constructor. |
@@ -252,25 +252,25 @@ discard block |
||
| 252 | 252 | * @return void |
| 253 | 253 | */ |
| 254 | 254 | public function _replyToAutoLoad_include( $sCalledUnknownClassName ) { |
| 255 | - if ( ! isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 255 | + if ( !isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 256 | 256 | return; |
| 257 | 257 | } |
| 258 | 258 | include( $this->_aClasses[ $sCalledUnknownClassName ] ); |
| 259 | 259 | } |
| 260 | 260 | public function _replyToAutoLoad_include_once( $sCalledUnknownClassName ) { |
| 261 | - if ( ! isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 261 | + if ( !isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 262 | 262 | return; |
| 263 | 263 | } |
| 264 | 264 | include_once( $this->_aClasses[ $sCalledUnknownClassName ] ); |
| 265 | 265 | } |
| 266 | 266 | public function _replyToAutoLoad_require( $sCalledUnknownClassName ) { |
| 267 | - if ( ! isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 267 | + if ( !isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 268 | 268 | return; |
| 269 | 269 | } |
| 270 | 270 | require( $this->_aClasses[ $sCalledUnknownClassName ] ); |
| 271 | 271 | } |
| 272 | 272 | public function _replyToAutoLoad_require_once( $sCalledUnknownClassName ) { |
| 273 | - if ( ! isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 273 | + if ( !isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 274 | 274 | return; |
| 275 | 275 | } |
| 276 | 276 | require_once( $this->_aClasses[ $sCalledUnknownClassName ] ); |
@@ -181,7 +181,8 @@ discard block |
||
| 181 | 181 | $_aExcludeDirNames = ( array ) $aSearchOptions['exclude_dir_names']; |
| 182 | 182 | $_bIsRecursive = $aSearchOptions[ 'is_recursive' ]; |
| 183 | 183 | |
| 184 | - if ( defined( 'GLOB_BRACE' ) ) { // in some OSes this flag constant is not available. |
|
| 184 | + if ( defined( 'GLOB_BRACE' ) ) { |
|
| 185 | +// in some OSes this flag constant is not available. |
|
| 185 | 186 | $_aFilePaths = $_bIsRecursive |
| 186 | 187 | ? $this->doRecursiveGlob( $sClassDirPath . '*.' . $this->_getGlobPatternExtensionPart( $_aAllowedExtensions ), GLOB_BRACE, $_aExcludeDirPaths, $_aExcludeDirNames ) |
| 187 | 188 | : ( array ) glob( $sClassDirPath . '*.' . $this->_getGlobPatternExtensionPart( $_aAllowedExtensions ), GLOB_BRACE ); |
@@ -250,26 +251,26 @@ discard block |
||
| 250 | 251 | * @internal |
| 251 | 252 | * @return void |
| 252 | 253 | */ |
| 253 | - public function _replyToAutoLoad_include( $sCalledUnknownClassName ) { |
|
| 254 | - if ( ! isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 254 | + public function _replyToAutoLoad_include( $sCalledUnknownClassName ) { |
|
| 255 | + if ( ! isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 255 | 256 | return; |
| 256 | 257 | } |
| 257 | 258 | include( $this->_aClasses[ $sCalledUnknownClassName ] ); |
| 258 | 259 | } |
| 259 | - public function _replyToAutoLoad_include_once( $sCalledUnknownClassName ) { |
|
| 260 | - if ( ! isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 260 | + public function _replyToAutoLoad_include_once( $sCalledUnknownClassName ) { |
|
| 261 | + if ( ! isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 261 | 262 | return; |
| 262 | 263 | } |
| 263 | 264 | include_once( $this->_aClasses[ $sCalledUnknownClassName ] ); |
| 264 | 265 | } |
| 265 | - public function _replyToAutoLoad_require( $sCalledUnknownClassName ) { |
|
| 266 | - if ( ! isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 266 | + public function _replyToAutoLoad_require( $sCalledUnknownClassName ) { |
|
| 267 | + if ( ! isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 267 | 268 | return; |
| 268 | 269 | } |
| 269 | 270 | require( $this->_aClasses[ $sCalledUnknownClassName ] ); |
| 270 | 271 | } |
| 271 | - public function _replyToAutoLoad_require_once( $sCalledUnknownClassName ) { |
|
| 272 | - if ( ! isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 272 | + public function _replyToAutoLoad_require_once( $sCalledUnknownClassName ) { |
|
| 273 | + if ( ! isset( $this->_aClasses[ $sCalledUnknownClassName ] ) ) { |
|
| 273 | 274 | return; |
| 274 | 275 | } |
| 275 | 276 | require_once( $this->_aClasses[ $sCalledUnknownClassName ] ); |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility { |
| 21 | 21 | |
| 22 | - public $sStructureType = ''; |
|
| 22 | + public $sStructureType = ''; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * @since 3.8.5 |
@@ -57,12 +57,12 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function get() { |
| 59 | 59 | |
| 60 | - if ( ! $this->_shouldProceed() ) { |
|
| 60 | + if ( !$this->_shouldProceed() ) { |
|
| 61 | 61 | return ''; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | return "<div class='admin-page-framework-info'>" |
| 65 | - . $this->oMsg->get( 'debug_info' ) . ': ' |
|
| 65 | + . $this->oMsg->get( 'debug_info' ).': ' |
|
| 66 | 66 | . $this->getFrameworkNameVersion() |
| 67 | 67 | . "</div>"; |
| 68 | 68 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | private function _shouldProceed() { |
| 75 | 75 | |
| 76 | - if ( ! $this->callBack( $this->aCallbacks[ 'show_debug_info' ], true ) ) { |
|
| 76 | + if ( !$this->callBack( $this->aCallbacks[ 'show_debug_info' ], true ) ) { |
|
| 77 | 77 | return false; |
| 78 | 78 | } |
| 79 | 79 | // For the generic admin pages, do no show debug information for each section. |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * @extends AdminPageFramework_FrameworkUtility |
| 17 | 17 | * @internal |
| 18 | 18 | */ |
| 19 | -class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility { |
|
| 19 | +class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility { |
|
| 20 | 20 | |
| 21 | 21 | public $sStructureType = ''; |
| 22 | 22 | |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * @package AdminPageFramework |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | -if ( ! class_exists( 'AdminPageFramework_Registry', false ) ) : |
|
| 13 | +if ( !class_exists( 'AdminPageFramework_Registry', false ) ) : |
|
| 14 | 14 | /** |
| 15 | 15 | * Facilitates WordPress plugin and theme development. |
| 16 | 16 | * |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | final class AdminPageFramework_Registry extends AdminPageFramework_Registry_Base { |
| 62 | 62 | |
| 63 | 63 | const TEXT_DOMAIN = 'admin-page-framework'; |
| 64 | - const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
| 64 | + const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * Indicates whether the framework is loaded from the minified version or not. |
@@ -103,11 +103,11 @@ discard block |
||
| 103 | 103 | * Sets up static properties. |
| 104 | 104 | * @return void |
| 105 | 105 | */ |
| 106 | - static public function setUp( $sFilePath=__FILE__ ) { |
|
| 106 | + static public function setUp( $sFilePath = __FILE__ ) { |
|
| 107 | 107 | |
| 108 | 108 | self::$sFilePath = $sFilePath; |
| 109 | 109 | self::$sDirPath = dirname( self::$sFilePath ); |
| 110 | - self::$sIncludeClassListPath = self::$sDirPath . '/admin-page-framework-include-class-list.php'; |
|
| 110 | + self::$sIncludeClassListPath = self::$sDirPath.'/admin-page-framework-include-class-list.php'; |
|
| 111 | 111 | self::$aClassFiles = self::_getClassFilePathList( self::$sIncludeClassListPath ); |
| 112 | 112 | self::$sAutoLoaderPath = isset( self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] ) |
| 113 | 113 | ? self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * @return array |
| 123 | 123 | */ |
| 124 | 124 | static private function _getClassFilePathList( $sInclusionClassListPath ) { |
| 125 | - $aClassFiles = array(); // this will be updated if the inclusion below is successful. |
|
| 125 | + $aClassFiles = array(); // this will be updated if the inclusion below is successful. |
|
| 126 | 126 | include( $sInclusionClassListPath ); |
| 127 | 127 | return $aClassFiles; |
| 128 | 128 | } |
@@ -135,11 +135,11 @@ discard block |
||
| 135 | 135 | */ |
| 136 | 136 | static public function getVersion() { |
| 137 | 137 | |
| 138 | - if ( ! isset( self::$sAutoLoaderPath ) ) { |
|
| 139 | - trigger_error( self::NAME . ': ' . ' : ' . sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
| 138 | + if ( !isset( self::$sAutoLoaderPath ) ) { |
|
| 139 | + trigger_error( self::NAME.': '.' : '.sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
| 140 | 140 | return self::VERSION; |
| 141 | 141 | } |
| 142 | - $_aMinifiedVesionSuffix = array( |
|
| 142 | + $_aMinifiedVesionSuffix = array( |
|
| 143 | 143 | 0 => '', |
| 144 | 144 | 1 => '.min', |
| 145 | 145 | ); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | endif; |
| 170 | 170 | |
| 171 | -if ( ! class_exists( 'AdminPageFramework_Bootstrap', false ) ) : |
|
| 171 | +if ( !class_exists( 'AdminPageFramework_Bootstrap', false ) ) : |
|
| 172 | 172 | /** |
| 173 | 173 | * Loads the Admin Page Framework library. |
| 174 | 174 | * |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | */ |
| 190 | 190 | public function __construct( $sLibraryPath ) { |
| 191 | 191 | |
| 192 | - if ( ! $this->_isLoadable() ) { |
|
| 192 | + if ( !$this->_isLoadable() ) { |
|
| 193 | 193 | return; |
| 194 | 194 | } |
| 195 | 195 | |
@@ -218,8 +218,8 @@ |
||
| 218 | 218 | * @remark $_aDefaultKeys holds shared default key-values defined in the base class. |
| 219 | 219 | */ |
| 220 | 220 | protected $aDefaultKeys = array( |
| 221 | - 'label_min_width' => '', // disabled as the embedded elements are all inline. |
|
| 222 | - 'show_debug_info' => false, // 3.8.8+ @todo Examine why this value does not override the default value of field definition arguments and if possible and appropriate, override it. |
|
| 221 | + 'label_min_width' => '', // disabled as the embedded elements are all inline. |
|
| 222 | + 'show_debug_info' => false, // 3.8.8+ @todo Examine why this value does not override the default value of field definition arguments and if possible and appropriate, override it. |
|
| 223 | 223 | ); |
| 224 | 224 | |
| 225 | 225 | |
@@ -250,20 +250,20 @@ |
||
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | /** |
| 253 | - * Adds the given link into the menu on the left sidebar of the administration panel. |
|
| 254 | - * |
|
| 255 | - * @since 2.0.0 |
|
| 256 | - * @since 3.0.0 Changed the scope to public from protected. |
|
| 257 | - * @since 3.5.0 Changed the scope to public as it was still protected. |
|
| 258 | - * @param string the menu title. |
|
| 259 | - * @param string the URL linked to the menu. |
|
| 260 | - * @param string (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>. |
|
| 261 | - * @param string (optional) the order number. The larger it is, the lower the position it gets. |
|
| 262 | - * @param string (optional) if set to false, the menu title will not be listed in the tab navigation menu at the top of the page. |
|
| 263 | - * @access public |
|
| 264 | - * @return void |
|
| 265 | - * @internal |
|
| 266 | - */ |
|
| 253 | + * Adds the given link into the menu on the left sidebar of the administration panel. |
|
| 254 | + * |
|
| 255 | + * @since 2.0.0 |
|
| 256 | + * @since 3.0.0 Changed the scope to public from protected. |
|
| 257 | + * @since 3.5.0 Changed the scope to public as it was still protected. |
|
| 258 | + * @param string the menu title. |
|
| 259 | + * @param string the URL linked to the menu. |
|
| 260 | + * @param string (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>. |
|
| 261 | + * @param string (optional) the order number. The larger it is, the lower the position it gets. |
|
| 262 | + * @param string (optional) if set to false, the menu title will not be listed in the tab navigation menu at the top of the page. |
|
| 263 | + * @access public |
|
| 264 | + * @return void |
|
| 265 | + * @internal |
|
| 266 | + */ |
|
| 267 | 267 | public function addSubMenuLink( array $aSubMenuLink ) { |
| 268 | 268 | |
| 269 | 269 | // If required keys are not set, return. |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * @param string (optional) the position number that is passed to the <var>$position</var> parameter of the <a href="http://codex.wordpress.org/Function_Reference/add_menu_page">add_menu_page()</a> function. |
| 77 | 77 | * @return void |
| 78 | 78 | */ |
| 79 | - public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16=null, $iMenuPosition=null ) { |
|
| 79 | + public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16 = null, $iMenuPosition = null ) { |
|
| 80 | 80 | |
| 81 | 81 | $sRootMenuLabel = trim( $sRootMenuLabel ); |
| 82 | 82 | $_sSlug = $this->_isBuiltInMenuItem( $sRootMenuLabel ); // if true, this method returns the slug |
@@ -267,16 +267,16 @@ discard block |
||
| 267 | 267 | public function addSubMenuLink( array $aSubMenuLink ) { |
| 268 | 268 | |
| 269 | 269 | // If required keys are not set, return. |
| 270 | - if ( ! isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { |
|
| 270 | + if ( !isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { |
|
| 271 | 271 | return; |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | // If the set URL is not valid, return. |
| 275 | - if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
| 275 | + if ( !filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
| 276 | 276 | return; |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | - $_oFormatter = new AdminPageFramework_Format_SubMenuLink( |
|
| 279 | + $_oFormatter = new AdminPageFramework_Format_SubMenuLink( |
|
| 280 | 280 | $aSubMenuLink, |
| 281 | 281 | $this, |
| 282 | 282 | count( $this->oProp->aPages ) + 1 |
@@ -334,11 +334,11 @@ discard block |
||
| 334 | 334 | */ |
| 335 | 335 | public function addSubMenuPage( array $aSubMenuPage ) { |
| 336 | 336 | |
| 337 | - if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
| 337 | + if ( !isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
| 338 | 338 | return; |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | - $_oFormatter = new AdminPageFramework_Format_SubMenuPage( |
|
| 341 | + $_oFormatter = new AdminPageFramework_Format_SubMenuPage( |
|
| 342 | 342 | $aSubMenuPage, |
| 343 | 343 | $this, |
| 344 | 344 | count( $this->oProp->aPages ) + 1 |
@@ -267,12 +267,12 @@ discard block |
||
| 267 | 267 | public function addSubMenuLink( array $aSubMenuLink ) { |
| 268 | 268 | |
| 269 | 269 | // If required keys are not set, return. |
| 270 | - if ( ! isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { |
|
| 270 | + if ( ! isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { |
|
| 271 | 271 | return; |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | // If the set URL is not valid, return. |
| 275 | - if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
| 275 | + if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
| 276 | 276 | return; |
| 277 | 277 | } |
| 278 | 278 | |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | */ |
| 335 | 335 | public function addSubMenuPage( array $aSubMenuPage ) { |
| 336 | 336 | |
| 337 | - if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
| 337 | + if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
| 338 | 338 | return; |
| 339 | 339 | } |
| 340 | 340 | |