wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_maybe_disable_xmlrpc_pingback_for_environment › WordPress Function

Since7.1.0
Deprecatedn/a
wp_maybe_disable_xmlrpc_pingback_for_environment ( $methods )
Parameters:
  • (string[]) $methods An array of XML-RPC methods, keyed by their methodName.
    Required: Yes
Returns:
  • (string[]) Modified array of XML-RPC methods.
Defined at:
Codex:

Removes the pingback XML-RPC method in non-production environments.



Source

function wp_maybe_disable_xmlrpc_pingback_for_environment( $methods ) {
	if ( wp_should_disable_pings_for_environment() ) {
		unset( $methods['pingback.ping'] );
	}

	return $methods;
}