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 ''; } /** * Per-page footer claim. Empty values inherit the default ETS message. */ function xmartica_add_footer_claim_meta_box() { add_meta_box( 'xmartica-footer-claim', esc_html__( 'Texto principal del footer', 'html5blank' ), 'xmartica_render_footer_claim_meta_box', 'page', 'normal', 'default' ); } add_action( 'add_meta_boxes', 'xmartica_add_footer_claim_meta_box' ); function xmartica_render_footer_claim_meta_box( $post ) { $value = get_post_meta( $post->ID, 'footer_claim', true ); wp_nonce_field( 'xmartica_save_footer_claim', 'xmartica_footer_claim_nonce' ); ?>

-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-">
%s says:' ), get_comment_author_link() ) ?>
comment_approved == '0' ) : ?>
$add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ) ?>
tags in Excerpt (Manual Excerpts only) add_filter( 'the_excerpt', 'do_shortcode' ); // Allows Shortcodes to be executed in Excerpt (Manual Excerpts only) add_filter( 'excerpt_more', 'html5_blank_view_article' ); // Add 'View Article' button instead of [...] for Excerpts add_filter( 'show_admin_bar', 'remove_admin_bar' ); // Remove Admin bar