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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32535 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-05-21 22:04:29 +00:00
parent 369903cd85
commit 9333337992
5 changed files with 36 additions and 27 deletions
@@ -647,6 +647,8 @@ final class WP_Customize_Manager {
* Removes the signature in case we experience a case where the Customizer was not properly executed.
*
* @since 3.4.0
*
* @return mixed
*/
public function remove_preview_signature( $return = null ) {
remove_action( 'shutdown', array( $this, 'customize_preview_signature' ), 1000 );
@@ -841,7 +843,7 @@ final class WP_Customize_Manager {
*
* @since 4.2.0
*
* @param string $setting_ids The setting IDs to add.
* @param array $setting_ids The setting IDs to add.
* @return WP_Customize_Setting The settings added.
*/
public function add_dynamic_settings( $setting_ids ) {
@@ -897,7 +899,7 @@ final class WP_Customize_Manager {
* @since 3.4.0
*
* @param string $id Customize Setting ID.
* @return WP_Customize_Setting
* @return WP_Customize_Setting|null The setting, if set.
*/
public function get_setting( $id ) {
if ( isset( $this->settings[ $id ] ) ) {
@@ -942,7 +944,7 @@ final class WP_Customize_Manager {
* @access public
*
* @param string $id Panel ID to get.
* @return WP_Customize_Panel Requested panel instance.
* @return WP_Customize_Panel|null Requested panel instance, if set.
*/
public function get_panel( $id ) {
if ( isset( $this->panels[ $id ] ) ) {
@@ -985,7 +987,7 @@ final class WP_Customize_Manager {
* @since 3.4.0
*
* @param string $id Section ID.
* @return WP_Customize_Section
* @return WP_Customize_Section|null The section, if set.
*/
public function get_section( $id ) {
if ( isset( $this->sections[ $id ] ) )
@@ -1027,7 +1029,7 @@ final class WP_Customize_Manager {
* @since 3.4.0
*
* @param string $id ID of the control.
* @return WP_Customize_Control $control The control object.
* @return WP_Customize_Control|null The control object, if set.
*/
public function get_control( $id ) {
if ( isset( $this->controls[ $id ] ) )
@@ -1513,7 +1515,7 @@ final class WP_Customize_Manager {
* @since 3.4.0
*
* @param string $color
* @return string
* @return mixed
*/
public function _sanitize_header_textcolor( $color ) {
if ( 'blank' === $color )
@@ -1545,8 +1547,6 @@ function sanitize_hex_color( $color ) {
// 3 or 6 hex digits, or the empty string.
if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) )
return $color;
return null;
}
/**