@@ -219,24 +219,24 @@ discard block |
||
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | /** |
| 222 | - * Adds the given link(s) into the description cell of the plugin listing table. |
|
| 223 | - * |
|
| 224 | - * <h4>Example</h4> |
|
| 225 | - * <code>$this->addLinkToPluginDescription( |
|
| 226 | - * "<a href='http://www.google.com'>Google</a>", |
|
| 227 | - * "<a href='http://www.yahoo.com'>Yahoo!</a>" |
|
| 228 | - * );</code> |
|
| 229 | - * |
|
| 230 | - * @since 2.0.0 |
|
| 231 | - * @since 3.0.0 Changed the scope to public from protected. |
|
| 232 | - * @since 3.3.1 Moved from `AdminPageFramework`. |
|
| 233 | - * @remark Accepts variadic parameters; the number of accepted parameters are not limited to three. |
|
| 234 | - * @param string the tagged HTML link text. |
|
| 235 | - * @param string (optional) another tagged HTML link text. |
|
| 236 | - * @param string (optional) add more as many as want by adding items to the next parameters. |
|
| 237 | - * @access public |
|
| 238 | - * @return void |
|
| 239 | - */ |
|
| 222 | + * Adds the given link(s) into the description cell of the plugin listing table. |
|
| 223 | + * |
|
| 224 | + * <h4>Example</h4> |
|
| 225 | + * <code>$this->addLinkToPluginDescription( |
|
| 226 | + * "<a href='http://www.google.com'>Google</a>", |
|
| 227 | + * "<a href='http://www.yahoo.com'>Yahoo!</a>" |
|
| 228 | + * );</code> |
|
| 229 | + * |
|
| 230 | + * @since 2.0.0 |
|
| 231 | + * @since 3.0.0 Changed the scope to public from protected. |
|
| 232 | + * @since 3.3.1 Moved from `AdminPageFramework`. |
|
| 233 | + * @remark Accepts variadic parameters; the number of accepted parameters are not limited to three. |
|
| 234 | + * @param string the tagged HTML link text. |
|
| 235 | + * @param string (optional) another tagged HTML link text. |
|
| 236 | + * @param string (optional) add more as many as want by adding items to the next parameters. |
|
| 237 | + * @access public |
|
| 238 | + * @return void |
|
| 239 | + */ |
|
| 240 | 240 | public function addLinkToPluginDescription( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) { |
| 241 | 241 | if ( method_exists( $this->oLink, '_addLinkToPluginDescription' ) ) { |
| 242 | 242 | $this->oLink->_addLinkToPluginDescription( func_get_args() ); |
@@ -244,23 +244,23 @@ discard block |
||
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | /** |
| 247 | - * Adds the given link(s) into the title cell of the plugin listing table. |
|
| 248 | - * |
|
| 249 | - * <h4>Example</h4> |
|
| 250 | - * <code>$this->addLinkToPluginTitle( |
|
| 251 | - * "<a href='http://www.wordpress.org'>WordPress</a>" |
|
| 252 | - * );</code> |
|
| 253 | - * |
|
| 254 | - * @since 2.0.0 |
|
| 255 | - * @since 3.0.0 Changed the scope to public from protected. |
|
| 256 | - * @since 3.3.1 Moved from `AdminPageFramework`. |
|
| 257 | - * @remark Accepts variadic parameters; the number of accepted parameters are not limited to three. |
|
| 258 | - * @param string the tagged HTML link text. |
|
| 259 | - * @param string (optional) another tagged HTML link text. |
|
| 260 | - * @param string (optional) add more as many as want by adding items to the next parameters. |
|
| 261 | - * @access public |
|
| 262 | - * @return void |
|
| 263 | - */ |
|
| 247 | + * Adds the given link(s) into the title cell of the plugin listing table. |
|
| 248 | + * |
|
| 249 | + * <h4>Example</h4> |
|
| 250 | + * <code>$this->addLinkToPluginTitle( |
|
| 251 | + * "<a href='http://www.wordpress.org'>WordPress</a>" |
|
| 252 | + * );</code> |
|
| 253 | + * |
|
| 254 | + * @since 2.0.0 |
|
| 255 | + * @since 3.0.0 Changed the scope to public from protected. |
|
| 256 | + * @since 3.3.1 Moved from `AdminPageFramework`. |
|
| 257 | + * @remark Accepts variadic parameters; the number of accepted parameters are not limited to three. |
|
| 258 | + * @param string the tagged HTML link text. |
|
| 259 | + * @param string (optional) another tagged HTML link text. |
|
| 260 | + * @param string (optional) add more as many as want by adding items to the next parameters. |
|
| 261 | + * @access public |
|
| 262 | + * @return void |
|
| 263 | + */ |
|
| 264 | 264 | public function addLinkToPluginTitle( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) { |
| 265 | 265 | if ( method_exists( $this->oLink, '_addLinkToPluginTitle' ) ) { |
| 266 | 266 | $this->oLink->_addLinkToPluginTitle( func_get_args() ); |
@@ -140,24 +140,24 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | - * Removes the given section(s) by section ID. |
|
| 144 | - * |
|
| 145 | - * This accesses the property storing the added section arrays and removes the specified ones. |
|
| 146 | - * |
|
| 147 | - * <h4>Example</h4> |
|
| 148 | - * <code>$this->removeSettingSections( 'text_fields', 'selectors', 'another_section', 'yet_another_section' ); |
|
| 149 | - * </code> |
|
| 150 | - * |
|
| 151 | - * @since 2.0.0 |
|
| 152 | - * @since 3.0.0 Changed the scope to public from protected. |
|
| 153 | - * @since 3.5.3 Removed the parameter declarations as they are caught with the func_get_args(). |
|
| 154 | - * @access public |
|
| 155 | - * @remark Accepts variadic parameters; the number of accepted parameters are not limited to three. |
|
| 156 | - * @param string $sSectionID1 the section ID to remove. |
|
| 157 | - * @param string $sSectionID2 (optional) another section ID to remove. |
|
| 158 | - * @param string $_and_more (optional) add more section IDs to the next parameters as many as necessary. |
|
| 159 | - * @return void |
|
| 160 | - */ |
|
| 143 | + * Removes the given section(s) by section ID. |
|
| 144 | + * |
|
| 145 | + * This accesses the property storing the added section arrays and removes the specified ones. |
|
| 146 | + * |
|
| 147 | + * <h4>Example</h4> |
|
| 148 | + * <code>$this->removeSettingSections( 'text_fields', 'selectors', 'another_section', 'yet_another_section' ); |
|
| 149 | + * </code> |
|
| 150 | + * |
|
| 151 | + * @since 2.0.0 |
|
| 152 | + * @since 3.0.0 Changed the scope to public from protected. |
|
| 153 | + * @since 3.5.3 Removed the parameter declarations as they are caught with the func_get_args(). |
|
| 154 | + * @access public |
|
| 155 | + * @remark Accepts variadic parameters; the number of accepted parameters are not limited to three. |
|
| 156 | + * @param string $sSectionID1 the section ID to remove. |
|
| 157 | + * @param string $sSectionID2 (optional) another section ID to remove. |
|
| 158 | + * @param string $_and_more (optional) add more section IDs to the next parameters as many as necessary. |
|
| 159 | + * @return void |
|
| 160 | + */ |
|
| 161 | 161 | public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) { |
| 162 | 162 | |
| 163 | 163 | foreach( func_get_args() as $_sSectionID ) { |
@@ -224,38 +224,38 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | 226 | /** |
| 227 | - * Adds the given field array items into the field array property. |
|
| 228 | - * |
|
| 229 | - * Identical to the `addSettingFields()` method except that this method does not accept enumerated parameters. |
|
| 230 | - * |
|
| 231 | - * @since 2.1.2 |
|
| 232 | - * @since 3.0.0 Changed the scope to public from protected. |
|
| 233 | - * @access public |
|
| 234 | - * @param array|string $asField the field array or the target section ID. If the target section ID is set, the section_id key can be omitted from the next passing field array. |
|
| 235 | - * @return void |
|
| 236 | - */ |
|
| 227 | + * Adds the given field array items into the field array property. |
|
| 228 | + * |
|
| 229 | + * Identical to the `addSettingFields()` method except that this method does not accept enumerated parameters. |
|
| 230 | + * |
|
| 231 | + * @since 2.1.2 |
|
| 232 | + * @since 3.0.0 Changed the scope to public from protected. |
|
| 233 | + * @access public |
|
| 234 | + * @param array|string $asField the field array or the target section ID. If the target section ID is set, the section_id key can be omitted from the next passing field array. |
|
| 235 | + * @return void |
|
| 236 | + */ |
|
| 237 | 237 | public function addSettingField( $asField ) { |
| 238 | 238 | $this->oForm->addField( $asField ); |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | /** |
| 242 | - * Removes the given field(s) by field ID. |
|
| 243 | - * |
|
| 244 | - * This accesses the property storing the added field arrays and removes the specified ones. |
|
| 245 | - * |
|
| 246 | - * <h4>Example</h4> |
|
| 247 | - * <code>$this->removeSettingFields( 'fieldID_A', 'fieldID_B', 'fieldID_C', 'fieldID_D' ); |
|
| 248 | - * </code> |
|
| 249 | - * |
|
| 250 | - * @since 2.0.0 |
|
| 251 | - * @since 3.0.0 Changed the scope to public from protected. |
|
| 252 | - * @access public |
|
| 253 | - * @remark Accepts variadic parameters; the number of accepted parameters are not limited to three. |
|
| 254 | - * @param string $sFieldID1 the field ID to remove. |
|
| 255 | - * @param string $sFieldID2 (optional) another field ID to remove. |
|
| 256 | - * @param string $_and_more (optional) add more field IDs to the next parameters as many as necessary. |
|
| 257 | - * @return void |
|
| 258 | - */ |
|
| 242 | + * Removes the given field(s) by field ID. |
|
| 243 | + * |
|
| 244 | + * This accesses the property storing the added field arrays and removes the specified ones. |
|
| 245 | + * |
|
| 246 | + * <h4>Example</h4> |
|
| 247 | + * <code>$this->removeSettingFields( 'fieldID_A', 'fieldID_B', 'fieldID_C', 'fieldID_D' ); |
|
| 248 | + * </code> |
|
| 249 | + * |
|
| 250 | + * @since 2.0.0 |
|
| 251 | + * @since 3.0.0 Changed the scope to public from protected. |
|
| 252 | + * @access public |
|
| 253 | + * @remark Accepts variadic parameters; the number of accepted parameters are not limited to three. |
|
| 254 | + * @param string $sFieldID1 the field ID to remove. |
|
| 255 | + * @param string $sFieldID2 (optional) another field ID to remove. |
|
| 256 | + * @param string $_and_more (optional) add more field IDs to the next parameters as many as necessary. |
|
| 257 | + * @return void |
|
| 258 | + */ |
|
| 259 | 259 | public function removeSettingFields( $sFieldID1, $sFieldID2=null, $_and_more ) { |
| 260 | 260 | foreach( func_get_args() as $_sFieldID ) { |
| 261 | 261 | $this->oForm->removeField( $_sFieldID ); |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | */ |
| 52 | 52 | public function get() { |
| 53 | 53 | |
| 54 | - // Apply filters to modify the in-page tab array. |
|
| 54 | + // Apply filters to modify the in-page tab array. |
|
| 55 | 55 | $_aInPageTabs = $this->addAndApplyFilter( |
| 56 | 56 | $this->oFactory, // caller object |
| 57 | 57 | "tabs_{$this->oFactory->oProp->sClassName}_{$this->sPageSlug}", // filter name |
@@ -19,7 +19,6 @@ |
||
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Represents the structure of the sub-field definition array. |
| 22 | - |
|
| 23 | 22 | */ |
| 24 | 23 | static public $aStructure = array( |
| 25 | 24 | ); |
@@ -20,7 +20,6 @@ |
||
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * Renders a registered meta box. |
| 23 | - |
|
| 24 | 23 | * @return void |
| 25 | 24 | * @param string $sContext `side`, `normal`, or `advanced`. |
| 26 | 25 | * @since 3.0.0 |
@@ -18,32 +18,32 @@ |
||
| 18 | 18 | abstract class AdminPageFramework_MetaBox_Controller extends AdminPageFramework_MetaBox_View { |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | - * The method for all necessary set-ups. |
|
| 22 | - * |
|
| 23 | - * <h4>Example</h4> |
|
| 24 | - * <code> public function setUp() { |
|
| 25 | - * $this->addSettingFields( |
|
| 26 | - * array( |
|
| 27 | - * 'field_id' => 'sample_metabox_text_field', |
|
| 28 | - * 'title' => 'Text Input', |
|
| 29 | - * 'description' => 'The description for the field.', |
|
| 30 | - * 'type' => 'text', |
|
| 31 | - * ), |
|
| 32 | - * array( |
|
| 33 | - * 'field_id' => 'sample_metabox_textarea_field', |
|
| 34 | - * 'title' => 'Textarea', |
|
| 35 | - * 'description' => 'The description for the field.', |
|
| 36 | - * 'type' => 'textarea', |
|
| 37 | - * 'default' => 'This is a default text value.', |
|
| 38 | - * ) |
|
| 39 | - * ); |
|
| 40 | - * }</code> |
|
| 41 | - * |
|
| 42 | - * @abstract |
|
| 43 | - * @since 2.0.0 |
|
| 44 | - * @remark The user should override this method. |
|
| 45 | - * @return void |
|
| 46 | - */ |
|
| 21 | + * The method for all necessary set-ups. |
|
| 22 | + * |
|
| 23 | + * <h4>Example</h4> |
|
| 24 | + * <code> public function setUp() { |
|
| 25 | + * $this->addSettingFields( |
|
| 26 | + * array( |
|
| 27 | + * 'field_id' => 'sample_metabox_text_field', |
|
| 28 | + * 'title' => 'Text Input', |
|
| 29 | + * 'description' => 'The description for the field.', |
|
| 30 | + * 'type' => 'text', |
|
| 31 | + * ), |
|
| 32 | + * array( |
|
| 33 | + * 'field_id' => 'sample_metabox_textarea_field', |
|
| 34 | + * 'title' => 'Textarea', |
|
| 35 | + * 'description' => 'The description for the field.', |
|
| 36 | + * 'type' => 'textarea', |
|
| 37 | + * 'default' => 'This is a default text value.', |
|
| 38 | + * ) |
|
| 39 | + * ); |
|
| 40 | + * }</code> |
|
| 41 | + * |
|
| 42 | + * @abstract |
|
| 43 | + * @since 2.0.0 |
|
| 44 | + * @remark The user should override this method. |
|
| 45 | + * @return void |
|
| 46 | + */ |
|
| 47 | 47 | public function setUp() {} |
| 48 | 48 | |
| 49 | 49 | /** |
@@ -136,11 +136,11 @@ |
||
| 136 | 136 | * |
| 137 | 137 | * Triggered when a post has not been created so no post id is assigned. |
| 138 | 138 | * |
| 139 | - * @internal |
|
| 139 | + * @internal |
|
| 140 | 140 | * @since 3.3.0 |
| 141 | 141 | * @callback filter wp_insert_attachment_data |
| 142 | 142 | * @callback filter wp_insert_post_data |
| 143 | - * @param array $aPostData An array of slashed post data. |
|
| 143 | + * @param array $aPostData An array of slashed post data. |
|
| 144 | 144 | * @param array $aUnmodified An array of sanitized, but otherwise unmodified post data. |
| 145 | 145 | */ |
| 146 | 146 | public function _replyToFilterSavingData( $aPostData, $aUnmodified ) { |
@@ -277,7 +277,7 @@ |
||
| 277 | 277 | ); |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | - /** |
|
| 280 | + /** |
|
| 281 | 281 | * Extracts meta box form fields options array from the given options array of an admin page. |
| 282 | 282 | * |
| 283 | 283 | * @since 3.5.6 |
@@ -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 |