@@ -44,22 +44,22 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | - * The method for necessary set-ups. |
|
| 48 | - * |
|
| 49 | - * <h4>Example</h4> |
|
| 50 | - * <code> |
|
| 51 | - * public function setUp() { |
|
| 52 | - * $this->setArguments( |
|
| 53 | - * array( |
|
| 54 | - * 'description' => __( 'This is a sample widget with built-in field types created by Admin Page Framework.', 'admin-page-framework-demo' ), |
|
| 55 | - * ) |
|
| 56 | - * ); |
|
| 57 | - * } |
|
| 58 | - * </code> |
|
| 59 | - * |
|
| 60 | - * @abstract |
|
| 61 | - * @since 3.2.0 |
|
| 62 | - */ |
|
| 47 | + * The method for necessary set-ups. |
|
| 48 | + * |
|
| 49 | + * <h4>Example</h4> |
|
| 50 | + * <code> |
|
| 51 | + * public function setUp() { |
|
| 52 | + * $this->setArguments( |
|
| 53 | + * array( |
|
| 54 | + * 'description' => __( 'This is a sample widget with built-in field types created by Admin Page Framework.', 'admin-page-framework-demo' ), |
|
| 55 | + * ) |
|
| 56 | + * ); |
|
| 57 | + * } |
|
| 58 | + * </code> |
|
| 59 | + * |
|
| 60 | + * @abstract |
|
| 61 | + * @since 3.2.0 |
|
| 62 | + */ |
|
| 63 | 63 | public function setUp() {} |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | * @since 3.2.0 |
| 151 | 151 | * @internal Temporarily marked internal |
| 152 | 152 | */ |
| 153 | - public function enqueueStyles( $aSRCs, $aCustomArgs=array() ) { |
|
| 153 | + public function enqueueStyles( $aSRCs, $aCustomArgs = array() ) { |
|
| 154 | 154 | if ( method_exists( $this->oResource, '_enqueueStyles' ) ) { |
| 155 | 155 | return $this->oResource->_enqueueStyles( $aSRCs, array( $this->oProp->sPostType ), $aCustomArgs ); |
| 156 | 156 | } |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | * @since 3.2.0 |
| 164 | 164 | * @internal Temporarily marked internal |
| 165 | 165 | */ |
| 166 | - public function enqueueStyle( $sSRC, $aCustomArgs=array() ) { |
|
| 166 | + public function enqueueStyle( $sSRC, $aCustomArgs = array() ) { |
|
| 167 | 167 | if ( method_exists( $this->oResource, '_enqueueStyle' ) ) { |
| 168 | 168 | return $this->oResource->_enqueueStyle( $sSRC, array( $this->oProp->sPostType ), $aCustomArgs ); |
| 169 | 169 | } |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | * @since 3.2.0 |
| 177 | 177 | * @internal Temporarily marked internal |
| 178 | 178 | */ |
| 179 | - public function enqueueScripts( $aSRCs, $aCustomArgs=array() ) { |
|
| 179 | + public function enqueueScripts( $aSRCs, $aCustomArgs = array() ) { |
|
| 180 | 180 | if ( method_exists( $this->oResource, '_enqueueScripts' ) ) { |
| 181 | 181 | return $this->oResource->_enqueueScripts( $aSRCs, array( $this->oProp->sPostType ), $aCustomArgs ); |
| 182 | 182 | } |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | * @since 3.2.0 |
| 190 | 190 | * @internal Temporarily marked internal |
| 191 | 191 | */ |
| 192 | - public function enqueueScript( $sSRC, $aCustomArgs=array() ) { |
|
| 192 | + public function enqueueScript( $sSRC, $aCustomArgs = array() ) { |
|
| 193 | 193 | if ( method_exists( $this->oResource, '_enqueueScript' ) ) { |
| 194 | 194 | return $this->oResource->_enqueueScript( $sSRC, array( $this->oProp->sPostType ), $aCustomArgs ); |
| 195 | 195 | } |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | * @since 3.2.0 |
| 204 | 204 | * @return void |
| 205 | 205 | */ |
| 206 | - protected function setArguments( array $aArguments=array() ) { |
|
| 206 | + protected function setArguments( array $aArguments = array() ) { |
|
| 207 | 207 | $this->oProp->aWidgetArguments = $aArguments; |
| 208 | 208 | } |
| 209 | 209 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * @package AdminPageFramework |
| 18 | 18 | * @subpackage Widget |
| 19 | 19 | */ |
| 20 | -abstract class AdminPageFramework_Widget_Controller extends AdminPageFramework_Widget_View { |
|
| 20 | +abstract class AdminPageFramework_Widget_Controller extends AdminPageFramework_Widget_View { |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * The method for necessary set-ups. |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | * @since 3.2.0 |
| 127 | 127 | * @internal Temporarily marked internal |
| 128 | 128 | */ |
| 129 | - public function enqueueStyles( $aSRCs, $aCustomArgs=array() ) { |
|
| 129 | + public function enqueueStyles( $aSRCs, $aCustomArgs=array() ) { |
|
| 130 | 130 | if ( method_exists( $this->oResource, '_enqueueStyles' ) ) { |
| 131 | 131 | return $this->oResource->_enqueueStyles( $aSRCs, array( $this->oProp->sPostType ), $aCustomArgs ); |
| 132 | 132 | } |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | * @since 3.2.0 |
| 166 | 166 | * @internal Temporarily marked internal |
| 167 | 167 | */ |
| 168 | - public function enqueueScript( $sSRC, $aCustomArgs=array() ) { |
|
| 168 | + public function enqueueScript( $sSRC, $aCustomArgs=array() ) { |
|
| 169 | 169 | if ( method_exists( $this->oResource, '_enqueueScript' ) ) { |
| 170 | 170 | return $this->oResource->_enqueueScript( $sSRC, array( $this->oProp->sPostType ), $aCustomArgs ); |
| 171 | 171 | } |
@@ -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 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | * @subpackage Widget |
| 19 | 19 | * @internal |
| 20 | 20 | */ |
| 21 | -abstract class AdminPageFramework_Widget_Model extends AdminPageFramework_Widget_Router { |
|
| 21 | +abstract class AdminPageFramework_Widget_Model extends AdminPageFramework_Widget_Router { |
|
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * Sets up hooks and properties. |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * @return array |
| 53 | 53 | * @callback filter validation_{factory class name} |
| 54 | 54 | */ |
| 55 | - public function _replyToSortInputs( $aSubmittedFormData, $aStoredFormData, $oFactory ) { |
|
| 55 | + public function _replyToSortInputs( $aSubmittedFormData, $aStoredFormData, $oFactory ) { |
|
| 56 | 56 | // @todo examine whether stripslashes_deep() is necessary or not. |
| 57 | 57 | return $this->oForm->getSortedInputs( $aSubmittedFormData ); |
| 58 | 58 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | public function _replyToRegisterWidget() { |
| 111 | 111 | |
| 112 | 112 | global $wp_widget_factory; |
| 113 | - if ( ! is_object( $wp_widget_factory ) ) { |
|
| 113 | + if ( ! is_object( $wp_widget_factory ) ) { |
|
| 114 | 114 | return; |
| 115 | 115 | } |
| 116 | 116 | |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * @subpackage Widget |
| 17 | 17 | * @internal |
| 18 | 18 | */ |
| 19 | -abstract class AdminPageFramework_Widget_Router extends AdminPageFramework_Factory { |
|
| 19 | +abstract class AdminPageFramework_Widget_Router extends AdminPageFramework_Factory { |
|
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * Determines whether the currently loaded page is of the post type page. |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * @package AdminPageFramework |
| 18 | 18 | * @subpackage Widget |
| 19 | 19 | */ |
| 20 | -abstract class AdminPageFramework_Widget_View extends AdminPageFramework_Widget_Model { |
|
| 20 | +abstract class AdminPageFramework_Widget_View extends AdminPageFramework_Widget_Model { |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * Filters the post type post content. |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * @remark This class should be overridden in the extended class so that the user can display own contents. |
| 40 | 40 | * @since 3.2.0 |
| 41 | 41 | */ |
| 42 | - public function content( $sContent, $aArguments, $aFormData ) { |
|
| 42 | + public function content( $sContent, $aArguments, $aFormData ) { |
|
| 43 | 43 | return $sContent; |
| 44 | 44 | } |
| 45 | 45 | |
@@ -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 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * @since DEVVER |
| 22 | 22 | * @return string |
| 23 | 23 | */ |
| 24 | - protected function _get() { |
|
| 24 | + protected function _get() { |
|
| 25 | 25 | return $this->_getWidgetRules(); |
| 26 | 26 | } |
| 27 | 27 | /** |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | } |
| 105 | 105 | // If the WordPress version is greater than equal to 3.8, add MP6(the admin style introduced in 3.8) specific CSS rules. |
| 106 | - if ( version_compare( $GLOBALS[ 'wp_version' ], '3.8', '>=' ) ) { |
|
| 106 | + if ( version_compare( $GLOBALS[ 'wp_version' ], '3.8', '>=' ) ) { |
|
| 107 | 107 | |
| 108 | 108 | $_sCSSRules .= <<<CSSRULES |
| 109 | 109 | /* Widget Forms */ |
@@ -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 '' |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | public function replyToDecideToLoad( $oScreen ) { |
| 29 | 29 | |
| 30 | - if ( ! $this->_isInThePage() ) { |
|
| 30 | + if ( !$this->_isInThePage() ) { |
|
| 31 | 31 | return; |
| 32 | 32 | } |
| 33 | 33 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | // Retrieve the development version. |
| 40 | 40 | $this->_sDevelopmentVersion = $this->oUtil->getTransient( |
| 41 | - AdminPageFrameworkLoader_Registry::TRANSIENT_PREFIX . 'devver' |
|
| 41 | + AdminPageFrameworkLoader_Registry::TRANSIENT_PREFIX.'devver' |
|
| 42 | 42 | ); |
| 43 | 43 | |
| 44 | 44 | // Disable the meta box if the development version is not above the running one. |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | private function _scheduleEvent() { |
| 59 | 59 | |
| 60 | - $_sActionName = AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_action_get_development_version'; |
|
| 60 | + $_sActionName = AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_action_get_development_version'; |
|
| 61 | 61 | $_aArguments = array(); |
| 62 | 62 | if ( wp_next_scheduled( $_sActionName, $_aArguments ) ) { |
| 63 | 63 | return false; |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | ) |
| 92 | 92 | . "</p>" |
| 93 | 93 | . "<div style='width:100%; display:inline-block;'>" |
| 94 | - . '<a href="' . esc_url( 'https://github.com/michaeluno/admin-page-framework/archive/dev.zip' ). '">' |
|
| 94 | + . '<a href="'.esc_url( 'https://github.com/michaeluno/admin-page-framework/archive/dev.zip' ).'">' |
|
| 95 | 95 | . "<div class='button button-primary float-right'>" |
| 96 | 96 | . __( 'Download', 'admin-page-framework-loader' ) |
| 97 | 97 | . "</div>" |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | . "</div>" |
| 100 | 100 | ; |
| 101 | 101 | |
| 102 | - return $_sInsert . $sContent; |
|
| 102 | + return $_sInsert.$sContent; |
|
| 103 | 103 | |
| 104 | 104 | } |
| 105 | 105 | |