WordPress.org

Make WordPress Core

Changeset 38816


Ignore:
Timestamp:
10/19/2016 04:55:49 AM (4 years ago)
Author:
jeremyfelt
Message:

Multisite: Add $network_id parameter to hooks in add_network_option().

Props flixos90.
Fixes #38320.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/option.php

    r38815 r38816  
    12221222     * @since 2.9.0 As 'pre_add_site_option_' . $key
    12231223     * @since 3.0.0
    1224      * @since 4.4.0 The `$option` parameter was added
    1225      *
    1226      * @param mixed  $value  Value of network option.
    1227      * @param string $option Option name.
    1228      */
    1229     $value = apply_filters( "pre_add_site_option_{$option}", $value, $option );
     1224     * @since 4.4.0 The `$option` parameter was added.
     1225     * @since 4.7.0 The `$network_id` parameter was added.
     1226     *
     1227     * @param mixed  $value      Value of network option.
     1228     * @param string $option     Option name.
     1229     * @param int    $network_id ID of the network.
     1230     */
     1231    $value = apply_filters( "pre_add_site_option_{$option}", $value, $option, $network_id );
    12301232
    12311233    $notoptions_key = "$network_id:notoptions";
     
    12721274         * @since 2.9.0 As "add_site_option_{$key}"
    12731275         * @since 3.0.0
    1274          *
    1275          * @param string $option Name of the network option.
    1276          * @param mixed  $value  Value of the network option.
     1276         * @since 4.7.0 The `$network_id` parameter was added.
     1277         *
     1278         * @param string $option     Name of the network option.
     1279         * @param mixed  $value      Value of the network option.
     1280         * @param int    $network_id ID of the network.
    12771281         */
    1278         do_action( "add_site_option_{$option}", $option, $value );
     1282        do_action( "add_site_option_{$option}", $option, $value, $network_id );
    12791283
    12801284        /**
     
    12821286         *
    12831287         * @since 3.0.0
    1284          *
    1285          * @param string $option Name of the network option.
    1286          * @param mixed  $value  Value of the network option.
     1288         * @since 4.7.0 The `$network_id` parameter was added.
     1289         *
     1290         * @param string $option     Name of the network option.
     1291         * @param mixed  $value      Value of the network option.
     1292         * @param int    $network_id ID of the network.
    12871293         */
    1288         do_action( 'add_site_option', $option, $value );
     1294        do_action( 'add_site_option', $option, $value, $network_id );
    12891295
    12901296        return true;
Note: See TracChangeset for help on using the changeset viewer.