@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | * @subpackage PostType |
| 19 | 19 | * @internal |
| 20 | 20 | */ |
| 21 | -abstract class AdminPageFramework_PostType_Model extends AdminPageFramework_PostType_Router { |
|
| 21 | +abstract class AdminPageFramework_PostType_Model extends AdminPageFramework_PostType_Router { |
|
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * Sets up hooks and properties. |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * @callback filter manage_{post type slug}_posts_custom_column |
| 112 | 112 | * @return string |
| 113 | 113 | */ |
| 114 | - public function _replyToPrintColumnCell( $sColumnKey, $iPostID ) { |
|
| 114 | + public function _replyToPrintColumnCell( $sColumnKey, $iPostID ) { |
|
| 115 | 115 | echo $this->oUtil->addAndApplyFilter( |
| 116 | 116 | $this, |
| 117 | 117 | "cell_{$this->oProp->sPostType}_{$sColumnKey}", |
@@ -127,10 +127,10 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public function _replyToDisableAutoSave() { |
| 129 | 129 | |
| 130 | - if ( $this->oProp->bEnableAutoSave ) { |
|
| 130 | + if ( $this->oProp->bEnableAutoSave ) { |
|
| 131 | 131 | return; |
| 132 | 132 | } |
| 133 | - if ( $this->oProp->sPostType != get_post_type() ) { |
|
| 133 | + if ( $this->oProp->sPostType != get_post_type() ) { |
|
| 134 | 134 | return; |
| 135 | 135 | } |
| 136 | 136 | wp_dequeue_script( 'autosave' ); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | if ( $this->oProp->bIsAdmin ) { |
| 40 | 40 | |
| 41 | - add_action( 'load_' . $this->oProp->sPostType, array( $this, '_replyToSetUpHooksForModel' ) ); |
|
| 41 | + add_action( 'load_'.$this->oProp->sPostType, array( $this, '_replyToSetUpHooksForModel' ) ); |
|
| 42 | 42 | |
| 43 | 43 | if ( $this->oProp->sCallerPath ) { |
| 44 | 44 | new AdminPageFramework_PostType_Model__FlushRewriteRules( $this ); |
@@ -65,11 +65,11 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | // Properties - sets translatable labels. |
| 67 | 67 | $this->oProp->aColumnHeaders = array( |
| 68 | - 'cb' => '<input type="checkbox" />', // Checkbox for bulk actions. |
|
| 69 | - 'title' => $this->oMsg->get( 'title' ), // Post title. Includes "edit", "quick edit", "trash" and "view" links. If $mode (set from $_REQUEST['mode']) is 'excerpt', a post excerpt is included between the title and links. |
|
| 70 | - 'author' => $this->oMsg->get( 'author' ), // Post author. |
|
| 68 | + 'cb' => '<input type="checkbox" />', // Checkbox for bulk actions. |
|
| 69 | + 'title' => $this->oMsg->get( 'title' ), // Post title. Includes "edit", "quick edit", "trash" and "view" links. If $mode (set from $_REQUEST['mode']) is 'excerpt', a post excerpt is included between the title and links. |
|
| 70 | + 'author' => $this->oMsg->get( 'author' ), // Post author. |
|
| 71 | 71 | 'comments' => '<div class="comment-grey-bubble"></div>', // Number of pending comments. |
| 72 | - 'date' => $this->oMsg->get( 'date' ), // The date and publish status of the post. |
|
| 72 | + 'date' => $this->oMsg->get( 'date' ), // The date and publish status of the post. |
|
| 73 | 73 | ); |
| 74 | 74 | |
| 75 | 75 | } |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | echo $this->oUtil->addAndApplyFilter( |
| 132 | 132 | $this, |
| 133 | 133 | "cell_{$this->oProp->sPostType}_{$sColumnKey}", |
| 134 | - '', // value to be filtered - cell output |
|
| 134 | + '', // value to be filtered - cell output |
|
| 135 | 135 | $iPostID |
| 136 | 136 | ); |
| 137 | 137 | } |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | * @internal |
| 181 | 181 | */ |
| 182 | 182 | public function _replyToRegisterTaxonomies() { |
| 183 | - foreach( $this->oProp->aTaxonomies as $_sTaxonomySlug => $_aArguments ) { |
|
| 183 | + foreach ( $this->oProp->aTaxonomies as $_sTaxonomySlug => $_aArguments ) { |
|
| 184 | 184 | $this->_registerTaxonomy( |
| 185 | 185 | $_sTaxonomySlug, |
| 186 | 186 | $this->oUtil->getAsArray( $this->oProp->aTaxonomyObjectTypes[ $_sTaxonomySlug ] ), // object types |
@@ -196,8 +196,8 @@ discard block |
||
| 196 | 196 | */ |
| 197 | 197 | public function _registerTaxonomy( $sTaxonomySlug, array $aObjectTypes, array $aArguments ) { |
| 198 | 198 | |
| 199 | - if ( ! in_array( $this->oProp->sPostType, $aObjectTypes ) ) { |
|
| 200 | - $aObjectTypes[] = $this->oProp->sPostType; |
|
| 199 | + if ( !in_array( $this->oProp->sPostType, $aObjectTypes ) ) { |
|
| 200 | + $aObjectTypes[ ] = $this->oProp->sPostType; |
|
| 201 | 201 | } |
| 202 | 202 | register_taxonomy( |
| 203 | 203 | $sTaxonomySlug, |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | */ |
| 236 | 236 | public function _replyToRemoveTexonomySubmenuPages() { |
| 237 | 237 | |
| 238 | - foreach( $this->oProp->aTaxonomyRemoveSubmenuPages as $sSubmenuPageSlug => $sTopLevelPageSlug ) { |
|
| 238 | + foreach ( $this->oProp->aTaxonomyRemoveSubmenuPages as $sSubmenuPageSlug => $sTopLevelPageSlug ) { |
|
| 239 | 239 | |
| 240 | 240 | remove_submenu_page( $sTopLevelPageSlug, $sSubmenuPageSlug ); |
| 241 | 241 | |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * @subpackage PostType |
| 17 | 17 | * @internal |
| 18 | 18 | */ |
| 19 | -abstract class AdminPageFramework_PostType_Router extends AdminPageFramework_Factory { |
|
| 19 | +abstract class AdminPageFramework_PostType_Router extends AdminPageFramework_Factory { |
|
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * Determines whether the currently loaded page is of the post type page. |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | public function _replyToDetermineToLoadAdmin( /* $oScreen */ ) { |
| 46 | 46 | |
| 47 | - if ( ! $this->_isInThePage() ) { |
|
| 47 | + if ( !$this->_isInThePage() ) { |
|
| 48 | 48 | return; |
| 49 | 49 | } |
| 50 | 50 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | public function _isInThePage() { |
| 118 | 118 | |
| 119 | 119 | // If it's not in one of the post type's pages |
| 120 | - if ( ! $this->oProp->bIsAdmin ) { |
|
| 120 | + if ( !$this->oProp->bIsAdmin ) { |
|
| 121 | 121 | return false; |
| 122 | 122 | } |
| 123 | 123 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | return true; |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | - if ( ! in_array( $this->oProp->sPageNow, array( 'edit.php', 'edit-tags.php', 'term.php', 'post.php', 'post-new.php' ) ) ) { |
|
| 129 | + if ( !in_array( $this->oProp->sPageNow, array( 'edit.php', 'edit-tags.php', 'term.php', 'post.php', 'post-new.php' ) ) ) { |
|
| 130 | 130 | return false; |
| 131 | 131 | } |
| 132 | 132 | |
@@ -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 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * @param string The text domain. Default: `admin-page-framework`. |
| 47 | 47 | * @return void |
| 48 | 48 | */ |
| 49 | - function __construct( $asTaxonomySlug, $sOptionKey='', $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
|
| 49 | + function __construct( $asTaxonomySlug, $sOptionKey = '', $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 ), |
@@ -54,8 +54,8 @@ discard block |
||
| 54 | 54 | return $this->_getFilteredColumnsByFilterPrefix( |
| 55 | 55 | $this->oUtil->getAsArray( $aColumns ), |
| 56 | 56 | 'columns_', |
| 57 | - isset( $_GET['taxonomy'] ) // in ajax, $_GET is not even set. |
|
| 58 | - ? $_GET['taxonomy'] |
|
| 57 | + isset( $_GET[ 'taxonomy' ] ) // in ajax, $_GET is not even set. |
|
| 58 | + ? $_GET[ 'taxonomy' ] |
|
| 59 | 59 | : '' |
| 60 | 60 | ); |
| 61 | 61 | } |
@@ -72,8 +72,8 @@ discard block |
||
| 72 | 72 | return $this->_getFilteredColumnsByFilterPrefix( |
| 73 | 73 | $this->oUtil->getAsArray( $aSortableColumns ), |
| 74 | 74 | 'sortable_columns_', |
| 75 | - isset( $_GET['taxonomy'] ) // in ajax, $_GET is not even set. |
|
| 76 | - ? $_GET['taxonomy'] |
|
| 75 | + isset( $_GET[ 'taxonomy' ] ) // in ajax, $_GET is not even set. |
|
| 76 | + ? $_GET[ 'taxonomy' ] |
|
| 77 | 77 | : '' |
| 78 | 78 | ); |
| 79 | 79 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | if ( $sTaxonomy ) { |
| 88 | 88 | $aColumns = $this->oUtil->addAndApplyFilter( |
| 89 | 89 | $this, |
| 90 | - "{$sFilterPrefix}{$_GET['taxonomy']}", |
|
| 90 | + "{$sFilterPrefix}{$_GET[ 'taxonomy' ]}", |
|
| 91 | 91 | $aColumns |
| 92 | 92 | ); |
| 93 | 93 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * @since DEVVER No longer sets the value to `$this-oProp->aOptions` but to the form peoperty. |
| 125 | 125 | * @internal |
| 126 | 126 | */ |
| 127 | - protected function _setOptionArray( $iTermID=null, $sOptionKey ) { |
|
| 127 | + protected function _setOptionArray( $iTermID = null, $sOptionKey ) { |
|
| 128 | 128 | $this->oForm->aSavedData = $this->_getSavedFormData( |
| 129 | 129 | $iTermID, |
| 130 | 130 | $sOptionKey |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | |
| 141 | 141 | return $this->oUtil->addAndApplyFilter( |
| 142 | 142 | $this, // the caller factory object |
| 143 | - 'options_' . $this->oProp->sClassName, |
|
| 143 | + 'options_'.$this->oProp->sClassName, |
|
| 144 | 144 | $this->_getSavedTermFormData( $iTermID, $sOptionKey ) |
| 145 | 145 | // @todo maybe pass the term id because the user will not know whihch form data is |
| 146 | 146 | ); |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | */ |
| 175 | 175 | public function _replyToValidateOptions( $iTermID ) { |
| 176 | 176 | |
| 177 | - if ( ! $this->_shouldProceedValidation() ) { |
|
| 177 | + if ( !$this->_shouldProceedValidation() ) { |
|
| 178 | 178 | return; |
| 179 | 179 | } |
| 180 | 180 | |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $_aSubmittedFormData = $this->oForm->getSubmittedData( $_POST ); |
| 184 | 184 | $_aSubmittedFormData = $this->oUtil->addAndApplyFilters( |
| 185 | 185 | $this, |
| 186 | - 'validation_' . $this->oProp->sClassName, |
|
| 186 | + 'validation_'.$this->oProp->sClassName, |
|
| 187 | 187 | call_user_func_array( |
| 188 | 188 | array( $this, 'validate' ), // triggers __call() |
| 189 | 189 | array( $_aSubmittedFormData, $_aSavedFormData, $this ) |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | |
| 195 | 195 | // @todo Examine whether it is appropriate to merge recursivly |
| 196 | 196 | // as some fields will have a problem such as select with multiple options. |
| 197 | - $_aTaxonomyFormData[ $iTermID ] = $this->oUtil->uniteArrays( |
|
| 197 | + $_aTaxonomyFormData[ $iTermID ] = $this->oUtil->uniteArrays( |
|
| 198 | 198 | $_aSubmittedFormData, |
| 199 | 199 | $_aSavedFormData |
| 200 | 200 | ); |
@@ -215,11 +215,11 @@ discard block |
||
| 215 | 215 | */ |
| 216 | 216 | private function _shouldProceedValidation() { |
| 217 | 217 | |
| 218 | - if ( ! isset( $_POST[ $this->oProp->sClassHash ] ) ) { |
|
| 218 | + if ( !isset( $_POST[ $this->oProp->sClassHash ] ) ) { |
|
| 219 | 219 | |
| 220 | 220 | return false; |
| 221 | 221 | } |
| 222 | - if ( ! wp_verify_nonce( $_POST[ $this->oProp->sClassHash ], $this->oProp->sClassHash ) ) { |
|
| 222 | + if ( !wp_verify_nonce( $_POST[ $this->oProp->sClassHash ], $this->oProp->sClassHash ) ) { |
|
| 223 | 223 | return false; |
| 224 | 224 | } |
| 225 | 225 | return true; |
@@ -215,7 +215,7 @@ |
||
| 215 | 215 | */ |
| 216 | 216 | private function _shouldProceedValidation() { |
| 217 | 217 | |
| 218 | - if ( ! isset( $_POST[ $this->oProp->sClassHash ] ) ) { |
|
| 218 | + if ( ! isset( $_POST[ $this->oProp->sClassHash ] ) ) { |
|
| 219 | 219 | |
| 220 | 220 | return false; |
| 221 | 221 | } |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | return "{$_aField['field_id']}{$_sKey}"; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - /** |
|
| 72 | + /** |
|
| 73 | 73 | * Adds input fields |
| 74 | 74 | * |
| 75 | 75 | * @internal |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | '', |
| 49 | 49 | "[{$_sKey}]" |
| 50 | 50 | ); |
| 51 | - return $_aField['field_id'] . $_sKey; |
|
| 51 | + return $_aField[ 'field_id' ].$_sKey; |
|
| 52 | 52 | |
| 53 | 53 | } |
| 54 | 54 | /** |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | '', |
| 67 | 67 | "|{$_sKey}" |
| 68 | 68 | ); |
| 69 | - return "{$_aField['field_id']}{$_sKey}"; |
|
| 69 | + return "{$_aField[ 'field_id' ]}{$_sKey}"; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $_aOutput = array(); |
| 117 | 117 | |
| 118 | 118 | // Set nonce. |
| 119 | - $_aOutput[] = wp_nonce_field( |
|
| 119 | + $_aOutput[ ] = wp_nonce_field( |
|
| 120 | 120 | $this->oProp->sClassHash, |
| 121 | 121 | $this->oProp->sClassHash, |
| 122 | 122 | true, |
@@ -127,17 +127,17 @@ discard block |
||
| 127 | 127 | $this->_setOptionArray( $iTermID, $this->oProp->sOptionKey ); |
| 128 | 128 | |
| 129 | 129 | // Get the field outputs |
| 130 | - $_aOutput[] = $this->oForm->get( $bRenderTableRow ); |
|
| 130 | + $_aOutput[ ] = $this->oForm->get( $bRenderTableRow ); |
|
| 131 | 131 | |
| 132 | 132 | // Filter the output |
| 133 | 133 | $_sOutput = $this->oUtil->addAndApplyFilters( |
| 134 | 134 | $this, |
| 135 | - 'content_' . $this->oProp->sClassName, |
|
| 135 | + 'content_'.$this->oProp->sClassName, |
|
| 136 | 136 | $this->content( implode( PHP_EOL, $_aOutput ) ) |
| 137 | 137 | ); |
| 138 | 138 | |
| 139 | 139 | // Do action |
| 140 | - $this->oUtil->addAndDoActions( $this, 'do_' . $this->oProp->sClassName, $this ); |
|
| 140 | + $this->oUtil->addAndDoActions( $this, 'do_'.$this->oProp->sClassName, $this ); |
|
| 141 | 141 | |
| 142 | 142 | return $_sOutput; |
| 143 | 143 | |
@@ -156,8 +156,8 @@ discard block |
||
| 156 | 156 | public function _replyToPrintColumnCell( $vValue, $sColumnSlug, $sTermID ) { |
| 157 | 157 | |
| 158 | 158 | $_sCellHTML = ''; |
| 159 | - if ( isset( $_GET['taxonomy'] ) && $_GET['taxonomy'] ) { |
|
| 160 | - $_sCellHTML = $this->oUtil->addAndApplyFilter( $this, "cell_{$_GET['taxonomy']}", $vValue, $sColumnSlug, $sTermID ); |
|
| 159 | + if ( isset( $_GET[ 'taxonomy' ] ) && $_GET[ 'taxonomy' ] ) { |
|
| 160 | + $_sCellHTML = $this->oUtil->addAndApplyFilter( $this, "cell_{$_GET[ 'taxonomy' ]}", $vValue, $sColumnSlug, $sTermID ); |
|
| 161 | 161 | } |
| 162 | 162 | $_sCellHTML = $this->oUtil->addAndApplyFilter( $this, "cell_{$this->oProp->sClassName}", $_sCellHTML, $sColumnSlug, $sTermID ); |
| 163 | 163 | $_sCellHTML = $this->oUtil->addAndApplyFilter( $this, "cell_{$this->oProp->sClassName}_{$sColumnSlug}", $_sCellHTML, $sTermID ); // 3.0.2+ |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | '' // default value |
| 38 | 38 | ); |
| 39 | 39 | |
| 40 | - if ( ! $this->canUserView( $this->sCapability ) ) { |
|
| 40 | + if ( !$this->canUserView( $this->sCapability ) ) { |
|
| 41 | 41 | return ''; |
| 42 | 42 | } |
| 43 | 43 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * |
| 67 | 67 | * @since 3.5.0 |
| 68 | 68 | */ |
| 69 | - public function enqueueStyles( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 69 | + public function enqueueStyles( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
| 70 | 70 | return $this->oResource->_enqueueStyles( $aSRCs, $aPostTypes, $aCustomArgs ); |
| 71 | 71 | } |
| 72 | 72 | /** |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * @param array (optional) The argument array for more advanced parameters. |
| 90 | 90 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
| 91 | 91 | */ |
| 92 | - public function enqueueStyle( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 92 | + public function enqueueStyle( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
| 93 | 93 | return $this->oResource->_enqueueStyle( $sSRC, $aPostTypes, $aCustomArgs ); |
| 94 | 94 | } |
| 95 | 95 | /** |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | * |
| 98 | 98 | * @since 3.5.0 |
| 99 | 99 | */ |
| 100 | - public function enqueueScripts( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 100 | + public function enqueueScripts( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
| 101 | 101 | return $this->oResource->_enqueueScripts( $aSRCs, $aPostTypes, $aCustomArgs ); |
| 102 | 102 | } |
| 103 | 103 | /** |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * @param array (optional) The argument array for more advanced parameters. |
| 133 | 133 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
| 134 | 134 | */ |
| 135 | - public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 135 | + public function enqueueScript( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
| 136 | 136 | return $this->oResource->_enqueueScript( $sSRC, $aPostTypes, $aCustomArgs ); |
| 137 | 137 | } |
| 138 | 138 | |
@@ -132,7 +132,7 @@ |
||
| 132 | 132 | * @param array (optional) The argument array for more advanced parameters. |
| 133 | 133 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
| 134 | 134 | */ |
| 135 | - public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 135 | + public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 136 | 136 | return $this->oResource->_enqueueScript( $sSRC, $aPostTypes, $aCustomArgs ); |
| 137 | 137 | } |
| 138 | 138 | |
@@ -63,21 +63,21 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function _replyToSaveFieldValues( $iUserID ) { |
| 65 | 65 | |
| 66 | - if ( ! current_user_can( 'edit_user', $iUserID ) ) { |
|
| 66 | + if ( !current_user_can( 'edit_user', $iUserID ) ) { |
|
| 67 | 67 | return; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | // Extract the fields data from $_POST |
| 71 | 71 | // Retrieve the submitted data. |
| 72 | - $_aInputs = $this->oForm->getSubmittedData( |
|
| 73 | - $_POST, // subject data to be parsed |
|
| 74 | - true, // extract data with the fieldset structure |
|
| 72 | + $_aInputs = $this->oForm->getSubmittedData( |
|
| 73 | + $_POST, // subject data to be parsed |
|
| 74 | + true, // extract data with the fieldset structure |
|
| 75 | 75 | false // strip slashes |
| 76 | 76 | ); |
| 77 | - $_aInputsRaw = $_aInputs; // store one for the last input array. |
|
| 77 | + $_aInputsRaw = $_aInputs; // store one for the last input array. |
|
| 78 | 78 | |
| 79 | 79 | // Prepare the saved data. For a new post, the id is set to 0. |
| 80 | - $_aSavedMeta = $this->oUtil->getSavedUserMetaArray( $iUserID, array_keys( $_aInputs ) ); |
|
| 80 | + $_aSavedMeta = $this->oUtil->getSavedUserMetaArray( $iUserID, array_keys( $_aInputs ) ); |
|
| 81 | 81 | |
| 82 | 82 | // Apply filters to the array of the submitted values. |
| 83 | 83 | $_aInputs = $this->oUtil->addAndApplyFilters( |
@@ -97,8 +97,8 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | $this->oForm->updateMetaDataByType( |
| 100 | - $iUserID, // object id |
|
| 101 | - $_aInputs, // user submit form data |
|
| 100 | + $iUserID, // object id |
|
| 101 | + $_aInputs, // user submit form data |
|
| 102 | 102 | $this->oForm->dropRepeatableElements( $_aSavedMeta ), // Drop repeatable section elements from the saved meta array. |
| 103 | 103 | $this->oForm->sStructureType // fields type |
| 104 | 104 | ); |
@@ -45,17 +45,17 @@ |
||
| 45 | 45 | $_aOutput = array(); |
| 46 | 46 | |
| 47 | 47 | // Get the field outputs |
| 48 | - $_aOutput[] = $this->oForm->get(); |
|
| 48 | + $_aOutput[ ] = $this->oForm->get(); |
|
| 49 | 49 | |
| 50 | 50 | // Filter the output |
| 51 | 51 | $_sOutput = $this->oUtil->addAndApplyFilters( |
| 52 | 52 | $this, |
| 53 | - 'content_' . $this->oProp->sClassName, |
|
| 53 | + 'content_'.$this->oProp->sClassName, |
|
| 54 | 54 | $this->content( implode( PHP_EOL, $_aOutput ) ) |
| 55 | 55 | ); |
| 56 | 56 | |
| 57 | 57 | // Do action |
| 58 | - $this->oUtil->addAndDoActions( $this, 'do_' . $this->oProp->sClassName, $this ); |
|
| 58 | + $this->oUtil->addAndDoActions( $this, 'do_'.$this->oProp->sClassName, $this ); |
|
| 59 | 59 | |
| 60 | 60 | // Output |
| 61 | 61 | echo $_sOutput; |