ID ) return; remove_action( 'edit_form_after_title', '_wp_posts_page_notice' ); add_post_type_support( $post->post_type, 'editor' ); } endif; /** * Filters 'get_the_archive_title' to add better archive titles than core. * * @since 3.0.0 * @access public * @param string $title * @return string */ if ( !function_exists( 'hoot_archive_title_filter' ) ): function hoot_archive_title_filter( $title ) { if ( is_home() && ! is_front_page() ) $title = get_post_field( 'post_title', get_queried_object_id() ); elseif ( is_category() ) $title = str_replace( __( 'Category: ', 'unos' ), '', $title ); elseif ( is_tag() ) $title = str_replace( __( 'Tag: ', 'unos' ), '', $title ); elseif ( is_tax() && !is_tax( 'post_format' ) ) $title = single_term_title( '', false ); elseif ( is_author() ) $title = str_replace( __( 'Author: ', 'unos' ), '', $title ); elseif ( is_search() ) /* Translators: %s is search query */ $title = sprintf( esc_html__( 'Search results for: %s', 'unos' ), get_search_query() ); elseif ( is_post_type_archive() ) $title = str_replace( __( 'Archives: ', 'unos' ), '', $title ); /* If the current page is a paged page. */ if ( ( ( $page = get_query_var( 'paged' ) ) || ( $page = get_query_var( 'page' ) ) ) && $page > 1 ) { $paged = number_format_i18n( absint( $page ) ); /* Translators: %s is page number */ $suffix = ' ' . sprintf( __( '(Page %s)', 'unos' ), $paged ) . ''; $suffix = apply_filters( 'hoot_archive_title_paged', $suffix, $paged ); $title .= $suffix; } return apply_filters( 'hoot_archive_title', $title ); } endif; /** * Filters 'get_the_archve_description' to add better archive descriptions than core. * * @since 3.0.0 * @access public * @param string $desc * @return string */ if ( !function_exists( 'hoot_archive_description_filter' ) ): function hoot_archive_description_filter( $desc ) { if ( is_home() && ! is_front_page() ) $desc = get_post_field( 'post_content', get_queried_object_id(), 'raw' ); return ( ( !empty( $desc ) ) ? do_shortcode( wp_kses_post( wpautop( $desc ) ) ) : '' ); } endif; /** * The WordPress.org theme review requires that a link be provided to the single post page for untitled * posts. This is a filter on 'the_title' so that an '(Untitled)' title appears in that scenario, allowing * for the normal method to work. * * @since 3.0.0 * @access public * @param string $title * @return string */ if ( !function_exists( 'hoot_untitled_post' ) ): function hoot_untitled_post( $title ) { // Translators: Used as a placeholder for untitled posts on non-singular views. if ( ! $title && ! is_singular() && in_the_loop() && ! is_admin() ) $title = esc_html__( '(Untitled)', 'unos' ); return $title; } endif; /** * Filters the excerpt more output with internationalized text and a link to the post. * * @since 3.0.0 * @access public * @param string $more * @return string */ if ( !function_exists( 'hoot_readmore' ) ): function hoot_readmore( $more = '[…]' ) { if ( is_admin() ) return $more; $read_more = apply_filters( 'hoot_readmoretext', $more ); global $post; $read_more = '' . esc_html( $read_more ) . ''; return wp_kses_post( apply_filters( 'hoot_readmore', $read_more ) ); } endif; /** * Always display the 'Read More' link in Excerpts (even when excerpt is actually smaller than excerpt length) * Insert quicktag to be replaced later in 'wp_trim_excerpt()' * * @since 3.0.0 * @access public * @param string $more * @return string */ if ( !function_exists( 'hoot_readmore_quicktag' ) ): function hoot_readmore_quicktag( $more = '' ) { if ( is_admin() ) return $more; return ''; } endif; /** * Always display the 'Read More' link in Excerpts (even when excerpt is actually smaller than excerpt length) * Replace quicktag with read more link * * @since 3.0.0 * @access public * @param string $text * @param string $raw_excerpt * @return string */ if ( !function_exists( 'hoot_readmore_quicktag_replace' ) ): function hoot_readmore_quicktag_replace( $text, $raw_excerpt ) { if ( is_admin() ) return $text; $read_more = hoot_readmore(); return str_replace( '', $read_more, $text ); } endif; /** * Wraps the output of 'wp_link_pages()' with '

' tag. * * @since 3.0.0 * @access public * @param array $args * @return array */ if ( !function_exists( 'hoot_link_pages_args' ) ): function hoot_link_pages_args( $args ) { $args['before'] = str_replace( '

', '