@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | * @since 3.8.8 |
| 23 | 23 | * @return void |
| 24 | 24 | */ |
| 25 | - static public function showDeprecationNotice( $sDeprecated, $sAlternative='', $sProgramName='' ) { |
|
| 25 | + static public function showDeprecationNotice( $sDeprecated, $sAlternative = '', $sProgramName = '' ) { |
|
| 26 | 26 | $sProgramName = $sProgramName ? $sProgramName : self::getFrameworkName(); |
| 27 | 27 | parent::showDeprecationNotice( $sDeprecated, $sAlternative, $sProgramName ); |
| 28 | 28 | } |
@@ -41,8 +41,8 @@ discard block |
||
| 41 | 41 | return; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - foreach( ( array ) $GLOBALS[ '_apf_sub_menus_to_sort' ] as $_sIndex => $_sMenuSlug ) { |
|
| 45 | - if ( ! isset( $GLOBALS[ 'submenu' ][ $_sMenuSlug ] ) ) { |
|
| 44 | + foreach ( ( array ) $GLOBALS[ '_apf_sub_menus_to_sort' ] as $_sIndex => $_sMenuSlug ) { |
|
| 45 | + if ( !isset( $GLOBALS[ 'submenu' ][ $_sMenuSlug ] ) ) { |
|
| 46 | 46 | continue; |
| 47 | 47 | } |
| 48 | 48 | ksort( $GLOBALS[ 'submenu' ][ $_sMenuSlug ] ); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * @param boolean $bTrimDevVer Whether the `.dev` suffix should be removed or not. |
| 68 | 68 | * @return string |
| 69 | 69 | */ |
| 70 | - static public function getFrameworkVersion( $bTrimDevVer=false ) { |
|
| 70 | + static public function getFrameworkVersion( $bTrimDevVer = false ) { |
|
| 71 | 71 | $_sVersion = AdminPageFramework_Registry::getVersion(); |
| 72 | 72 | return $bTrimDevVer |
| 73 | 73 | ? self::getSuffixRemoved( $_sVersion, '.dev' ) |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | * @return string |
| 96 | 96 | */ |
| 97 | 97 | static public function getFrameworkNameVersion() { |
| 98 | - return self::getFrameworkName() . ' ' . self::getFrameworkVersion(); |
|
| 98 | + return self::getFrameworkName().' '.self::getFrameworkVersion(); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | } |
@@ -51,14 +51,14 @@ discard block |
||
| 51 | 51 | * @since 3.6.0 |
| 52 | 52 | * @var array |
| 53 | 53 | */ |
| 54 | - public $aData = array(); |
|
| 54 | + public $aData = array(); |
|
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * Stores the default values. |
| 58 | 58 | * @since 3.6.0 |
| 59 | 59 | * @var array |
| 60 | 60 | */ |
| 61 | - public $aDefault = array(); |
|
| 61 | + public $aDefault = array(); |
|
| 62 | 62 | /**#@-*/ |
| 63 | 63 | |
| 64 | 64 | /** |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | $_aKeys = func_get_args() + array( null ); |
| 97 | 97 | |
| 98 | 98 | // If no key is specified, return the whole array. |
| 99 | - if ( ! isset( $_aKeys[ 0 ] ) ) { |
|
| 99 | + if ( !isset( $_aKeys[ 0 ] ) ) { |
|
| 100 | 100 | return $this->uniteArrays( |
| 101 | 101 | $this->aData, |
| 102 | 102 | $this->aDefault |
@@ -111,8 +111,8 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | // Now either the section ID or field ID is given. |
| 113 | 113 | return $this->getArrayValueByArrayKeys( |
| 114 | - $this->aData, // subject array |
|
| 115 | - $_aKeys, // dimensional keys |
|
| 114 | + $this->aData, // subject array |
|
| 115 | + $_aKeys, // dimensional keys |
|
| 116 | 116 | $this->_getDefaultValue( // default value |
| 117 | 117 | $_mDefault, |
| 118 | 118 | $_aKeys |
@@ -145,8 +145,8 @@ discard block |
||
| 145 | 145 | */ |
| 146 | 146 | public function set( /* $asKeys, $mValue */ ) { |
| 147 | 147 | |
| 148 | - $_aParameters = func_get_args(); |
|
| 149 | - if ( ! isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) { |
|
| 148 | + $_aParameters = func_get_args(); |
|
| 149 | + if ( !isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) { |
|
| 150 | 150 | return; |
| 151 | 151 | } |
| 152 | 152 | $_asKeys = $_aParameters[ 0 ]; |
@@ -174,8 +174,8 @@ discard block |
||
| 174 | 174 | */ |
| 175 | 175 | public function delete( /* $sKey1, $sKey2, $sKey3 ... OR $aKeys */ ) { |
| 176 | 176 | |
| 177 | - $_aParameters = func_get_args(); |
|
| 178 | - if ( ! isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) { |
|
| 177 | + $_aParameters = func_get_args(); |
|
| 178 | + if ( !isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) { |
|
| 179 | 179 | return; |
| 180 | 180 | } |
| 181 | 181 | $_asKeys = $_aParameters[ 0 ]; |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | '' // default value |
| 40 | 40 | ); |
| 41 | 41 | |
| 42 | - if ( ! $this->canUserView( $this->sCapability ) ) { |
|
| 42 | + if ( !$this->canUserView( $this->sCapability ) ) { |
|
| 43 | 43 | return ''; |
| 44 | 44 | } |
| 45 | 45 | |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | |
| 48 | 48 | // Output |
| 49 | 49 | return |
| 50 | - "<{$this->aOptions[ 'input_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ) . ">" |
|
| 50 | + "<{$this->aOptions[ 'input_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ) . ">" |
|
| 51 | 51 | . $this->_getInputElements( $_aAttributes, $this->aOptions ) |
| 52 | 52 | . "</{$this->aOptions[ 'input_container_tag' ]}>" |
| 53 | 53 | . "<{$this->aOptions[ 'label_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'label_container_attributes' ] ) . ">" |
@@ -33,11 +33,11 @@ discard block |
||
| 33 | 33 | public function get( /* $sLabel, $aAttributes=array() */ ) { |
| 34 | 34 | |
| 35 | 35 | // Parameters |
| 36 | - $_aParams = func_get_args() + array( |
|
| 37 | - 0 => '', // 1st parameter |
|
| 36 | + $_aParams = func_get_args() + array( |
|
| 37 | + 0 => '', // 1st parameter |
|
| 38 | 38 | 1 => array() // 2nd parameter |
| 39 | 39 | ); |
| 40 | - $_sLabel = $_aParams[ 0 ]; // first parameter |
|
| 40 | + $_sLabel = $_aParams[ 0 ]; // first parameter |
|
| 41 | 41 | |
| 42 | 42 | // Attributes |
| 43 | 43 | $_aAttributes = $this->uniteArrays( // second parameter |
@@ -47,10 +47,10 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | // Output |
| 49 | 49 | return |
| 50 | - "<{$this->aOptions[ 'input_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ) . ">" |
|
| 50 | + "<{$this->aOptions[ 'input_container_tag' ]} ".$this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ).">" |
|
| 51 | 51 | . $this->_getInputElements( $_aAttributes, $this->aOptions ) |
| 52 | 52 | . "</{$this->aOptions[ 'input_container_tag' ]}>" |
| 53 | - . "<{$this->aOptions[ 'label_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'label_container_attributes' ] ) . ">" |
|
| 53 | + . "<{$this->aOptions[ 'label_container_tag' ]} ".$this->getAttributes( $this->aOptions[ 'label_container_attributes' ] ).">" |
|
| 54 | 54 | . $_sLabel |
| 55 | 55 | . "</{$this->aOptions[ 'label_container_tag' ]}>" |
| 56 | 56 | ; |
@@ -64,16 +64,16 @@ discard block |
||
| 64 | 64 | private function _getInputElements( $aAttributes, $aOptions ) { |
| 65 | 65 | $_sOutput = $this->aOptions[ 'save_unchecked' ] |
| 66 | 66 | // the unchecked value must be set prior to the checkbox input field. |
| 67 | - ? "<input " . $this->getAttributes( |
|
| 67 | + ? "<input ".$this->getAttributes( |
|
| 68 | 68 | array( |
| 69 | 69 | 'type' => 'hidden', |
| 70 | 70 | 'class' => $aAttributes[ 'class' ], |
| 71 | 71 | 'name' => $aAttributes[ 'name' ], |
| 72 | 72 | 'value' => '0', |
| 73 | 73 | ) |
| 74 | - ) . " />" |
|
| 74 | + )." />" |
|
| 75 | 75 | : ''; |
| 76 | - $_sOutput .= "<input " . $this->getAttributes( $aAttributes ) . " />"; |
|
| 76 | + $_sOutput .= "<input ".$this->getAttributes( $aAttributes )." />"; |
|
| 77 | 77 | return $_sOutput; |
| 78 | 78 | } |
| 79 | 79 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | public function getAttributesByKey( /* $sKey */ ) { |
| 87 | 87 | |
| 88 | 88 | // Parameters |
| 89 | - $_aParams = func_get_args() + array( 0 => '', ); |
|
| 89 | + $_aParams = func_get_args() + array( 0 => '',); |
|
| 90 | 90 | $_sKey = $_aParams[ 0 ]; |
| 91 | 91 | $_bIsMultiple = '' !== $_sKey; |
| 92 | 92 | |
@@ -98,13 +98,13 @@ discard block |
||
| 98 | 98 | // The type needs to be specified since the postytpe field type extends this class. If not set, the 'posttype' will be passed to the type attribute. |
| 99 | 99 | + array( |
| 100 | 100 | 'type' => 'checkbox', |
| 101 | - 'id' => $this->aAttributes[ 'id' ] . '_' . $_sKey, |
|
| 101 | + 'id' => $this->aAttributes[ 'id' ].'_'.$_sKey, |
|
| 102 | 102 | 'checked' => $this->_getCheckedAttributeValue( $_sKey ), |
| 103 | - 'value' => 1, // this must be always 1 because the key value can be zero. In that case, the value always will be false and unchecked. |
|
| 103 | + 'value' => 1, // this must be always 1 because the key value can be zero. In that case, the value always will be false and unchecked. |
|
| 104 | 104 | 'name' => $_bIsMultiple |
| 105 | 105 | ? "{$this->aAttributes[ 'name' ]}[{$_sKey}]" |
| 106 | 106 | : $this->aAttributes[ 'name' ], |
| 107 | - 'data-id' => $this->aAttributes[ 'id' ], // referenced by the JavaScript scripts such as the revealer script. |
|
| 107 | + 'data-id' => $this->aAttributes[ 'id' ], // referenced by the JavaScript scripts such as the revealer script. |
|
| 108 | 108 | ) |
| 109 | 109 | + $this->aAttributes |
| 110 | 110 | ; |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | : array( 'value', $_sKey ); |
| 122 | 122 | return $this->getElement( $this->aAttributes, $_aValueDimension ) |
| 123 | 123 | ? 'checked' |
| 124 | - : null; // to not to set, pass null. An empty value '' will still set the attribute. |
|
| 124 | + : null; // to not to set, pass null. An empty value '' will still set the attribute. |
|
| 125 | 125 | |
| 126 | 126 | } |
| 127 | 127 | |
@@ -68,14 +68,14 @@ discard block |
||
| 68 | 68 | ); |
| 69 | 69 | |
| 70 | 70 | return |
| 71 | - "<{$this->aOptions[ 'input_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ) . ">" |
|
| 72 | - . "<select " . $this->getAttributes( $this->_getSelectAttributes( $_aAttributes ) ) . " >" |
|
| 71 | + "<{$this->aOptions[ 'input_container_tag' ]} ".$this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ).">" |
|
| 72 | + . "<select ".$this->getAttributes( $this->_getSelectAttributes( $_aAttributes ) )." >" |
|
| 73 | 73 | . $this->_getDropDownList( |
| 74 | 74 | $this->getAttribute( 'id' ), |
| 75 | 75 | $this->getAsArray( |
| 76 | 76 | isset( $_aLabels ) |
| 77 | 77 | ? $_aLabels |
| 78 | - : $this->aField[ 'label' ], // backward compatibility |
|
| 78 | + : $this->aField[ 'label' ], // backward compatibility |
|
| 79 | 79 | true |
| 80 | 80 | ), |
| 81 | 81 | $_aAttributes |
@@ -103,9 +103,9 @@ discard block |
||
| 103 | 103 | ? 'multiple' |
| 104 | 104 | : null, |
| 105 | 105 | 'name' => $_bIsMultiple |
| 106 | - ? $this->getAttribute( 'name' ) . '[]' |
|
| 106 | + ? $this->getAttribute( 'name' ).'[]' |
|
| 107 | 107 | : $this->getAttribute( 'name' ), |
| 108 | - 'data-id' => $this->getAttribute( 'id' ), // referenced by the JavaScript scripts such as the revealer script. |
|
| 108 | + 'data-id' => $this->getAttribute( 'id' ), // referenced by the JavaScript scripts such as the revealer script. |
|
| 109 | 109 | ) |
| 110 | 110 | ); |
| 111 | 111 | |
@@ -127,12 +127,12 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | private function _getDropDownList( $sInputID, array $aLabels, array $aBaseAttributes ) { |
| 129 | 129 | |
| 130 | - $_aOutput = array(); |
|
| 131 | - foreach( $aLabels as $__sKey => $__asLabel ) { |
|
| 130 | + $_aOutput = array(); |
|
| 131 | + foreach ( $aLabels as $__sKey => $__asLabel ) { |
|
| 132 | 132 | |
| 133 | 133 | // For an optgroup tag, |
| 134 | 134 | if ( is_array( $__asLabel ) ) { |
| 135 | - $_aOutput[] = $this->_getOptGroup( |
|
| 135 | + $_aOutput[ ] = $this->_getOptGroup( |
|
| 136 | 136 | $aBaseAttributes, |
| 137 | 137 | $sInputID, |
| 138 | 138 | $__sKey, |
@@ -142,8 +142,8 @@ discard block |
||
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | // A normal option tag, |
| 145 | - $_aOutput[] = $this->_getOptionTag( |
|
| 146 | - $__asLabel, // the text label the user sees to be selected |
|
| 145 | + $_aOutput[ ] = $this->_getOptionTag( |
|
| 146 | + $__asLabel, // the text label the user sees to be selected |
|
| 147 | 147 | $this->_getOptionTagAttributes( |
| 148 | 148 | $aBaseAttributes, |
| 149 | 149 | $sInputID, |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $_aOptGroupAttributes = array( |
| 170 | 170 | 'label' => $sKey, |
| 171 | 171 | ) + $_aOptGroupAttributes; |
| 172 | - return "<optgroup " . $this->getAttributes( $_aOptGroupAttributes ) . ">" |
|
| 172 | + return "<optgroup ".$this->getAttributes( $_aOptGroupAttributes ).">" |
|
| 173 | 173 | . $this->_getDropDownList( $sInputID, $asLabel, $aBaseAttributes ) |
| 174 | 174 | . "</optgroup>"; |
| 175 | 175 | |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | $aValues |
| 188 | 188 | ); |
| 189 | 189 | return array( |
| 190 | - 'id' => $sInputID . '_' . $sKey, |
|
| 190 | + 'id' => $sInputID.'_'.$sKey, |
|
| 191 | 191 | 'value' => $sKey, |
| 192 | 192 | 'selected' => in_array( ( string ) $sKey, $aValues ) |
| 193 | 193 | ? 'selected' |
@@ -203,8 +203,8 @@ discard block |
||
| 203 | 203 | * @sicne 3.4.0 |
| 204 | 204 | * @return string The generated option tag HTML output. |
| 205 | 205 | */ |
| 206 | - private function _getOptionTag( $sLabel, array $aOptionTagAttributes=array() ) { |
|
| 207 | - return "<option " . $this->getAttributes( $aOptionTagAttributes ) . " >" |
|
| 206 | + private function _getOptionTag( $sLabel, array $aOptionTagAttributes = array() ) { |
|
| 207 | + return "<option ".$this->getAttributes( $aOptionTagAttributes )." >" |
|
| 208 | 208 | . $sLabel |
| 209 | 209 | . "</option>"; |
| 210 | 210 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | /** |
| 37 | 37 | * Defines the field type slugs used for this field type. |
| 38 | 38 | */ |
| 39 | - public $aFieldTypeSlugs = array( 'file', ); |
|
| 39 | + public $aFieldTypeSlugs = array( 'file',); |
|
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * Defines the default key-values of this field type. |
@@ -96,15 +96,15 @@ discard block |
||
| 96 | 96 | array( |
| 97 | 97 | 'type' => 'hidden', |
| 98 | 98 | 'value' => '', |
| 99 | - 'name' => $aField[ 'attributes' ][ 'name' ] . '[_dummy_value]', |
|
| 99 | + 'name' => $aField[ 'attributes' ][ 'name' ].'[_dummy_value]', |
|
| 100 | 100 | ) |
| 101 | 101 | ) |
| 102 | 102 | . $this->getHTMLTag( |
| 103 | 103 | 'input', |
| 104 | 104 | array( |
| 105 | 105 | 'type' => 'hidden', |
| 106 | - 'name' => '__unset_' . $aField[ '_structure_type' ] . '[' . $aField[ '_input_name_flat' ] . '|_dummy_value' . ']', |
|
| 107 | - 'value' => $aField[ '_input_name_flat' ] . '|_dummy_value', |
|
| 106 | + 'name' => '__unset_'.$aField[ '_structure_type' ].'['.$aField[ '_input_name_flat' ].'|_dummy_value'.']', |
|
| 107 | + 'value' => $aField[ '_input_name_flat' ].'|_dummy_value', |
|
| 108 | 108 | 'class' => 'unset-element-names element-address', |
| 109 | 109 | ) |
| 110 | 110 | ); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | /** |
| 81 | 81 | * Defines the field type slugs used for this field type. |
| 82 | 82 | */ |
| 83 | - public $aFieldTypeSlugs = array( 'posttype', ); |
|
| 83 | + public $aFieldTypeSlugs = array( 'posttype',); |
|
| 84 | 84 | |
| 85 | 85 | /** |
| 86 | 86 | * Defines the default key-values of this field type. |
@@ -88,20 +88,20 @@ discard block |
||
| 88 | 88 | * @remark $_aDefaultKeys holds shared default key-values defined in the base class. |
| 89 | 89 | */ |
| 90 | 90 | protected $aDefaultKeys = array( |
| 91 | - 'slugs_to_remove' => null, // the default array will be assigned in the rendering method. |
|
| 91 | + 'slugs_to_remove' => null, // the default array will be assigned in the rendering method. |
|
| 92 | 92 | /** |
| 93 | 93 | * Accepts query arguments. For the argument specification, see the arg parameter of get_post_types() function. |
| 94 | 94 | * See: http://codex.wordpress.org/Function_Reference/get_post_types#Parameters |
| 95 | 95 | */ |
| 96 | - 'query' => array(), // 3.2.1+ |
|
| 97 | - 'operator' => 'and', // 3.2.1+ either 'and' or 'or' |
|
| 96 | + 'query' => array(), // 3.2.1+ |
|
| 97 | + 'operator' => 'and', // 3.2.1+ either 'and' or 'or' |
|
| 98 | 98 | 'attributes' => array( |
| 99 | 99 | 'size' => 30, |
| 100 | 100 | 'maxlength' => 400, |
| 101 | 101 | ), |
| 102 | - 'select_all_button' => true, // 3.3.0+ to change the label, set the label here |
|
| 103 | - 'select_none_button' => true, // 3.3.0+ to change the label, set the label here |
|
| 104 | - 'save_unchecked' => true, // (optional, boolean) 3.8.8+ Whether to store the values of unchecked items. |
|
| 102 | + 'select_all_button' => true, // 3.3.0+ to change the label, set the label here |
|
| 103 | + 'select_none_button' => true, // 3.3.0+ to change the label, set the label here |
|
| 104 | + 'save_unchecked' => true, // (optional, boolean) 3.8.8+ Whether to store the values of unchecked items. |
|
| 105 | 105 | ); |
| 106 | 106 | protected $aDefaultRemovingPostTypeSlugs = array( |
| 107 | 107 | 'revision', |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | */ |
| 119 | 119 | protected function getStyles() { |
| 120 | 120 | $_sParentStyles = parent::getStyles(); |
| 121 | - return $_sParentStyles . <<<CSSRULES |
|
| 121 | + return $_sParentStyles.<<<CSSRULES |
|
| 122 | 122 | /* Posttype Field Type */ |
| 123 | 123 | .admin-page-framework-field input[type='checkbox'] { |
| 124 | 124 | margin-right: 0.5em; |
@@ -145,11 +145,11 @@ discard block |
||
| 145 | 145 | */ |
| 146 | 146 | protected function getField( $aField ) { |
| 147 | 147 | |
| 148 | - $this->_sCheckboxClassSelector = ''; // disable the checkbox class selector. |
|
| 148 | + $this->_sCheckboxClassSelector = ''; // disable the checkbox class selector. |
|
| 149 | 149 | $aField[ 'label' ] = $this->_getPostTypeArrayForChecklist( |
| 150 | 150 | isset( $aField[ 'slugs_to_remove' ] ) |
| 151 | 151 | ? $this->getAsArray( $aField[ 'slugs_to_remove' ] ) |
| 152 | - : $this->aDefaultRemovingPostTypeSlugs, // slugs to remove |
|
| 152 | + : $this->aDefaultRemovingPostTypeSlugs, // slugs to remove |
|
| 153 | 153 | $aField[ 'query' ], |
| 154 | 154 | $aField[ 'operator' ] |
| 155 | 155 | ); |
@@ -170,11 +170,11 @@ discard block |
||
| 170 | 170 | * @return array The array holding the elements of installed post types' labels and their slugs except the specified expluding post types. |
| 171 | 171 | * @internal |
| 172 | 172 | */ |
| 173 | - private function _getPostTypeArrayForChecklist( $aSlugsToRemove, $asQueryArgs=array(), $sOperator='and' ) { |
|
| 173 | + private function _getPostTypeArrayForChecklist( $aSlugsToRemove, $asQueryArgs = array(), $sOperator = 'and' ) { |
|
| 174 | 174 | |
| 175 | 175 | $_aPostTypes = array(); |
| 176 | - foreach( get_post_types( $asQueryArgs, 'objects' ) as $_oPostType ) { |
|
| 177 | - if ( isset( $_oPostType->name, $_oPostType->label ) ) { |
|
| 176 | + foreach ( get_post_types( $asQueryArgs, 'objects' ) as $_oPostType ) { |
|
| 177 | + if ( isset( $_oPostType->name, $_oPostType->label ) ) { |
|
| 178 | 178 | $_aPostTypes[ $_oPostType->name ] = $_oPostType->label; |
| 179 | 179 | } |
| 180 | 180 | } |
@@ -62,16 +62,16 @@ discard block |
||
| 62 | 62 | * - use_desc_for_title (boolean|int) default is 1 - Whether to use the category description as the title attribute. side note: the framework enables this by default. |
| 63 | 63 | * @param integer $iCurrentObjectID |
| 64 | 64 | */ |
| 65 | - function start_el( &$sOutput, $oTerm, $iDepth=0, $aArgs=array(), $iCurrentObjectID=0 ) { |
|
| 65 | + function start_el( &$sOutput, $oTerm, $iDepth = 0, $aArgs = array(), $iCurrentObjectID = 0 ) { |
|
| 66 | 66 | |
| 67 | 67 | $aArgs = $aArgs + array( |
| 68 | 68 | '_name_prefix' => null, |
| 69 | 69 | '_input_id_prefix' => null, |
| 70 | 70 | '_attributes' => array(), |
| 71 | 71 | '_selected_items' => array(), |
| 72 | - 'taxonomy' => null, // parsed by the core function to perform the database query. |
|
| 73 | - 'disabled' => null, // not sure what this was for |
|
| 74 | - '_save_unchecked' => true, // 3.8.8+ |
|
| 72 | + 'taxonomy' => null, // parsed by the core function to perform the database query. |
|
| 73 | + 'disabled' => null, // not sure what this was for |
|
| 74 | + '_save_unchecked' => true, // 3.8.8+ |
|
| 75 | 75 | ); |
| 76 | 76 | |
| 77 | 77 | // Local variables |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | // Post count |
| 85 | 85 | $_sPostCount = $aArgs[ 'show_post_count' ] |
| 86 | - ? " <span class='font-lighter'>(" . $oTerm->count . ")</span>" |
|
| 86 | + ? " <span class='font-lighter'>(".$oTerm->count.")</span>" |
|
| 87 | 87 | : ''; |
| 88 | 88 | |
| 89 | 89 | // Attributes |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | + array( |
| 103 | 103 | 'class' => null, |
| 104 | 104 | ); |
| 105 | - $_aInputAttributes['class'] .= ' apf_checkbox'; |
|
| 105 | + $_aInputAttributes[ 'class' ] .= ' apf_checkbox'; |
|
| 106 | 106 | |
| 107 | 107 | $_aLiTagAttributes = array( |
| 108 | 108 | 'id' => "list-{$_sID}", |
@@ -111,15 +111,15 @@ discard block |
||
| 111 | 111 | ); |
| 112 | 112 | |
| 113 | 113 | $_sHiddenInputForUnchecked = $aArgs[ '_save_unchecked' ] |
| 114 | - ? "<input value='0' type='hidden' name='" . $_aInputAttributes[ 'name' ] . "' class='apf_checkbox' />" |
|
| 114 | + ? "<input value='0' type='hidden' name='".$_aInputAttributes[ 'name' ]."' class='apf_checkbox' />" |
|
| 115 | 115 | : ''; |
| 116 | 116 | |
| 117 | 117 | // Output - the variable is by reference so the modification takes effect |
| 118 | 118 | $sOutput .= "\n" |
| 119 | - . "<li " . AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ) . ">" |
|
| 119 | + . "<li ".AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ).">" |
|
| 120 | 120 | . "<label for='{$_sID}' class='taxonomy-checklist-label'>" |
| 121 | 121 | . $_sHiddenInputForUnchecked // 3.8.8+ |
| 122 | - . "<input " . AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes ) . " />" |
|
| 122 | + . "<input ".AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes )." />" |
|
| 123 | 123 | . esc_html( apply_filters( 'the_category', $oTerm->name ) ) |
| 124 | 124 | . $_sPostCount |
| 125 | 125 | . "</label>"; |
@@ -36,21 +36,21 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function _replyToGetField( $aField ) { |
| 38 | 38 | return |
| 39 | - $aField['before_label'] |
|
| 39 | + $aField[ 'before_label' ] |
|
| 40 | 40 | . "<div class='admin-page-framework-input-label-container'>" |
| 41 | - . "<label for='{$aField['input_id']}'>" |
|
| 42 | - . $aField['before_input'] |
|
| 43 | - . ( $aField['label'] && ! $aField['repeatable'] |
|
| 44 | - ? "<span " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ) . ">" |
|
| 41 | + . "<label for='{$aField[ 'input_id' ]}'>" |
|
| 42 | + . $aField[ 'before_input' ] |
|
| 43 | + . ( $aField[ 'label' ] && !$aField[ 'repeatable' ] |
|
| 44 | + ? "<span ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ).">" |
|
| 45 | 45 | . $aField[ 'label' ] |
| 46 | 46 | . "</span>" |
| 47 | 47 | : "" |
| 48 | 48 | ) |
| 49 | - . $aField['value'] |
|
| 50 | - . $aField['after_input'] |
|
| 49 | + . $aField[ 'value' ] |
|
| 50 | + . $aField[ 'after_input' ] |
|
| 51 | 51 | . "</label>" |
| 52 | 52 | . "</div>" |
| 53 | - . $aField['after_label'] |
|
| 53 | + . $aField[ 'after_label' ] |
|
| 54 | 54 | ; |
| 55 | 55 | } |
| 56 | 56 | |