@@ -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 | |
@@ -119,7 +119,7 @@ |
||
| 119 | 119 | * @param array (optional) The argument array for more advanced parameters. |
| 120 | 120 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
| 121 | 121 | */ |
| 122 | - public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 122 | + public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 123 | 123 | return $this->oResource->_enqueueScript( $sSRC, $aPostTypes, $aCustomArgs ); |
| 124 | 124 | } |
| 125 | 125 | |
@@ -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; |
@@ -39,9 +39,9 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | if ( $this->oProp->bIsAdmin ) { |
| 41 | 41 | add_filter( |
| 42 | - 'validation_' . $this->oProp->sClassName, |
|
| 42 | + 'validation_'.$this->oProp->sClassName, |
|
| 43 | 43 | array( $this, '_replyToSortInputs' ), |
| 44 | - 1, // set a high priority |
|
| 44 | + 1, // set a high priority |
|
| 45 | 45 | 3 // number of parameters |
| 46 | 46 | ); |
| 47 | 47 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | public function _replyToRegisterWidget() { |
| 112 | 112 | |
| 113 | 113 | global $wp_widget_factory; |
| 114 | - if ( ! is_object( $wp_widget_factory ) ) { |
|
| 114 | + if ( !is_object( $wp_widget_factory ) ) { |
|
| 115 | 115 | return; |
| 116 | 116 | } |
| 117 | 117 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * @package AdminPageFramework/Factory/Widget |
| 18 | 18 | * @internal |
| 19 | 19 | */ |
| 20 | -abstract class AdminPageFramework_Widget_Model extends AdminPageFramework_Widget_Router { |
|
| 20 | +abstract class AdminPageFramework_Widget_Model extends AdminPageFramework_Widget_Router { |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * Sets up hooks and properties. |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * @return array |
| 52 | 52 | * @callback filter validation_{factory class name} |
| 53 | 53 | */ |
| 54 | - public function _replyToSortInputs( $aSubmittedFormData, $aStoredFormData, $oFactory ) { |
|
| 54 | + public function _replyToSortInputs( $aSubmittedFormData, $aStoredFormData, $oFactory ) { |
|
| 55 | 55 | // @todo examine whether stripslashes_deep() is necessary or not. |
| 56 | 56 | return $this->oForm->getSortedInputs( $aSubmittedFormData ); |
| 57 | 57 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | public function _replyToRegisterWidget() { |
| 110 | 110 | |
| 111 | 111 | global $wp_widget_factory; |
| 112 | - if ( ! is_object( $wp_widget_factory ) ) { |
|
| 112 | + if ( ! is_object( $wp_widget_factory ) ) { |
|
| 113 | 113 | return; |
| 114 | 114 | } |
| 115 | 115 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * @since 3.5.0 |
| 86 | 86 | * @since 3.6.0 Made it accept string content to be passed to the first parameter. |
| 87 | 87 | */ |
| 88 | - public function __construct( $sFilePathOrContent='', array $aReplacements=array(), array $aCallbacks=array() ) { |
|
| 88 | + public function __construct( $sFilePathOrContent = '', array $aReplacements = array(), array $aCallbacks = array() ) { |
|
| 89 | 89 | |
| 90 | 90 | $this->sText = file_exists( $sFilePathOrContent ) |
| 91 | 91 | ? file_get_contents( $sFilePathOrContent ) |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | '/^[\s]*==[\s]*(.+?)[\s]*==/m', |
| 122 | 122 | $sText, |
| 123 | 123 | -1, |
| 124 | - PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY |
|
| 124 | + PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY |
|
| 125 | 125 | ); |
| 126 | 126 | return $_aSections; |
| 127 | 127 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * @since 3.5.0 |
| 133 | 133 | * @return string |
| 134 | 134 | */ |
| 135 | - public function get( $sSectionName='' ) { |
|
| 135 | + public function get( $sSectionName = '' ) { |
|
| 136 | 136 | return $sSectionName |
| 137 | 137 | ? $this->getSection( $sSectionName ) |
| 138 | 138 | : $this->_getParsedText( $this->sText ); |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | */ |
| 195 | 195 | public function _replyToReplaceCodeBlocks( $aMatches ) { |
| 196 | 196 | |
| 197 | - if ( ! isset( $aMatches[ 1 ] ) ) { |
|
| 197 | + if ( !isset( $aMatches[ 1 ] ) ) { |
|
| 198 | 198 | return $aMatches[ 0 ]; |
| 199 | 199 | } |
| 200 | 200 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | */ |
| 218 | 218 | public function getRawSection( $sSectionName ) { |
| 219 | 219 | |
| 220 | - $_iIndex = array_search( $sSectionName, $this->_aSections ); |
|
| 220 | + $_iIndex = array_search( $sSectionName, $this->_aSections ); |
|
| 221 | 221 | return false === $_iIndex |
| 222 | 222 | ? '' |
| 223 | 223 | : trim( $this->_aSections[ $_iIndex + 1 ] ); |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | // If <?php notation is missing, highlight_string() will not highlight the syntax so add it. |
| 238 | 238 | $_bHasPHPTag = "<?php" === substr( $sCode, 0, 5 ); |
| 239 | 239 | |
| 240 | - $sCode = $_bHasPHPTag ? $sCode : "<?php " . $sCode; |
|
| 240 | + $sCode = $_bHasPHPTag ? $sCode : "<?php ".$sCode; |
|
| 241 | 241 | |
| 242 | 242 | $sCode = str_replace( '"', "'", $sCode ); // highlight_string() crashes if double quotes are contained in the code. |
| 243 | 243 | $sCode = highlight_string( $sCode, true ); |
@@ -92,7 +92,6 @@ discard block |
||
| 92 | 92 | * 'code_block' => ..., |
| 93 | 93 | * |
| 94 | 94 | * )</code> |
| 95 | - * @param array $aOptions The options array which determines the behaviour of the class. |
|
| 96 | 95 | * @since 3.5.0 |
| 97 | 96 | * @since 3.6.0 Made it accept string content to be passed to the first parameter. |
| 98 | 97 | */ |
@@ -167,6 +166,7 @@ discard block |
||
| 167 | 166 | * Returns the parsed text. |
| 168 | 167 | * @since 3.5.0 |
| 169 | 168 | * @internal |
| 169 | + * @param string $sContent |
|
| 170 | 170 | */ |
| 171 | 171 | private function _getParsedText( $sContent ) { |
| 172 | 172 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | trigger_error( |
| 44 | - 'Admin Page Framework - Loader: ' . ' : ' . sprintf( |
|
| 44 | + 'Admin Page Framework - Loader: '.' : '.sprintf( |
|
| 45 | 45 | __( 'The method is not defined: %1$s', 'admin-page-framework-loader' ), |
| 46 | 46 | $sMethodName |
| 47 | 47 | ), |
@@ -24,12 +24,12 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function content( $sContent ) { |
| 26 | 26 | |
| 27 | - $_aReplacements = array( |
|
| 27 | + $_aReplacements = array( |
|
| 28 | 28 | '%PLUGIN_DIR_URL%' => AdminPageFrameworkLoader_Registry::getPluginURL(), |
| 29 | 29 | '%WP_ADMIN_URL%' => admin_url(), |
| 30 | 30 | ); |
| 31 | 31 | $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser( |
| 32 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/about.txt', |
|
| 32 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/about.txt', |
|
| 33 | 33 | $_aReplacements |
| 34 | 34 | ); |
| 35 | 35 | return '' |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | // If the section (row) tag is not closed, close it. |
| 96 | - if ( $_aColumnInfo[ 'bRowTagOpened' ] && ! $_aColumnInfo[ 'bRowTagClosed' ] ) { |
|
| 96 | + if ( $_aColumnInfo[ 'bRowTagOpened' ] && ! $_aColumnInfo[ 'bRowTagClosed' ] ) { |
|
| 97 | 97 | $_aOutput[] = '</div>'; |
| 98 | 98 | } |
| 99 | 99 | $_aColumnInfo[ 'bRowTagClosed' ] = true; |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | private function _getFeedListItem( array $aItem, array &$aColumnInfo, array $aColumnOption, $sSiteURLWOQuery='' ) { |
| 114 | 114 | |
| 115 | 115 | // Initial checks |
| 116 | - if ( ! isset( $aItem[ 'title' ] ) ) { |
|
| 116 | + if ( ! isset( $aItem[ 'title' ] ) ) { |
|
| 117 | 117 | return ''; |
| 118 | 118 | } |
| 119 | 119 | |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | // add_filter( 'wp_feed_cache_transient_lifetime', '__return_zero' ); |
| 34 | 34 | |
| 35 | 35 | // Styles |
| 36 | - $this->oFactory->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/column.css' ); |
|
| 37 | - $this->oFactory->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/feed-list.css' ); |
|
| 36 | + $this->oFactory->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/column.css' ); |
|
| 37 | + $this->oFactory->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/feed-list.css' ); |
|
| 38 | 38 | |
| 39 | 39 | // $this->oFactory->setPageTitleVisibility( false ); |
| 40 | 40 | $this->oFactory->setInPageTabsVisibility( false ); |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | public function replyToDoTab() { |
| 48 | 48 | |
| 49 | 49 | $_oFeedList = new AdminPageFrameworkLoader_FeedList( $this->sRSSURL ); |
| 50 | - $_aFeedItems = apply_filters( AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_admin_add_ons', $this->_getDemo() + $_oFeedList->get() ); |
|
| 50 | + $_aFeedItems = apply_filters( AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_admin_add_ons', $this->_getDemo() + $_oFeedList->get() ); |
|
| 51 | 51 | if ( empty( $_aFeedItems ) ) { |
| 52 | - echo "<p>" . __( 'No add-on could be found.', 'admin-page-framework-loader' ) . "</p>"; |
|
| 52 | + echo "<p>".__( 'No add-on could be found.', 'admin-page-framework-loader' )."</p>"; |
|
| 53 | 53 | return; |
| 54 | 54 | } |
| 55 | 55 | |
@@ -67,13 +67,13 @@ discard block |
||
| 67 | 67 | private function _getList( array $aFeedItems ) { |
| 68 | 68 | |
| 69 | 69 | $_aOutput = array(); |
| 70 | - $_aColumnInfo = array ( // this will be modified as the items get rendered |
|
| 70 | + $_aColumnInfo = array( // this will be modified as the items get rendered |
|
| 71 | 71 | 'bRowTagOpened' => false, |
| 72 | 72 | 'bRowTagClosed' => false, |
| 73 | 73 | 'iCurrRowPos' => 0, |
| 74 | 74 | 'iCurrColPos' => 0, |
| 75 | 75 | ); |
| 76 | - $_aColumnOption = array ( |
|
| 76 | + $_aColumnOption = array( |
|
| 77 | 77 | 'iMaxCols' => 3, |
| 78 | 78 | 'sClassAttr' => 'apfl_columns', |
| 79 | 79 | 'sClassAttrGroup' => 'apfl_columns_box', |
@@ -82,9 +82,9 @@ discard block |
||
| 82 | 82 | 'sClassAttrFirstCol' => 'apfl_columns_first_col', |
| 83 | 83 | ); |
| 84 | 84 | |
| 85 | - $_sSiteURLWOQuery = preg_replace( '/\?.*/', '', get_bloginfo( 'url' ) ); |
|
| 86 | - foreach( $aFeedItems as $_aItem ) { |
|
| 87 | - $_aOutput[] = $this->_getFeedListItem( |
|
| 85 | + $_sSiteURLWOQuery = preg_replace( '/\?.*/', '', get_bloginfo( 'url' ) ); |
|
| 86 | + foreach ( $aFeedItems as $_aItem ) { |
|
| 87 | + $_aOutput[ ] = $this->_getFeedListItem( |
|
| 88 | 88 | ( array ) $_aItem, |
| 89 | 89 | $_aColumnInfo, |
| 90 | 90 | $_aColumnOption, |
@@ -93,14 +93,14 @@ discard block |
||
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | // If the section (row) tag is not closed, close it. |
| 96 | - if ( $_aColumnInfo[ 'bRowTagOpened' ] && ! $_aColumnInfo[ 'bRowTagClosed' ] ) { |
|
| 97 | - $_aOutput[] = '</div>'; |
|
| 96 | + if ( $_aColumnInfo[ 'bRowTagOpened' ] && !$_aColumnInfo[ 'bRowTagClosed' ] ) { |
|
| 97 | + $_aOutput[ ] = '</div>'; |
|
| 98 | 98 | } |
| 99 | 99 | $_aColumnInfo[ 'bRowTagClosed' ] = true; |
| 100 | 100 | |
| 101 | 101 | // Enclose the output in the group tag |
| 102 | 102 | return '<div class="apfl_addon_list_container">' |
| 103 | - . '<div class="' . $_aColumnOption[ 'sClassAttr' ] . ' ' . $_aColumnOption[ 'sClassAttrGroup' ] . '">' |
|
| 103 | + . '<div class="'.$_aColumnOption[ 'sClassAttr' ].' '.$_aColumnOption[ 'sClassAttrGroup' ].'">' |
|
| 104 | 104 | . implode( '', $_aOutput ) |
| 105 | 105 | . '</div>' |
| 106 | 106 | . '</div>'; |
@@ -110,10 +110,10 @@ discard block |
||
| 110 | 110 | * Returns an HTML output from the given feed item array. |
| 111 | 111 | * @return string |
| 112 | 112 | */ |
| 113 | - private function _getFeedListItem( array $aItem, array &$aColumnInfo, array $aColumnOption, $sSiteURLWOQuery='' ) { |
|
| 113 | + private function _getFeedListItem( array $aItem, array &$aColumnInfo, array $aColumnOption, $sSiteURLWOQuery = '' ) { |
|
| 114 | 114 | |
| 115 | 115 | // Initial checks |
| 116 | - if ( ! isset( $aItem[ 'title' ] ) ) { |
|
| 116 | + if ( !isset( $aItem[ 'title' ] ) ) { |
|
| 117 | 117 | return ''; |
| 118 | 118 | } |
| 119 | 119 | |
@@ -139,20 +139,20 @@ discard block |
||
| 139 | 139 | $_sTarget = ''; |
| 140 | 140 | |
| 141 | 141 | // Enclose the item buffer into the item container |
| 142 | - $_sItem = '<div class="' . $aColumnOption['sClassAttrCol'] |
|
| 143 | - . ' apfl_col_element_of_' . $aColumnOption['iMaxCols'] . ' ' |
|
| 142 | + $_sItem = '<div class="'.$aColumnOption[ 'sClassAttrCol' ] |
|
| 143 | + . ' apfl_col_element_of_'.$aColumnOption[ 'iMaxCols' ].' ' |
|
| 144 | 144 | . ' apfl_extension ' |
| 145 | - . ( ( 1 == $aColumnInfo['iCurrColPos'] ) ? $aColumnOption['sClassAttrFirstCol'] : '' ) |
|
| 145 | + . ( ( 1 == $aColumnInfo[ 'iCurrColPos' ] ) ? $aColumnOption[ 'sClassAttrFirstCol' ] : '' ) |
|
| 146 | 146 | . '"' |
| 147 | 147 | . '>' |
| 148 | 148 | . '<div class="apfl_addon_item">' |
| 149 | - . "<h4 class='apfl_feed_item_title'>{$aItem['title']}</h4>" |
|
| 149 | + . "<h4 class='apfl_feed_item_title'>{$aItem[ 'title' ]}</h4>" |
|
| 150 | 150 | . "<div class='apfl_feed_item_description'>" |
| 151 | - . $aItem['description'] |
|
| 151 | + . $aItem[ 'description' ] |
|
| 152 | 152 | . "</div>" |
| 153 | 153 | . "<div class='get-now apfl_feed_item_link_button'>" |
| 154 | - . "<a href='" . esc_url( $aItem[ 'link' ] ) . "' target='{$_sTarget}' rel='nofollow' class='button button-secondary'>" |
|
| 155 | - . $aItem['label'] |
|
| 154 | + . "<a href='".esc_url( $aItem[ 'link' ] )."' target='{$_sTarget}' rel='nofollow' class='button button-secondary'>" |
|
| 155 | + . $aItem[ 'label' ] |
|
| 156 | 156 | . "</a>" |
| 157 | 157 | . "</div>" |
| 158 | 158 | . '</div>' |
@@ -160,18 +160,18 @@ discard block |
||
| 160 | 160 | |
| 161 | 161 | // If it's the first item in the row, add the class attribute. |
| 162 | 162 | // Be aware that at this point, the tag will be unclosed. Therefore, it must be closed later at some point. |
| 163 | - if ( 1 == $aColumnInfo['iCurrColPos'] ) { |
|
| 164 | - $aColumnInfo['bRowTagOpened'] = true; |
|
| 165 | - $_sItem = '<div class="' . $aColumnOption['sClassAttrRow'] . '">' |
|
| 163 | + if ( 1 == $aColumnInfo[ 'iCurrColPos' ] ) { |
|
| 164 | + $aColumnInfo[ 'bRowTagOpened' ] = true; |
|
| 165 | + $_sItem = '<div class="'.$aColumnOption[ 'sClassAttrRow' ].'">' |
|
| 166 | 166 | . $_sItem; |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | // If the current column position reached the set max column, increment the current position of row |
| 170 | - if ( 0 === ( $aColumnInfo['iCurrColPos'] % $aColumnOption['iMaxCols'] ) ) { |
|
| 171 | - $aColumnInfo['iCurrRowPos']++; // increment the row number |
|
| 172 | - $aColumnInfo['iCurrColPos'] = 0; // reset the current column position |
|
| 173 | - $_sItem .= '</div>'; // close the section(row) div tag |
|
| 174 | - $aColumnInfo['bRowTagClosed'] = true; |
|
| 170 | + if ( 0 === ( $aColumnInfo[ 'iCurrColPos' ] % $aColumnOption[ 'iMaxCols' ] ) ) { |
|
| 171 | + $aColumnInfo[ 'iCurrRowPos' ]++; // increment the row number |
|
| 172 | + $aColumnInfo[ 'iCurrColPos' ] = 0; // reset the current column position |
|
| 173 | + $_sItem .= '</div>'; // close the section(row) div tag |
|
| 174 | + $aColumnInfo[ 'bRowTagClosed' ] = true; |
|
| 175 | 175 | } |
| 176 | 176 | return $_sItem; |
| 177 | 177 | |
@@ -183,14 +183,14 @@ discard block |
||
| 183 | 183 | */ |
| 184 | 184 | private function _getDemo() { |
| 185 | 185 | |
| 186 | - $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys['main'] ); |
|
| 186 | + $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys[ 'main' ] ); |
|
| 187 | 187 | $_bEnabled = $_oOption->get( 'enable_demo' ); |
| 188 | 188 | |
| 189 | 189 | $_sTitle = __( 'Demo', 'admin=page-framework-loader' ); |
| 190 | 190 | return array( |
| 191 | 191 | $_sTitle => array( |
| 192 | 192 | 'title' => $_sTitle, |
| 193 | - 'description' => '<div style="text-align: center;" class="aligncenter"><img class="aligncenter" src="' . AdminPageFrameworkLoader_Registry::getPluginURL( '/asset/image/icon-128x128.png' ) . '" alt="' . esc_attr( $_sTitle ) . '"/></div>' |
|
| 193 | + 'description' => '<div style="text-align: center;" class="aligncenter"><img class="aligncenter" src="'.AdminPageFrameworkLoader_Registry::getPluginURL( '/asset/image/icon-128x128.png' ).'" alt="'.esc_attr( $_sTitle ).'"/></div>' |
|
| 194 | 194 | . '<p>' |
| 195 | 195 | . __( 'Showcases the features of Admin Page Framework.', 'admin-page-framework-loader' ) |
| 196 | 196 | . '</p>', |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | ? 0 |
| 201 | 201 | : 1, |
| 202 | 202 | ) + $_GET, |
| 203 | - admin_url( $GLOBALS['pagenow'] ) |
|
| 203 | + admin_url( $GLOBALS[ 'pagenow' ] ) |
|
| 204 | 204 | ), |
| 205 | 205 | 'label' => $_bEnabled |
| 206 | 206 | ? "<span id='button-deactivate-demo' class='deactivate'>" |