/** * Post API: Walker_Page class * * @package WordPress * @subpackage Template * @since 4.4.0 */ /** * Core walker class used to create an HTML list of pages. * * @since 2.1.0 * * @see Walker */ class Walker_Page extends Walker { /** * @see Walker::$tree_type * @since 2.1.0 * @var string */ public $tree_type = 'page'; /** * @see Walker::$db_fields * @since 2.1.0 * @todo Decouple this. * @var array */ public $db_fields = array ('parent' => 'post_parent', 'id' => 'ID'); /** * @see Walker::start_lvl() * @since 2.1.0 * * @param string $output Passed by reference. Used to append additional content. * @param int $depth Depth of page. Used for padding. * @param array $args */ public function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat("\t", $depth); $output .= "\n$indent\n"; } /** * @see Walker::start_el() * @since 2.1.0 * * @param string $output Passed by reference. Used to append additional content. * @param object $page Page data object. * @param int $depth Depth of page. Used for padding. * @param int $current_page Page ID. * @param array $args */ public function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) { if ( $depth ) { $indent = str_repeat( "\t", $depth ); } else { $indent = ''; } $css_class = array( 'page_item', 'page-item-' . $page->ID ); if ( isset( $args['pages_with_children'][ $page->ID ] ) ) { $css_class[] = 'page_item_has_children'; } if ( ! empty( $current_page ) ) { $_current_page = get_post( $current_page ); if ( $_current_page && in_array( $page->ID, $_current_page->ancestors ) ) { $css_class[] = 'current_page_ancestor'; } if ( $page->ID == $current_page ) { $css_class[] = 'current_page_item'; } elseif ( $_current_page && $page->ID == $_current_page->post_parent ) { $css_class[] = 'current_page_parent'; } } elseif ( $page->ID == get_option('page_for_posts') ) { $css_class[] = 'current_page_parent'; } /** * Filter the list of CSS classes to include with each page item in the list. * * @since 2.8.0 * * @see wp_list_pages() * * @param array $css_class An array of CSS classes to be applied * to each list item. * @param WP_Post $page Page data object. * @param int $depth Depth of page, used for padding. * @param array $args An array of arguments. * @param int $current_page ID of the current page. */ $css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) ); if ( '' === $page->post_title ) { /* translators: %d: ID of a post */ $page->post_title = sprintf( __( '#%d (no title)' ), $page->ID ); } $args['link_before'] = empty( $args['link_before'] ) ? '' : $args['link_before']; $args['link_after'] = empty( $args['link_after'] ) ? '' : $args['link_after']; /** This filter is documented in wp-includes/post-template.php */ $output .= $indent . sprintf( '
  • %s%s%s', $css_classes, get_permalink( $page->ID ), $args['link_before'], apply_filters( 'the_title', $page->post_title, $page->ID ), $args['link_after'] ); if ( ! empty( $args['show_date'] ) ) { if ( 'modified' == $args['show_date'] ) { $time = $page->post_modified; } else { $time = $page->post_date; } $date_format = empty( $args['date_format'] ) ? '' : $args['date_format']; $output .= " " . mysql2date( $date_format, $time ); } } /** * @see Walker::end_el() * @since 2.1.0 * * @param string $output Passed by reference. Used to append additional content. * @param object $page Page data object. Not used. * @param int $depth Depth of page. Not Used. * @param array $args */ public function end_el( &$output, $page, $depth = 0, $args = array() ) { $output .= "
  • \n"; } } /** * HTTP API: WP_HTTP_Response class * * @package WordPress * @subpackage HTTP * @since 4.4.0 */ /** * Core class used to prepare HTTP responses. * * @since 4.4.0 */ class WP_HTTP_Response { /** * Response data. * * @since 4.4.0 * @access public * @var mixed */ public $data; /** * Response headers. * * @since 4.4.0 * @access public * @var int */ public $headers; /** * Response status. * * @since 4.4.0 * @access public * @var array */ public $status; /** * Constructor. * * @since 4.4.0 * @access public * * @param mixed $data Response data. Default null. * @param int $status Optional. HTTP status code. Default 200. * @param array $headers Optional. HTTP header map. Default empty array. */ public function __construct( $data = null, $status = 200, $headers = array() ) { $this->data = $data; $this->set_status( $status ); $this->set_headers( $headers ); } /** * Retrieves headers associated with the response. * * @since 4.4.0 * @access public * * @return array Map of header name to header value. */ public function get_headers() { return $this->headers; } /** * Sets all header values. * * @since 4.4.0 * @access public * * @param array $headers Map of header name to header value. */ public function set_headers( $headers ) { $this->headers = $headers; } /** * Sets a single HTTP header. * * @since 4.4.0 * @access public * * @param string $key Header name. * @param string $value Header value. * @param bool $replace Optional. Whether to replace an existing header of the same name. * Default true. */ public function header( $key, $value, $replace = true ) { if ( $replace || ! isset( $this->headers[ $key ] ) ) { $this->headers[ $key ] = $value; } else { $this->headers[ $key ] .= ', ' . $value; } } /** * Retrieves the HTTP return code for the response. * * @since 4.4.0 * @access public * * @return int The 3-digit HTTP status code. */ public function get_status() { return $this->status; } /** * Sets the 3-digit HTTP status code. * * @since 4.4.0 * @access public * * @param int $code HTTP status. */ public function set_status( $code ) { $this->status = absint( $code ); } /** * Retrieves the response data. * * @since 4.4.0 * @access public * * @return mixed Response data. */ public function get_data() { return $this->data; } /** * Sets the response data. * * @since 4.4.0 * @access public * * @param mixed $data Response data. */ public function set_data( $data ) { $this->data = $data; } /** * Retrieves the response data for JSON serialization. * * It is expected that in most implementations, this will return the same as get_data(), * however this may be different if you want to do custom JSON data handling. * * @since 4.4.0 * @access public * * @return mixed Any JSON-serializable value. */ public function jsonSerialize() { return $this->get_data(); } }
    Fatal error: Class 'WP_HTTP_Response' not found in /home/marcelo/public_html/vidagourmande.com/wp-includes/rest-api/class-wp-rest-response.php on line 17