Make WordPress Core


Ignore:
Timestamp:
05/21/2015 10:04:29 PM (10 years ago)
Author:
wonderboymusic
Message:

In class-wp-customize-*, clarify/add some @param/@return blocks. Disambiguate some functions that are trying to return the void response of another function they call internally.

See #32444.

File:
1 edited

Legend:

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

    r32243 r32535  
    123123            }
    124124        }
    125         return null;
    126125    }
    127126
     
    237236     *
    238237     * @param array $old_sidebars_widgets
     238     * @return array
    239239     */
    240240    public function filter_customize_value_old_sidebars_widgets_data( $old_sidebars_widgets ) {
     
    254254     *
    255255     * @param array $sidebars_widgets
     256     * @return array
    256257     */
    257258    public function filter_option_sidebars_widgets_for_theme_switch( $sidebars_widgets ) {
     
    919920     *
    920921     * @param array $sidebars_widgets List of widgets for the current sidebar.
     922     * @return array
    921923     */
    922924    public function preview_sidebars_widgets( $sidebars_widgets ) {
     
    10411043     * @param bool   $is_active  Whether the sidebar is active.
    10421044     * @param string $sidebar_id Sidebar ID.
     1045     * @return bool
    10431046     */
    10441047    public function tally_sidebars_via_is_active_sidebar_calls( $is_active, $sidebar_id ) {
     
    10661069     * @param bool   $has_widgets Whether the current sidebar has widgets.
    10671070     * @param string $sidebar_id  Sidebar ID.
     1071     * @return bool
    10681072     */
    10691073    public function tally_sidebars_via_dynamic_sidebar_calls( $has_widgets, $sidebar_id ) {
     
    11061110     *
    11071111     * @param array $value Widget instance to sanitize.
    1108      * @return array Sanitized widget instance.
     1112     * @return array|null Sanitized widget instance.
    11091113     */
    11101114    public function sanitize_widget_instance( $value ) {
     
    11171121            || empty( $value['encoded_serialized_instance'] ) )
    11181122        {
    1119             return null;
     1123            return;
    11201124        }
    11211125
    11221126        $decoded = base64_decode( $value['encoded_serialized_instance'], true );
    11231127        if ( false === $decoded ) {
    1124             return null;
     1128            return;
    11251129        }
    11261130
    11271131        if ( $this->get_instance_hash_key( $decoded ) !== $value['instance_hash_key'] ) {
    1128             return null;
     1132            return;
    11291133        }
    11301134
    11311135        $instance = unserialize( $decoded );
    11321136        if ( false === $instance ) {
    1133             return null;
     1137            return;
    11341138        }
    11351139
Note: See TracChangeset for help on using the changeset viewer.