{"generator":"Code Snippets v2.10.1.1","date_created":"2018-04-23 10:58","snippets":[{"name":"Post Meta","scope":"front-end","code":"if ( ! function_exists( 'ultra_posted_on' ) ) :\r\n\/**\r\n * Prints HTML with meta information for the current post-date\/time, author, comment count and categories.\r\n *\/\r\n\r\nfunction ultra_posted_on() {\r\n\r\n\techo '<div class=\"entry-meta-inner\">';\r\n\r\n\tif ( is_sticky() && is_home() && ! is_paged() ) {\r\n\t\techo '<span class=\"featured-post\">' . esc_html__( 'Sticky', 'ultra' ) . '<\/span>';\r\n\t}\r\n\r\n\tif ( is_home() && siteorigin_setting( 'blog_post_date' ) || is_archive() && siteorigin_setting( 'blog_post_date' ) || is_search() && siteorigin_setting( 'blog_post_date' ) ) {\r\n\t\techo '<span class=\"entry-date\"><a href=\"' . esc_url( get_permalink() ) . '\" rel=\"bookmark\"><time class=\"published\" datetime=\"' . esc_attr( get_the_date( 'c' ) ) . '\">' . esc_html( get_the_date( 'j F Y' ) ) . '<\/time><time class=\"updated\" datetime=\"' . esc_attr( get_the_modified_date( 'c' ) ) . '\">' . esc_html( get_the_modified_date() ) . '<\/time><\/span><\/a>';\r\n\t}\r\n\r\n\tif ( is_single() && siteorigin_setting( 'blog_post_date' ) ) {\r\n\t\techo '<span class=\"entry-date\"><time class=\"published\" datetime=\"' . esc_attr( get_the_date( 'c' ) ) . '\">' . esc_html( get_the_date( 'j F Y' ) ) . '<\/time><time class=\"updated\" datetime=\"' . esc_attr( get_the_modified_date( 'c' ) ) . '\">' . esc_html( get_the_modified_date() ) . '<\/time><\/span>';\r\n\t}\r\n\r\n\tif ( siteorigin_setting( 'blog_post_author' ) ) {\r\n\t\techo '<span class=\"byline\"><span class=\"author vcard\"><a class=\"url fn n\" href=\"' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '\" rel=\"author\">' . esc_html( get_the_author() ) . '<\/a><\/span><\/span>';\r\n\t}\r\n  \r\n\tif ( has_category() && siteorigin_setting( 'blog_post_cats' ) ) {\r\n\t\tultra_count_categories();\r\n\t}  \r\n\r\n\tif ( comments_open() && siteorigin_setting( 'blog_post_comment_count' ) ) { \r\n\t\techo '<span class=\"comments-link\">';\r\n  \t\tcomments_popup_link( esc_html__( 'Leave a comment', 'ultra' ), esc_html__( '1 Comment', 'ultra' ), esc_html__( '% Comments', 'ultra' ) );\r\n  \t\techo '<\/span>';\r\n\t}\r\n\r\n\techo '<\/div>';\r\n\r\n\tif ( is_single() && siteorigin_setting( 'navigation_post_nav' ) ) {\r\n\t\tthe_post_navigation( $args = array( 'prev_text' => '', 'next_text' => '', ) );\r\n\t}\r\n}\r\nendif;\r\n\r\nif ( ! function_exists( 'ultra_count_categories' ) ) :\r\n\/**\r\n * Display a finite number of categories.\r\n *\/\r\nfunction ultra_count_categories() {\r\n\tif ( has_category() ) {\r\n\t\t$categories = array_slice( get_the_category(), 0, 1 ); ?>\r\n\t\t<span class=\"cat-links\"> <?php\r\n\t\t  foreach ( $categories as $category ) {\r\n\t\t\t  if ( $category ) {\r\n\t\t\t\t  echo '<a href=\"' . get_category_link( $category->term_id ) . '\">' . $category->cat_name . '<\/a>';\r\n\t\t\t  }\r\n\t\t  } ?>\r\n\t\t<\/span>\r\n\t<?php }\r\n}\r\nendif;\r\n\r\nif ( ! function_exists( 'ultra_entry_footer' ) ) :\r\n\/**\r\n * Prints HTML with meta information for the categories, tags and comments.\r\n *\/\r\nfunction ultra_entry_footer() {\r\n  \r\n\tif ( is_single() && has_tag() && siteorigin_setting( 'blog_post_tags' ) ) {\r\n\t\techo '<span class=\"tags-links\">' . get_the_tag_list( '', esc_html__( ', ', 'ultra' ) ) . '<\/span>';\r\n\t}\r\n\r\n\tif ( siteorigin_setting( 'blog_edit_link' ) ) { \r\n\t\tedit_post_link( esc_html__( 'Edit', 'ultra' ), '<span class=\"edit-link\">', '<\/span>' ); \r\n\t}\t\r\n}\r\nendif;"}]}