esc_html__( 'Header ETS', 'html5blank' ), ) ); } add_action( 'after_setup_theme', 'xmartica_register_navigation' ); /** * Allow the trusted SVG assets used by the theme to live in the media library. */ function xmartica_allowed_upload_mimes( $mimes ) { $mimes['svg'] = 'image/svg+xml'; return $mimes; } add_filter( 'upload_mimes', 'xmartica_allowed_upload_mimes' ); function xmartica_svg_filetype_and_ext( $data, $file, $filename, $mimes ) { if ( 'svg' !== strtolower( pathinfo( $filename, PATHINFO_EXTENSION ) ) ) { return $data; } $data['ext'] = 'svg'; $data['type'] = 'image/svg+xml'; $data['proper_filename'] = $filename; return $data; } add_filter( 'wp_check_filetype_and_ext', 'xmartica_svg_filetype_and_ext', 10, 4 ); /** * A single-menu fallback for new installs where the Header ETS menu has not * been assigned yet. */ function xmartica_primary_menu_fallback( $args ) { $class = isset( $args['menu_class'] ) ? $args['menu_class'] : 'xmartica-menu'; echo '
-1 ) { unset( $classes[$key] ); } } elseif ( is_page() ) { $classes[] = sanitize_html_class( $post->post_name ); } elseif ( is_singular() ) { $classes[] = sanitize_html_class( $post->post_name ); } return $classes; } // Remove wp_head() injected Recent Comment styles function my_remove_recent_comments_style() { global $wp_widget_factory; if ( isset( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'] ) ) { remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) ); } } // Pagination for paged posts, Page 1, Page 2, Page 3, with Next and Previous Links, No plugin function html5wp_pagination() { global $wp_query; $big = 999999999; echo paginate_links( array( 'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var( 'paged' ) ), 'total' => $wp_query->max_num_pages, ) ); } // Custom View Article link to Post function html5_blank_view_article( $more ) { global $post; if ( isset( $post->post_type ) && 'page' === $post->post_type ) { return ''; } $permalink = isset( $post->ID ) ? get_permalink( $post->ID ) : ''; return '... ' . esc_html__( 'View Article', 'html5blank' ) . ''; } // Remove Admin bar function remove_admin_bar() { return false; } // Threaded Comments function enable_threaded_comments() { if ( ! is_admin() ) { if ( is_singular() AND comments_open() AND ( get_option( 'thread_comments' ) == 1 ) ) { wp_enqueue_script( 'comment-reply' ); } } } // Custom Comments Callback function html5blankcomments( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; extract( $args, EXTR_SKIP ); if ( 'div' == $args['style'] ) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } ?> < id="comment-">