pingback_error example

/** * 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( $pagelinkedtostr_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. */
Home | Imprint | This part of the site doesn't use cookies.