page item in the list. * * @since 2.8.0 * * @see wp_list_pages() * * @param string[] $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 ID of the current page. */ $css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page_id ) ); $css_classes = $css_classes ? ' class="' . esc_attr( $css_classes ) . '"' : ''; 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']; $atts = array(); $atts['href'] = get_permalink( $page->ID ); $atts['aria-current'] = ( $page->ID === (int) $current_page_id ) ? 'page' : ''; /** * Filters the HTML attributes applied to a page menu item's anchor element. * * @since 4.8.0 * * @param array $atts { * The HTML attributes applied to the menu item's `` element, empty strings are ignored. * * @type string $href The href attribute. * @type string $aria-current The aria-current attribute. * } * @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 ID of the current page. */ $atts = apply_filters( 'page_menu_link_attributes', $atts, $page, $depth, $args, $current_page_id ); $attributes = ''; foreach ( $atts as $attr => $value ) { if ( is_scalar( $value ) && '' !== $value && false !== $value ) { $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); $attributes .= ' ' . $attr . '="' . $value . '"'; } } $output .= $indent . sprintf( '%s%s%s', $css_classes, $attributes, $args['link_before'], /** This filter is documented in wp-includes/post-template.php */ 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 ); } } /** * Outputs the end of the current element in the tree. * * @since 2.1.0 * @since 5.9.0 Renamed `$page` to `$data_object` to match parent class for PHP 8 named parameter support. * * @see Walker::end_el() * * @param string $output Used to append additional content. Passed by reference. * @param WP_Post $data_object Page data object. Not used. * @param int $depth Optional. Depth of page. Default 0 (unused). * @param array $args Optional. Array of arguments. Default empty array. */ public function end_el( &$output, $data_object, $depth = 0, $args = array() ) { if ( isset( $args['item_spacing'] ) && 'preserve' === $args['item_spacing'] ) { $t = "\t"; $n = "\n"; } else { $t = ''; $n = ''; } $output .= "{$n}"; } } {"id":264,"date":"2020-05-02T17:01:31","date_gmt":"2020-05-02T15:01:31","guid":{"rendered":"https:\/\/blog.chrisrenk.com\/crp\/?p=264"},"modified":"2020-05-02T17:01:31","modified_gmt":"2020-05-02T15:01:31","slug":"prunus-laurocerasus","status":"publish","type":"post","link":"https:\/\/blog.chrisrenk.com\/crp\/nature\/prunus-laurocerasus\/","title":{"rendered":"Prunus laurocerasus"},"content":{"rendered":"\n

Day 27 of my 365 Photo Channel.<\/strong><\/p>\n\n\n\n

Since the weather is still very changeable, I limited my motive search today to the immediate vicinity of my house. Luckily, there are enough plants in my garden, which I haven’t photographed yet.<\/p>\n\n\n\n

Now, due to the rain, the plants are sprouting their flowers and leaves.<\/p>\n\n\n\n

I just had to wait until the sun was covered by thick clouds again and then take a close-up with my Nikkor 70-200mm F2.8.<\/p>\n\n\n\n

I think I hit the laurel cherry well!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"

Day 27 of my 365 Photo Channel. Since the weather is still very changeable, I limited my motive search today to the immediate vicinity of my house. Luckily, there are enough plants in my garden, which I haven’t photographed yet. Now, due to the rain, the plants are sprouting their flowers and leaves. I just […]<\/p>\n","protected":false},"author":1,"featured_media":265,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[41,3],"tags":[128,93,92,114,4,110,98,6,101,127,54],"class_list":["post-264","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-365-challenge","category-nature","tag-blossom","tag-blur","tag-bokeh","tag-close-up-2","tag-flora","tag-flowers","tag-macro","tag-nature","tag-no-person","tag-rain","tag-spring"],"_links":{"self":[{"href":"https:\/\/blog.chrisrenk.com\/crp\/wp-json\/wp\/v2\/posts\/264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.chrisrenk.com\/crp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.chrisrenk.com\/crp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.chrisrenk.com\/crp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.chrisrenk.com\/crp\/wp-json\/wp\/v2\/comments?post=264"}],"version-history":[{"count":1,"href":"https:\/\/blog.chrisrenk.com\/crp\/wp-json\/wp\/v2\/posts\/264\/revisions"}],"predecessor-version":[{"id":266,"href":"https:\/\/blog.chrisrenk.com\/crp\/wp-json\/wp\/v2\/posts\/264\/revisions\/266"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.chrisrenk.com\/crp\/wp-json\/wp\/v2\/media\/265"}],"wp:attachment":[{"href":"https:\/\/blog.chrisrenk.com\/crp\/wp-json\/wp\/v2\/media?parent=264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.chrisrenk.com\/crp\/wp-json\/wp\/v2\/categories?post=264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.chrisrenk.com\/crp\/wp-json\/wp\/v2\/tags?post=264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}