Uma área de pesquisa sobre o WordPress para devs e autores do tema



can_edit_network ›

Desde3.1.0
Obsoleton/a
can_edit_network ( $site_id )
Parâmetros:
  • (int) $site_id The network/site ID to check.
    Required: Yes
Retorna:
  • (bool) True if network can be edited, otherwise false.
Definido em:
Codex:

Whether or not we can edit this network from this page.

By default editing of network is restricted to the Network Admin for that $site_id this allows for this to be overridden.



Fonte

function can_edit_network( $site_id ) {
	global $wpdb;

	if ( $site_id == $wpdb->siteid )
		$result = true;
	else
		$result = false;

	/**
	 * Filters whether this network can be edited from this page.
	 *
	 * @since 3.1.0
	 *
	 * @param bool $result  Whether the network can be edited from this page.
	 * @param int  $site_id The network/site ID to check.
	 */
	return apply_filters( 'can_edit_network', $result, $site_id );
}