Make WordPress Core

Opened 9 months ago

Last modified 6 months ago

#60782 new enhancement

The method parameter is never used.

Reported by: patelmohip's profile patelmohip Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

The function update_home_siteurl() has two parameters that newer used in the function block.

Change History (2)

#1 @mujuonly
9 months ago

+1

Function defined at wp-admin/includes/misc.php #L558

<?php
/**
 * Flushes rewrite rules if siteurl, home or page_on_front changed.
 *
 * @since 2.1.0
 *
 * @param string $old_value
 * @param string $value
 */
function update_home_siteurl( $old_value, $value ) {
        if ( wp_installing() ) {
                return;
        }

        if ( is_multisite() && ms_is_switched() ) {
                delete_option( 'rewrite_rules' );
        } else {
                flush_rewrite_rules();
        }
}

#2 @kairav
9 months ago

Action is defined here: /wp-admin/includes/admin-filters.php #L 71, 72, 73 for the function: update_home_siteurl which has 2 as a parameter.

add_action( 'update_option_home', 'update_home_siteurl', 10, 2 );
add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 );
add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 );
Note: See TracTickets for help on using tickets.