mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 17:20:07 +00:00
Use void instead of null where appropriate when pipe-delimiting @return types. If a @return only contains void, remove it.
See #32444. git-svn-id: https://develop.svn.wordpress.org/trunk@32568 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -899,7 +899,7 @@ final class WP_Customize_Manager {
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param string $id Customize Setting ID.
|
||||
* @return WP_Customize_Setting|null The setting, if set.
|
||||
* @return WP_Customize_Setting|void The setting, if set.
|
||||
*/
|
||||
public function get_setting( $id ) {
|
||||
if ( isset( $this->settings[ $id ] ) ) {
|
||||
@@ -944,7 +944,7 @@ final class WP_Customize_Manager {
|
||||
* @access public
|
||||
*
|
||||
* @param string $id Panel ID to get.
|
||||
* @return WP_Customize_Panel|null Requested panel instance, if set.
|
||||
* @return WP_Customize_Panel|void Requested panel instance, if set.
|
||||
*/
|
||||
public function get_panel( $id ) {
|
||||
if ( isset( $this->panels[ $id ] ) ) {
|
||||
@@ -987,7 +987,7 @@ final class WP_Customize_Manager {
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param string $id Section ID.
|
||||
* @return WP_Customize_Section|null The section, if set.
|
||||
* @return WP_Customize_Section|void The section, if set.
|
||||
*/
|
||||
public function get_section( $id ) {
|
||||
if ( isset( $this->sections[ $id ] ) )
|
||||
@@ -1029,7 +1029,7 @@ final class WP_Customize_Manager {
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param string $id ID of the control.
|
||||
* @return WP_Customize_Control|null The control object, if set.
|
||||
* @return WP_Customize_Control|void The control object, if set.
|
||||
*/
|
||||
public function get_control( $id ) {
|
||||
if ( isset( $this->controls[ $id ] ) )
|
||||
@@ -1532,13 +1532,13 @@ final class WP_Customize_Manager {
|
||||
/**
|
||||
* Sanitizes a hex color.
|
||||
*
|
||||
* Returns either '', a 3 or 6 digit hex color (with #), or null.
|
||||
* Returns either '', a 3 or 6 digit hex color (with #), or nothing.
|
||||
* For sanitizing values without a #, see sanitize_hex_color_no_hash().
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param string $color
|
||||
* @return string|null
|
||||
* @return string|void
|
||||
*/
|
||||
function sanitize_hex_color( $color ) {
|
||||
if ( '' === $color )
|
||||
|
||||
Reference in New Issue
Block a user