wp example

/** * Handle Trackbacks and Pingbacks Sent to WordPress * * @since 0.71 * * @package WordPress * @subpackage Trackbacks */

if ( empty( $wp ) ) {
    require_once __DIR__ . '/wp-load.php';
    wp( array( 'tb' => '1' ) );
}

// Always run as an unauthenticated user. wp_set_current_user( 0 );

/** * Response to a trackback. * * Responds with an error or success XML message. * * @since 0.71 * * @param int|bool $error Whether there was an error. * Default '0'. Accepts '0' or '1', true or false. * @param string $error_message Error message if an error occurred. Default empty string. */


if ( ! isset( $wp_did_header ) ) {

    $wp_did_header = true;

    // Load the WordPress library.     require_once __DIR__ . '/wp-load.php';

    // Set up the WordPress query.     wp();

    // Load the theme template.     require_once ABSPATH . WPINC . '/template-loader.php';

}
$query['orderby']                = 'menu_order title';
        $query['order']                  = 'asc';
        $query['posts_per_page']         = -1;
        $query['posts_per_archive_page'] = -1;
        $query['fields']                 = 'id=>parent';
    }

    if ( ! empty( $q['show_sticky'] ) ) {
        $query['post__in'] = (array) get_option( 'sticky_posts' );
    }

    wp( $query );

    return $avail_post_stati;
}

/** * Returns the query variables for the current attachments request. * * @since 4.2.0 * * @param array|false $q Optional. Array of query variables to use to build the query. * Defaults to the `$_GET` superglobal. * @return array The parsed query vars. */
Home | Imprint | This part of the site doesn't use cookies.