@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | public $sNotice = ''; |
47 | 47 | public $aAttributes = array(); |
48 | 48 | public $aCallbacks = array( |
49 | - 'should_show' => null, // determines whether the admin notice should be displayed. |
|
49 | + 'should_show' => null, // determines whether the admin notice should be displayed. |
|
50 | 50 | ); |
51 | 51 | /**#@-*/ |
52 | 52 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * </ul> |
63 | 63 | * @since 3.5.0 |
64 | 64 | */ |
65 | - public function __construct( $sNotice, array $aAttributes=array( 'class' => 'error' ), array $aCallbacks=array() ) { |
|
65 | + public function __construct( $sNotice, array $aAttributes = array( 'class' => 'error' ), array $aCallbacks = array() ) { |
|
66 | 66 | |
67 | 67 | $this->aAttributes = $aAttributes + array( |
68 | 68 | 'class' => 'error', // 'updated' etc. |
@@ -70,17 +70,17 @@ discard block |
||
70 | 70 | $this->aAttributes[ 'class' ] = $this->getClassAttribute( |
71 | 71 | $this->aAttributes[ 'class' ], |
72 | 72 | 'admin-page-framework-settings-notice-message', |
73 | - 'admin-page-framework-settings-notice-container', // Moved from `AdminPageFramework_Factory_View`. |
|
73 | + 'admin-page-framework-settings-notice-container', // Moved from `AdminPageFramework_Factory_View`. |
|
74 | 74 | 'notice', |
75 | 75 | 'is-dismissible' // 3.5.12+ |
76 | 76 | ); |
77 | - $this->aCallbacks = $aCallbacks + $this->aCallbacks; |
|
77 | + $this->aCallbacks = $aCallbacks + $this->aCallbacks; |
|
78 | 78 | |
79 | 79 | // Load resources. |
80 | 80 | new AdminPageFramework_AdminNotice___Script; |
81 | 81 | |
82 | 82 | // An empty value may be set in oreder only to laode the fade-in script. |
83 | - if ( ! $sNotice ) { |
|
83 | + if ( !$sNotice ) { |
|
84 | 84 | return; |
85 | 85 | } |
86 | 86 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function _replyToDisplayAdminNotice() { |
110 | 110 | |
111 | - if ( ! $this->_shouldProceed() ) { |
|
111 | + if ( !$this->_shouldProceed() ) { |
|
112 | 112 | return; |
113 | 113 | } |
114 | 114 | |
@@ -119,14 +119,14 @@ discard block |
||
119 | 119 | 'display: none' |
120 | 120 | ); |
121 | 121 | |
122 | - echo "<div " . $this->getAttributes( $_aAttributes ) . ">" |
|
122 | + echo "<div ".$this->getAttributes( $_aAttributes ).">" |
|
123 | 123 | . "<p>" |
124 | 124 | . self::$_aNotices[ $this->sNotice ] |
125 | 125 | . "</p>" |
126 | 126 | . "</div>" |
127 | 127 | // Insert the same message except it is not hidden. |
128 | 128 | . "<noscript>" |
129 | - . "<div " . $this->getAttributes( $this->aAttributes ) . ">" |
|
129 | + . "<div ".$this->getAttributes( $this->aAttributes ).">" |
|
130 | 130 | . "<p>" |
131 | 131 | . self::$_aNotices[ $this->sNotice ] |
132 | 132 | . "</p>" |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | private function _shouldProceed() { |
146 | 146 | |
147 | - if ( ! is_callable( $this->aCallbacks[ 'should_show' ] ) ) { |
|
147 | + if ( !is_callable( $this->aCallbacks[ 'should_show' ] ) ) { |
|
148 | 148 | return true; |
149 | 149 | } |
150 | 150 | return call_user_func_array( |
@@ -28,17 +28,17 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function _replyToGetSectionName( /* $sAttribute, $aSectionset */ ) { |
30 | 30 | |
31 | - $_aParams = func_get_args() + array( null, null, ); |
|
31 | + $_aParams = func_get_args() + array( null, null,); |
|
32 | 32 | $sNameAttribute = $_aParams[ 0 ]; |
33 | 33 | $aSectionset = $_aParams[ 1 ]; |
34 | 34 | $_aSectionPath = $aSectionset[ '_section_path_array' ]; |
35 | 35 | $_aDimensionalKeys = array( $this->oProp->sOptionKey ); |
36 | - foreach( $_aSectionPath as $_sDimension ) { |
|
37 | - $_aDimensionalKeys[] = '[' . $_sDimension . ']'; |
|
36 | + foreach ( $_aSectionPath as $_sDimension ) { |
|
37 | + $_aDimensionalKeys[ ] = '['.$_sDimension.']'; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | if ( isset( $aSectionset[ '_index' ] ) ) { |
41 | - $_aDimensionalKeys[] = '[' . $aSectionset[ '_index' ] . ']'; |
|
41 | + $_aDimensionalKeys[ ] = '['.$aSectionset[ '_index' ].']'; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | return implode( '', $_aDimensionalKeys ); |
@@ -51,25 +51,25 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function _replyToGetFieldNameAttribute( /* $sAttribute, $aFieldset */ ) { |
53 | 53 | |
54 | - $_aParams = func_get_args() + array( null, null, ); |
|
54 | + $_aParams = func_get_args() + array( null, null,); |
|
55 | 55 | $sNameAttribute = $_aParams[ 0 ]; |
56 | 56 | $aFieldset = $_aParams[ 1 ]; |
57 | 57 | $_aDimensionalKeys = array( |
58 | 58 | $this->oProp->sOptionKey // Use `$this->oProp->sOptionKey` instead of `$aFieldset[ 'option_key' ]` which is not set for nested items. |
59 | 59 | ); |
60 | 60 | if ( $this->isSectionSet( $aFieldset ) ) { |
61 | - $_aSectionPath = $aFieldset[ '_section_path_array' ]; |
|
62 | - foreach( $_aSectionPath as $_sDimension ) { |
|
63 | - $_aDimensionalKeys[] = '[' . $_sDimension . ']'; |
|
61 | + $_aSectionPath = $aFieldset[ '_section_path_array' ]; |
|
62 | + foreach ( $_aSectionPath as $_sDimension ) { |
|
63 | + $_aDimensionalKeys[ ] = '['.$_sDimension.']'; |
|
64 | 64 | } |
65 | 65 | if ( isset( $aFieldset[ '_section_index' ] ) ) { |
66 | - $_aDimensionalKeys[] = '[' . $aFieldset[ '_section_index' ] . ']'; |
|
66 | + $_aDimensionalKeys[ ] = '['.$aFieldset[ '_section_index' ].']'; |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | |
70 | 70 | // 3.8.0+ Support for nested fields. |
71 | - foreach( $aFieldset[ '_field_path_array' ] as $_sPathPart ) { |
|
72 | - $_aDimensionalKeys[] = '[' . $_sPathPart . ']'; |
|
71 | + foreach ( $aFieldset[ '_field_path_array' ] as $_sPathPart ) { |
|
72 | + $_aDimensionalKeys[ ] = '['.$_sPathPart.']'; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | return implode( '', $_aDimensionalKeys ); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function _replyToGetFlatFieldName( /* $sAttribute, $aFieldset */ ) { |
84 | 84 | |
85 | - $_aParams = func_get_args() + array( null, null, ); |
|
85 | + $_aParams = func_get_args() + array( null, null,); |
|
86 | 86 | $sNameAttribute = $_aParams[ 0 ]; |
87 | 87 | $aFieldset = $_aParams[ 1 ]; |
88 | 88 | |
@@ -90,11 +90,11 @@ discard block |
||
90 | 90 | $this->oProp->sOptionKey // Use `$this->oProp->sOptionKey` instead of `$aFieldset[ 'option_key' ]` which is not set for nested items. |
91 | 91 | ); |
92 | 92 | if ( $this->isSectionSet( $aFieldset ) ) { |
93 | - foreach( $aFieldset[ '_section_path_array' ] as $_sDimension ) { |
|
94 | - $_aDimensionalKeys[] = $_sDimension; // $aFieldset[ 'section_id' ]; |
|
93 | + foreach ( $aFieldset[ '_section_path_array' ] as $_sDimension ) { |
|
94 | + $_aDimensionalKeys[ ] = $_sDimension; // $aFieldset[ 'section_id' ]; |
|
95 | 95 | } |
96 | 96 | if ( isset( $aFieldset[ '_section_index' ] ) ) { |
97 | - $_aDimensionalKeys[] = $aFieldset[ '_section_index' ]; |
|
97 | + $_aDimensionalKeys[ ] = $aFieldset[ '_section_index' ]; |
|
98 | 98 | } |
99 | 99 | } |
100 | 100 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | "[{$sKey}]" |
124 | 124 | ); |
125 | 125 | |
126 | - return $this->_replyToGetFieldNameAttribute( '', $aField ) . $sKey; |
|
126 | + return $this->_replyToGetFieldNameAttribute( '', $aField ).$sKey; |
|
127 | 127 | |
128 | 128 | } |
129 | 129 | /** |
@@ -141,10 +141,10 @@ discard block |
||
141 | 141 | $_sKey = $this->oUtil->getAOrB( |
142 | 142 | '0' !== $_sKey && empty( $_sKey ), |
143 | 143 | '', |
144 | - "|" . $_sKey |
|
144 | + "|".$_sKey |
|
145 | 145 | ); |
146 | 146 | |
147 | - return $this->_replyToGetFlatFieldName( '', $aField ) . $_sKey; |
|
147 | + return $this->_replyToGetFlatFieldName( '', $aField ).$_sKey; |
|
148 | 148 | |
149 | 149 | } |
150 | 150 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | /** |
24 | 24 | * Sets up hooks and properties. |
25 | 25 | */ |
26 | - public function __construct( $oProp, $oMsg=null ) { |
|
26 | + public function __construct( $oProp, $oMsg = null ) { |
|
27 | 27 | |
28 | 28 | parent::__construct( $oProp, $oMsg ); |
29 | 29 | |
@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | |
32 | 32 | // This filter for non-network-admin action links is added in the parent constructor. |
33 | 33 | remove_filter( |
34 | - 'plugin_action_links_' . plugin_basename( $this->oProp->aScriptInfo['sPath'] ), |
|
34 | + 'plugin_action_links_'.plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ), |
|
35 | 35 | array( $this, '_replyToAddSettingsLinkInPluginListingPage' ), |
36 | 36 | 20 |
37 | 37 | ); |
38 | 38 | // Add the action link filter for the multi-site network admin. |
39 | 39 | add_filter( |
40 | - 'network_admin_plugin_action_links_' . plugin_basename( $this->oProp->aScriptInfo['sPath'] ), |
|
40 | + 'network_admin_plugin_action_links_'.plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ), |
|
41 | 41 | array( $this, '_replyToAddSettingsLinkInPluginListingPage' ) |
42 | 42 | ); |
43 | 43 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | * @return string the flat input name attribute |
38 | 38 | */ |
39 | 39 | public function _replyToGetFlatInputName( /* $sFlatNameAttribute, $aField, $sKey, $sSectionIndex */ ) { |
40 | - $_aParams = func_get_args() + array( null, null, null ); |
|
40 | + $_aParams = func_get_args() + array( null, null, null ); |
|
41 | 41 | return $_aParams[ 0 ]; |
42 | 42 | } |
43 | 43 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @param string The text domain. Default: `admin-page-framework`. |
47 | 47 | * @return void |
48 | 48 | */ |
49 | - public function __construct( $asTaxonomySlug, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
|
49 | + public function __construct( $asTaxonomySlug, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) { |
|
50 | 50 | |
51 | 51 | if ( empty( $asTaxonomySlug ) ) { |
52 | 52 | return; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | // Properties |
56 | 56 | $_sProprtyClassName = isset( $this->aSubClassNames[ 'oProp' ] ) |
57 | 57 | ? $this->aSubClassNames[ 'oProp' ] |
58 | - : 'AdminPageFramework_Property_' . $this->_sStructureType; |
|
58 | + : 'AdminPageFramework_Property_'.$this->_sStructureType; |
|
59 | 59 | $this->oProp = new $_sProprtyClassName( |
60 | 60 | $this, |
61 | 61 | get_class( $this ), |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $sTextDomain, |
64 | 64 | $this->_sStructureType |
65 | 65 | ); |
66 | - $this->oProp->aTaxonomySlugs = ( array ) $asTaxonomySlug; |
|
66 | + $this->oProp->aTaxonomySlugs = ( array ) $asTaxonomySlug; |
|
67 | 67 | |
68 | 68 | parent::__construct( $this->oProp ); |
69 | 69 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | function __construct( $asTaxonomySlug, $sOptionKey='', $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
50 | 50 | |
51 | - if ( empty( $asTaxonomySlug ) ) { |
|
51 | + if ( empty( $asTaxonomySlug ) ) { |
|
52 | 52 | // @todo trigger a PHP warning |
53 | 53 | return; |
54 | 54 | } |
@@ -21,6 +21,6 @@ |
||
21 | 21 | /** |
22 | 22 | * The callback function name or the callable object to retrieve meta data. |
23 | 23 | */ |
24 | - protected $osCallable = 'get_term_meta'; |
|
24 | + protected $osCallable = 'get_term_meta'; |
|
25 | 25 | |
26 | 26 | } |
@@ -16,5 +16,5 @@ |
||
16 | 16 | * @subpackage Factory/TermMeta |
17 | 17 | * @internal |
18 | 18 | */ |
19 | -abstract class AdminPageFramework_TermMeta_Router extends AdminPageFramework_TaxonomyField_Controller { |
|
19 | +abstract class AdminPageFramework_TermMeta_Router extends AdminPageFramework_TaxonomyField_Controller { |
|
20 | 20 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | * @since DEVVER |
22 | 22 | * @return string |
23 | 23 | */ |
24 | - protected function _get() { |
|
24 | + protected function _get() { |
|
25 | 25 | return $this->_getRules(); |
26 | 26 | } |
27 | 27 | /** |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | '' // default value |
55 | 55 | ); |
56 | 56 | |
57 | - if ( ! $this->canUserView( $this->sCapability ) ) { |
|
57 | + if ( !$this->canUserView( $this->sCapability ) ) { |
|
58 | 58 | return ''; |
59 | 59 | } |
60 | 60 | |
@@ -82,10 +82,10 @@ discard block |
||
82 | 82 | ); |
83 | 83 | |
84 | 84 | $_sAddNewTerm = $bEditTerm ? '' : ' add-new-term'; |
85 | - $_sClassSelectors = 'admin-page-framework-form-table-term_meta' . $_sAddNewTerm; |
|
85 | + $_sClassSelectors = 'admin-page-framework-form-table-term_meta'.$_sAddNewTerm; |
|
86 | 86 | return '<tr class="admin-page-framework-form-table-outer-row-term_meta">' |
87 | 87 | . '<td colspan=2>' |
88 | - . '<table class="' . $_sClassSelectors . '">' |
|
88 | + . '<table class="'.$_sClassSelectors.'">' |
|
89 | 89 | . '<tbody>' |
90 | 90 | . '<tr>' |
91 | 91 | . '<td>' |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * @since DEVVER |
28 | 28 | * @return void |
29 | 29 | */ |
30 | - public function construct() { |
|
30 | + public function construct() { |
|
31 | 31 | $this->_addDefaultResources(); |
32 | 32 | } |
33 | 33 |