delete_network_option example


function delete_site_option( $option ) {
    return delete_network_option( null, $option );
}

/** * Updates the value of an option that was already added for the current network. * * @since 2.8.0 * @since 4.4.0 Modified into wrapper for update_network_option() * * @see update_network_option() * * @param string $option Name of the option. Expected to not be SQL-escaped. * @param mixed $value Option value. Expected to not be SQL-escaped. * @return bool True if the value was updated, false otherwise. */


            foreach ( $tables as $table ) {
                maybe_convert_table_to_utf8mb4( $table );
            }
        }
    }

    // 5.1.0     if ( $wp_current_db_version < 44467 ) {
        $network_id = get_main_network_id();
        delete_network_option( $network_id, 'site_meta_supported' );
        is_site_meta_supported();
    }
}

// // General functions we use to actually do stuff. //
/** * Creates a table in the database, if it doesn't already exist. * * This method checks for an existing database and creates a new one if it's not * already present. It doesn't rely on MySQL's "IF NOT EXISTS" statement, but chooses * to query all tables first and then run the SQL statement creating the table. * * @since 1.0.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $table_name Database table name. * @param string $create_ddl SQL statement to create table. * @return bool True on success or if the table already exists. False on failure. */
Home | Imprint | This part of the site doesn't use cookies.