wp_xmlrpc_server::pingback_ping( array $args ): string|IXR_Error
- Since
- 1.5.0
- Source
wp-includes/class-wp-xmlrpc-server.php:6849
Compatibility
- WordPress
- since 1.5.0
- PHP
- 7.4–8.6-dev
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0), and compiles on PHP 7.4 through 8.6-dev.
Parameters
$argsarray- Method arguments. Note: arguments must be ordered as documented.
$0stringURL of page linked from.$1stringURL of page linked to.
Return value
string|IXR_Error
Performance profile
How much work a call to wp_xmlrpc_server::pingback_ping() does, and what it touches: the algorithmic scaling, the Zend instruction count per call across PHP versions, the hooks it hands control to, and the core code that calls it. Measured from the compiled opcodes, not a stopwatch, so every number is identical on any machine running the same PHP version, and every function in core is ranked by cost.
- Cost class
- Expensive
- Scaling
- Scales with input
- Instructions
- 61–330
- Plugin surface
- 5 hooks
- Called by
- 0
Reaches an outbound HTTP request via wp_safe_remote_get().
The body loops, so the work grows with what you pass in.
Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 452.
Third-party callbacks on 'xmlrpc_call', 'pingback_ping_source_uri', 'http_headers_useragent' run inside this call, and their cost is not bounded by anything here.
Nothing in core calls this; the cost is only what you spend yourself.
What it touches
- hookthird-party callbacks
do_action()called directly - optionoption read or write
get_option()called directly - querycontent query
get_post()called directly - httpoutbound HTTP request
wp_safe_remote_get()called directly - sqldatabase query
->get_results()called directly - cacheobject cache
wp_cache_get()one call below wp_xmlrpc_server::pingback_ping() - serializeserialisation
maybe_unserialize()one call below wp_xmlrpc_server::pingback_ping()
Further down the call graph this can also reach transient. That is the worst case, several calls deep and usually down an error path, not what a normal call pays.
What one call costs · 86 distinct outcomes
One number would be a lie: the work depends on which branch runs. These are every distinct cost wp_xmlrpc_server::pingback_ping() can have, taken from its control-flow graph on PHP 8.5.
| When | Instructions | Calls it makes |
|---|---|---|
!isset($urltest) | 61 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), __(), ->pingback_error() |
| always | 62–79 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), get_post(), __(), ->pingback_error() |
$post_id == false | 67–84 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), get_post(), url_to_postid(), __(), ->pingback_error() |
!preg_match() | 68 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), __(), ->pingback_error() |
$post_id != false && !pings_open() | 71–88 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), get_post(), url_to_postid(), pings_open(), __(), ->pingback_error() |
!preg_match() | 75 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), __(), ->pingback_error() |
!preg_match() | 82–86 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), get_post(), __(), ->pingback_error() |
preg_match() | 83 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), explode(), get_post(), __(), ->pingback_error() |
$post_id != false && pings_open() && ->get_results() | 84–101 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), __(), ->pingback_error() |
| always | 85 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), ->prepare(), ->get_var(), ->pingback_error() |
!preg_match() && $post_id == false | 87–91 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), get_post(), url_to_postid(), __(), ->pingback_error() |
preg_match() && $post_id == false | 88 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), explode(), get_post(), url_to_postid(), __(), ->pingback_error() |
74 further outcomes, up to 330 instructions
isset($urltest) && !preg_match() | 91 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), get_post(), __(), ->pingback_error() |
!preg_match() && $post_id != false && !pings_open() | 91–95 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), get_post(), url_to_postid(), pings_open(), __(), ->pingback_error() |
!preg_match() | 92 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), ->prepare(), ->get_var(), ->pingback_error() |
preg_match() && $post_id != false && !pings_open() | 92 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), explode(), get_post(), url_to_postid(), pings_open(), __(), ->pingback_error() |
| always | 95 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), ->prepare(), ->get_var(), get_post(), __(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id == false | 96 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), get_post(), url_to_postid(), __(), ->pingback_error() |
$post_id == false | 100 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), ->prepare(), ->get_var(), get_post(), url_to_postid(), __(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && !pings_open() | 100 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), get_post(), url_to_postid(), pings_open(), __(), ->pingback_error() |
!preg_match() | 102 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), ->prepare(), ->get_var(), get_post(), __(), ->pingback_error() |
$post_id != false && !pings_open() | 104 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), __(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && ->get_results() | 104–108 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), __(), ->pingback_error() |
preg_match() && $post_id != false && pings_open() && ->get_results() | 105 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), explode(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), __(), ->pingback_error() |
!preg_match() && $post_id == false | 107 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), __(), ->pingback_error() |
!preg_match() && $post_id != false && !pings_open() | 111 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), __(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && ->get_results() | 113 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), __(), ->pingback_error() |
$post_id != false && pings_open() && ->get_results() | 117 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), __(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && ->get_results() | 124 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), __(), ->pingback_error() |
$post_id != false && pings_open() && !->get_results() | 128–145 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), __(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && ->get_results() | 131 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), __(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && !->get_results() | 148–152 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), __(), ->pingback_error() |
preg_match() && $post_id != false && pings_open() && !->get_results() | 149 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), explode(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), __(), ->pingback_error() |
$post_id != false && pings_open() && !->get_results() && empty($title) | 154–172 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), __(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() | 157 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), __(), ->pingback_error() |
$post_id != false && pings_open() && !->get_results() | 161 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), __(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && !->get_results() | 168 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), __(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && empty($title) | 174–179 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), __(), ->pingback_error() |
preg_match() && $post_id != false && pings_open() && !->get_results() && empty($title) | 175–176 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), explode(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), __(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() | 175 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), __(), ->pingback_error() |
$post_id != false && pings_open() && !->get_results() && !empty($title) && empty($context) | 176–195 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), __(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && empty($title) | 183–184 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), __(), ->pingback_error() |
$post_id != false && pings_open() && !->get_results() && empty($title) | 187–188 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), __(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && empty($title) | 194–195 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), __(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && empty($context) | 196–202 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), __(), ->pingback_error() |
preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && empty($context) | 197–199 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), explode(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), __(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && empty($title) | 201–202 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), __(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && empty($context) | 205–207 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), __(), ->pingback_error() |
$post_id != false && pings_open() && !->get_results() && !empty($title) && empty($context) | 209–211 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), __(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && empty($context) | 216–218 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), __(), ->pingback_error() |
$post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && is_wp_error() | 221–240 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && empty($context) | 223–225 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), __(), ->pingback_error() |
$post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para | 225–249 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), __(), ->pingback_error() |
$post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && !is_wp_error() | 227–246 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && is_wp_error() | 241–247 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && is_wp_error() | 242–244 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), explode(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para | 245–256 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), __(), ->pingback_error() |
preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para | 246–253 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), explode(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), __(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && !is_wp_error() | 247–253 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && !is_wp_error() | 248–250 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), explode(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && is_wp_error() | 250–252 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para | 254–261 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), __(), ->pingback_error() |
$post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && is_wp_error() | 254–256 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && !is_wp_error() | 256–258 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
$post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para | 258–265 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), __(), ->pingback_error() |
$post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && !is_wp_error() | 260–262 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && is_wp_error() | 261–263 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para | 265–272 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), __(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && !is_wp_error() | 267–269 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && is_wp_error() | 268–270 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
$post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && is_wp_error() | 270–294 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para | 272–279 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), __(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !empty($context) && !is_wp_error() | 274–276 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
$post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && !is_wp_error() | 276–300 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && is_wp_error() | 290–301 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && is_wp_error() | 291–298 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), explode(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && !is_wp_error() | 296–307 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && !is_wp_error() | 297–304 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), explode(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && is_wp_error() | 299–306 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
$post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && is_wp_error() | 303–310 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && !is_wp_error() | 305–312 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
$post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && !is_wp_error() | 309–316 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && is_wp_error() | 310–317 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
!preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && !is_wp_error() | 316–323 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && is_wp_error() | 317–324 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), ->get_error_message(), ->pingback_error() |
isset($urltest) && !preg_match() && $post_id != false && pings_open() && !->get_results() && !empty($title) && !$p && $para && !empty($context) && !is_wp_error() | 323–330 | do_action(), ->escape(), apply_filters(), get_option(), parse_url(), url_to_postid(), preg_match(), preg_match(), ->prepare(), ->get_var(), get_post(), url_to_postid(), pings_open(), ->prepare(), ->get_results(), sleep(), get_bloginfo(), get_bloginfo(), apply_filters(), wp_safe_remote_get(), wp_remote_retrieve_body(), apply_filters(), preg_match(), strip_tags(), explode(), preg_quote(), preg_match(), strip_tags(), preg_quote(), strip_tags(), esc_html(), ->escape(), ->escape(), ->escape(), compact(), wp_new_comment(), is_wp_error(), do_action(), __(), sprintf() |
This body has more branch combinations than are worth enumerating, so the table covers the outcomes found first rather than every one that exists.
Across PHP versions
| PHP | Compiled | Executed | Branches | Notes |
|---|---|---|---|---|
| 8.6-dev | 452 | 61–330 | 26 | |
| 8.5 | 452 | 61–330 | 26 | |
| 8.4 | 452 | 61–330 | 26 | 59 fewer instructions than PHP 8.3 |
| 8.3 | 511 | 76–386 | 26 | |
| 8.2 | 511 | 76–386 | 26 | |
| 8.1 | 511 | 76–386 | 26 | 1 fewer instruction than PHP 7.4 |
| 7.4 | 512 | 76–387 | 26 |
An instruction is not a fixed amount of time, so a matching count is not necessarily the same speed; what it rules out is a difference in the work itself.
Hooks and filters fired · 5
5 hooks fire while wp_xmlrpc_server::pingback_ping() runs, in this order:
- do_action( xmlrpc_call )actionline 6853 (+4 into the body)
Fires after the XML-RPC user has been authenticated but before the rest of the method logic begins.
- apply_filters( pingback_ping_source_uri )filterline 6869 (+20 into the body)
Filters the pingback source URI.
- apply_filters( http_headers_useragent )filterline 6960 (+111 into the body)
Filters the user agent value sent with an HTTP request.
- apply_filters( pre_remote_source )filterline 6989 (+140 into the body)
Filters the pingback remote source.
- do_action( pingback_post )actionline 7087 (+238 into the body)
Fires after a post pingback has been sent.
Uses · 16
- do_action()Calls the callback functions that have been added to an action hook.
- apply_filters()Calls the callback functions that have been added to a filter hook.
- __()Retrieves the translation of $text.
- get_option()Retrieves an option value based on an option name.
- url_to_postid()Examines a URL and try to determine the post ID it represents.
- get_post()Retrieves post data given a post ID or post object.
- pings_open()Determines whether the current post is open for pings.
- get_bloginfo()Retrieves information about the current site.
- wp_safe_remote_get()Retrieves the raw response from a safe HTTP request using the GET method.
- wp_remote_retrieve_body()Retrieves only the body from the raw response.
- str_contains()Polyfill for `str_contains()` function added in PHP 8.0.
- esc_html()Escaping for HTML blocks.
Show all 16
- wp_new_comment()Adds a new comment to the database.
- is_wp_error()Checks whether the given variable is a WordPress Error.
- wp_xmlrpc_server::escape()Escapes string or array of strings for database.
- wp_xmlrpc_server::pingback_error()Sends a pingback error based on the given error code and message.
Source code
public function pingback_ping( $args ) { global $wpdb; /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ do_action( 'xmlrpc_call', 'pingback.ping', $args, $this ); $this->escape( $args ); $pagelinkedfrom = str_replace( '&', '&', $args[0] ); $pagelinkedto = str_replace( '&', '&', $args[1] ); $pagelinkedto = str_replace( '&', '&', $pagelinkedto ); /** * Filters the pingback source URI. * * @since 3.6.0 * * @param string $pagelinkedfrom URI of the page linked from. * @param string $pagelinkedto URI of the page linked to. */ $pagelinkedfrom = apply_filters( 'pingback_ping_source_uri', $pagelinkedfrom, $pagelinkedto ); if ( ! $pagelinkedfrom ) { return $this->pingback_error( 0, __( 'A valid URL was not provided.' ) ); } // Check if the page linked to is on our site. $pos1 = strpos( $pagelinkedto, str_replace( array( 'http://www.', 'http://', 'https://www.', 'https://' ), '', get_option( 'home' ) ) ); if ( ! $pos1 ) { return $this->pingback_error( 0, __( 'Is there no link to us?' ) ); } /* * Let's find which post is linked to. * FIXME: Does url_to_postid() cover all these cases already? * If so, then let's use it and drop the old code. */ $urltest = parse_url( $pagelinkedto ); $post_id = url_to_postid( $pagelinkedto ); if ( $post_id ) { // $way } elseif ( isset( $urltest['path'] ) && preg_match( '#p/[0-9]{1,}#', $urltest['path'], $match ) ) { // The path defines the post_ID (archives/p/XXXX). $blah = explode( '/', $match[0] ); $post_id = (int) $blah[1]; } elseif ( isset( $urltest['query'] ) && preg_match( '#p=[0-9]{1,}#', $urltest['query'], $match ) ) { // The query string defines the post_ID (?p=XXXX). $blah = explode( '=', $match[0] ); $post_id = (int) $blah[1]; } elseif ( isset( $urltest['fragment'] ) ) { // An #anchor is there, it's either... if ( (int) $urltest['fragment'] ) { // ...an integer #XXXX (simplest case), $post_id = (int) $urltest['fragment']; } elseif ( preg_match( '/post-[0-9]+/', $urltest['fragment'] ) ) { // ...a post ID in the form 'post-###', $post_id = preg_replace( '/[^0-9]+/', '', $urltest['fragment'] ); } elseif ( is_string( $urltest['fragment'] ) ) { // ...or a string #title, a little more complicated. $title = preg_replace( '/[^a-z0-9]/i', '.', $urltest['fragment'] ); $sql = $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title RLIKE %s", $title ); $post_id = $wpdb->get_var( $sql ); if ( ! $post_id ) { // Returning unknown error '0' is better than die()'ing. return $this->pingback_error( 0, '' ); } } } else { // TODO: Attempt to extract a post ID from the given URL. return $this->pingback_error( 33, __( 'The specified target URL cannot be used as a target. It either does not exist, or it is not a pingback-enabled resource.' ) ); } $post_id = (int) $post_id; $post = get_post( $post_id ); if ( ! $post ) { // Post not found. return $this->pingback_error( 33, __( 'The specified target URL cannot be used as a target. It either does not exist, or it is not a pingback-enabled resource.' ) ); } if ( url_to_postid( $pagelinkedfrom ) == $post_id ) {Changelog
Introduced in 1.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, from
src/wp-includes/class-wp-xmlrpc-server.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.