Make WordPress Core


Ignore:
Timestamp:
07/26/2012 09:45:33 PM (12 years ago)
Author:
ryan
Message:

phpdoc for Customizer classes and methods. Props bananastalktome. see #21303

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-customize-setting.php

    r21053 r21354  
    11<?php
    22/**
    3  * Customize Setting Class
     3 * Customize Setting Class.
    44 *
    55 * @package WordPress
     
    77 * @since 3.4.0
    88 */
    9 
    109class WP_Customize_Setting {
    1110    public $manager;
     
    2928     * @since 3.4.0
    3029     *
     30     * @param WP_Customize_Manager $manager
    3131     * @param string $id An specific ID of the setting. Can be a
    3232     *                   theme mod or option name.
    3333     * @param array $args Setting arguments.
     34     * @return WP_Customize_Setting
    3435     */
    3536    function __construct( $manager, $id, $args = array() ) {
     
    8889     *
    8990     * @since 3.4.0
    90      *
    91      * @param mixed Old value.
     91     * @uses WP_Customize_Setting::multidimensional_replace()
     92     *
     93     * @param mixed $original Old value.
    9294     * @return mixed New or old value.
    9395     */
     
    119121     * @since 3.4.0
    120122     *
    121      * @param $default mixed A default value which is used as a fallback. Default is null.
    122      * @return mixed Either the default value on failure or sanitized value.
     123     * @param mixed $default A default value which is used as a fallback. Default is null.
     124     * @return mixed The default value on failure, otherwise the sanitized value.
    123125     */
    124126    public final function post_value( $default = null ) {
     
    139141     * @since 3.4.0
    140142     *
    141      * @param $value mixed The value to sanitize.
     143     * @param mixed $value The value to sanitize.
    142144     * @return mixed Null if an input isn't valid, otherwise the sanitized value.
    143145     */
     
    152154     * @since 3.4.0
    153155     *
    154      * @param $value mixed The value to update.
     156     * @param mixed $value The value to update.
    155157     * @return mixed The result of saving the value.
    156158     */
     
    173175     * @since 3.4.0
    174176     *
    175      * @param $value mixed The value to update.
     177     * @param mixed $value The value to update.
    176178     * @return mixed The result of saving the value.
    177179     */
     
    193195     * @since 3.4.0
    194196     *
    195      * @param $value mixed The value to update.
     197     * @param mixed $value The value to update.
    196198     * @return mixed The result of saving the value.
    197199     */
     
    277279     * @param $keys
    278280     * @param bool $create Default is false.
    279      * @return null|array
     281     * @return null|array Keys are 'root', 'node', and 'key'.
    280282     */
    281283    final protected function multidimensional( &$root, $keys, $create = false ) {
     
    373375 *
    374376 * Results should be properly handled using another setting or callback.
     377 *
     378 * @package WordPress
     379 * @subpackage Customize
     380 * @since 3.4.0
    375381 */
    376382class WP_Customize_Filter_Setting extends WP_Customize_Setting {
     383   
     384    /**
     385     * @since 3.4.0
     386     */
    377387    public function update() {}
    378388}
     
    382392 *
    383393 * Results should be properly handled using another setting or callback.
     394 *
     395 * @package WordPress
     396 * @subpackage Customize
     397 * @since 3.4.0
    384398 */
    385399final class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {
    386400    public $id = 'header_image_data';
    387401
     402    /**
     403     * @since 3.4.0
     404     *
     405     * @param $value
     406     */
    388407    public function update( $value ) {
    389408        global $custom_image_header;
     
    401420}
    402421
     422/**
     423 * @package WordPress
     424 * @subpackage Customize
     425 * @since 3.4.0
     426 */
    403427final class WP_Customize_Background_Image_Setting extends WP_Customize_Setting {
    404428    public $id = 'background_image_thumb';
    405429
     430    /**
     431     * @since 3.4.0
     432     * @uses remove_theme_mod()
     433     *
     434     * @param $value
     435     */
    406436    public function update( $value ) {
    407437        remove_theme_mod( 'background_image_thumb' );
Note: See TracChangeset for help on using the changeset viewer.