esc_html_x example

/** * Title: Hidden Comments * Slug: twentytwentythree/hidden-comments * Inserter: no */
?> <!-- wp:group {"layout":{"type":"constrained"},"style":{"spacing":{"padding":{"top":"var:preset|spacing|40","right":"var:preset|spacing|40","bottom":"var:preset|spacing|40","left":"var:preset|spacing|40"}}}} --> <div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)"> <!-- wp:comments --> <div class="wp-block-comments"> <!-- wp:heading {"level":2} --> <h2><?php echo esc_html_x( 'Comments', 'Title of comments section', 'twentytwentythree' ); ?></h2> <!-- /wp:heading --> <!-- wp:comments-title {"level":3} /--> <!-- wp:comment-template --> <!-- wp:columns {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|40"}}}} --> <div class="wp-block-columns" style="margin-bottom:var(--wp--preset--spacing--40)"> <!-- wp:column {"width":"40px"} --> <div class="wp-block-column" style="flex-basis:40px"> <!-- wp:avatar {"size":40,"style":{"border":{"radius":"20px"}}} /--> </div> <!-- /wp:column --> <!-- wp:column --> <div class="wp-block-column"> <!-- wp:comment-author-name /--> <!-- wp:group {"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"flex"}} --> <div class="wp-block-group" style="margin-top:0px;margin-bottom:0px"> <!-- wp:comment-date /--> <!-- wp:comment-edit-link /--> </div> <!-- /wp:group --> <!-- wp:comment-content /--> <!-- wp:comment-reply-link /--> </div> <!-- /wp:column --> </div> <!-- /wp:columns --> <!-- /wp:comment-template --> <!-- wp:comments-pagination {"paginationArrow":"arrow","layout":{"type":"flex","justifyContent":"space-between"}} --> <!-- wp:comments-pagination-previous /--> <!-- wp:comments-pagination-numbers /--> <!-- wp:comments-pagination-next /--> <!-- /wp:comments-pagination --> <!-- wp:post-comments-form /--> </div> <!-- /wp:comments --> </div> <!-- /wp:group -->


        // Enqueue editor styles.         add_editor_style( $editor_stylesheet_path );

        // Add custom editor font sizes.         add_theme_support(
            'editor-font-sizes',
            array(
                array(
                    'name'      => esc_html__( 'Extra small', 'twentytwentyone' ),
                    'shortName' => esc_html_x( 'XS', 'Font size', 'twentytwentyone' ),
                    'size'      => 16,
                    'slug'      => 'extra-small',
                ),
                array(
                    'name'      => esc_html__( 'Small', 'twentytwentyone' ),
                    'shortName' => esc_html_x( 'S', 'Font size', 'twentytwentyone' ),
                    'size'      => 18,
                    'slug'      => 'small',
                ),
                array(
                    'name'      => esc_html__( 'Normal', 'twentytwentyone' ),
                    
<?php echo implode( "</p>\n<p>", $errors->get_error_messages() ); ?></p> </div> <?php endif; ?> <div class="wrap" id="profile-page"> <h1 class="wp-heading-inline"> <?php echo esc_html( $title ); ?> </h1> <?php if ( ! IS_PROFILE_PAGE ) : ?> <?php if ( current_user_can( 'create_users' ) ) : ?> <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a> <?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?> <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a> <?php endif; ?> <?php endif; ?> <hr class="wp-header-end"> <form id="your-profile" action="<?php echo esc_url( self_admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post" novalidate="novalidate" <?php                 /** * Fires inside the your-profile form tag on the user editing screen. * * @since 3.0.0 */

function twenty_twenty_one_get_starter_content() {

    // Define and register starter content to showcase the theme on new sites.     $starter_content = array(

        // Specify the core-defined pages to create and add custom thumbnails to some of them.         'posts'     => array(
            'front' => array(
                'post_type'    => 'page',
                'post_title'   => esc_html_x( 'Create your website with blocks', 'Theme starter content', 'twentytwentyone' ),
                'post_content' => ' <!-- wp:heading {"align":"wide","fontSize":"gigantic","style":{"typography":{"lineHeight":"1.1"}}} --> <h2 class="alignwide has-text-align-wide has-gigantic-font-size" style="line-height:1.1">' . esc_html_x( 'Create your website with blocks', 'Theme starter content', 'twentytwentyone' ) . '</h2> <!-- /wp:heading --> <!-- wp:spacer --> <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div> <!-- /wp:spacer --> <!-- wp:columns {"verticalAlignment":"center","align":"wide","className":"is-style-twentytwentyone-columns-overlap"} --> <div class="wp-block-columns alignwide are-vertically-aligned-center is-style-twentytwentyone-columns-overlap"><!-- wp:column {"verticalAlignment":"center"} --> <div class="wp-block-column is-vertically-aligned-center"><!-- wp:image {"align":"full","sizeSlug":"large"} --> <figure class="wp-block-image alignfull size-large"><img src="'
<?php echo esc_html( $title );
?> </h1> <?php if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ), true ) ) {
    /** This filter is documented in wp-login.php */
    $sign_up_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
    printf( ' <a href="%s" class="page-title-action">%s</a>', esc_url( $sign_up_url )esc_html_x( 'Add New', 'site' ) );
}

if ( empty( $blogs ) ) :
    ?> <div class="notice notice-error is-dismissible"><p><strong><?php _e( 'You must be a member of at least one site to use this page.' ); ?></strong></p></div> <?php else :
    ?> <hr class="wp-header-end"> <form id="myblogs" method="post">
wp_enqueue_script( 'updates' );

require_once ABSPATH . 'wp-admin/admin-header.php';
?> <div class="wrap"> <h1 class="wp-heading-inline"><?php esc_html_e( 'Themes' ); ?> <span class="title-count theme-count"><?php echo ! empty( $_GET['search'] ) ? __( '&hellip;' ) : count( $themes ); ?></span> </h1> <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?> <a href="<?php echo esc_url( admin_url( 'theme-install.php' ) ); ?>" class="hide-if-no-js page-title-action"><?php echo esc_html_x( 'Add New', 'theme' ); ?></a> <?php endif; ?> <form class="search-form"></form> <hr class="wp-header-end"> <?php if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) {
    ?> <div id="message1" class="updated notice is-dismissible"><p><?php _e( 'The active theme is broken. Reverting to the default theme.' ); ?></p></div> <?php } elseif ( isset( $_GET['activated'] ) ) {
    


$wp_list_table->prepare_items();

require_once ABSPATH . 'wp-admin/admin-header.php';
?> <div class="wrap"> <h1 class="wp-heading-inline"><?php _e( 'Sites' ); ?></h1> <?php if ( current_user_can( 'create_sites' ) ) : ?> <a href="<?php echo esc_url( network_admin_url( 'site-new.php' ) ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'site' ); ?></a> <?php endif; ?> <?php if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    echo '<span class="subtitle">';
    printf(
        /* translators: %s: Search query. */
        __( 'Search results for: %s' ),
        '<strong>' . esc_html( $s ) . '</strong>'
    );
    echo '</span>';
}
    $title       = __( 'Media Library' );
    $parent_file = 'upload.php';

    require_once ABSPATH . 'wp-admin/admin-header.php';
    ?> <div class="wrap" id="wp-media-grid" data-search="<?php _admin_search_query(); ?>"> <h1 class="wp-heading-inline"><?php echo esc_html( $title ); ?></h1> <?php         if ( current_user_can( 'upload_files' ) ) {
            ?> <a href="<?php echo esc_url( admin_url( 'media-new.php' ) ); ?>" class="page-title-action aria-button-if-js"><?php echo esc_html_x( 'Add New', 'file' ); ?></a> <?php         }
        ?> <hr class="wp-header-end"> <?php if ( ! empty( $message ) ) : ?> <div id="message" class="updated notice is-dismissible"><p><?php echo $message; ?></p></div> <?php endif; ?> <div class="error hide-if-js"> <p>
function twenty_twenty_one_entry_meta_footer() {

        // Early exit if not a post.         if ( 'post' !== get_post_type() ) {
            return;
        }

        // Hide meta information on pages.         if ( ! is_single() ) {

            if ( is_sticky() ) {
                echo '<p>' . esc_html_x( 'Featured post', 'Label for sticky posts', 'twentytwentyone' ) . '</p>';
            }

            $post_format = get_post_format();
            if ( 'aside' === $post_format || 'status' === $post_format ) {
                echo '<p><a href="' . esc_url( get_permalink() ) . '">' . twenty_twenty_one_continue_reading_text() . '</a></p>'; // phpcs:ignore WordPress.Security.EscapeOutput             }

            // Posted on.             twenty_twenty_one_posted_on();

            // Edit post link.
<?php echo esc_html_x( 'Posted', 'Verb to explain the publication status of a post', 'twentytwentythree' ); ?> </p> <!-- /wp:paragraph --> <!-- wp:post-date /--> <!-- wp:paragraph --> <p> <?php echo esc_html_x( 'in', 'Preposition to show the relationship between the post and its categories', 'twentytwentythree' ); ?> </p> <!-- /wp:paragraph --> <!-- wp:post-terms {"term":"category"} /--> </div> <!-- /wp:group --> <!-- wp:group {"style":{"spacing":{"blockGap":"0.5ch"}},"layout":{"type":"flex"}} --> <div class="wp-block-group"> <!-- wp:paragraph --> <p>
wp_enqueue_script( 'updates' );
wp_enqueue_script( 'theme-preview' );

require_once ABSPATH . 'wp-admin/admin-header.php';

?> <div class="wrap"> <h1 class="wp-heading-inline"><?php echo esc_html( $title ); ?></h1> <?php if ( current_user_can( 'install_themes' ) ) : ?> <a href="theme-install.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'theme' ); ?></a> <?php endif; ?> <?php if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    echo '<span class="subtitle">';
    printf(
        /* translators: %s: Search query. */
        __( 'Search results for: %s' ),
        '<strong>' . esc_html( $s ) . '</strong>'
    );
    echo '</span>';
}
require_once ABSPATH . 'wp-admin/admin-header.php';
?> <div class="wrap"> <h1 class="wp-heading-inline"> <?php echo esc_html( $title );
?> </h1> <a href="link-add.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'link' ); ?></a> <hr class="wp-header-end"> <?php if ( isset( $_GET['added'] ) ) : ?> <div id="message" class="updated notice is-dismissible"><p><?php _e( 'Link added.' ); ?></p></div> <?php endif; ?> <form name="<?php echo esc_attr( $form_name ); ?>" id="<?php echo esc_attr( $form_name ); ?>" method="post" action="link.php"> <?php if ( ! empty( $link_added ) ) {
    echo $link_added;
}

return array(
    'title'    => __( '404 content', 'twentytwentytwo' ),
    'inserter' => false,
    'content'  => '<!-- wp:heading {"style":{"typography":{"fontSize":"clamp(4rem, 40vw, 20rem)","fontWeight":"200","lineHeight":"1"}},"className":"has-text-align-center"} --> <h2 class="has-text-align-center" style="font-size:clamp(4rem, 40vw, 20rem);font-weight:200;line-height:1">' . esc_html( _x( '404', 'Error code for a webpage that is not found.', 'twentytwentytwo' ) ) . '</h2> <!-- /wp:heading --> <!-- wp:paragraph {"align":"center"} --> <p class="has-text-align-center">' . esc_html__( 'This page could not be found. Maybe try a search?', 'twentytwentytwo' ) . '</p> <!-- /wp:paragraph --> <!-- wp:search {"label":"' . esc_html_x( 'Search', 'label', 'twentytwentytwo' ) . '","showLabel":false,"width":50,"widthUnit":"%","buttonText":"' . esc_html__( 'Search', 'twentytwentytwo' ) . '","buttonUseIcon":true,"align":"center"} /-->',
);
<div class="wrap"> <h1 class="wp-heading-inline"> <?php echo esc_html( $title );
?> </h1> <?php if ( ( ! is_multisite() || is_network_admin() ) && current_user_can( 'install_plugins' ) ) {
    ?> <a href="<?php echo esc_url( self_admin_url( 'plugin-install.php' ) ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'plugin' ); ?></a> <?php }

if ( strlen( $s ) ) {
    echo '<span class="subtitle">';
    printf(
        /* translators: %s: Search query. */
        __( 'Search results for: %s' ),
        '<strong>' . esc_html( urldecode( $s ) ) . '</strong>'
    );
    echo '</span>';
}
<?php /** * Title: Hidden No Results Content * Slug: twentytwentythree/hidden-no-results-content * Inserter: no */
?> <!-- wp:paragraph --> <p> <?php echo esc_html_x( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'Message explaining that there are no results returned from a search', 'twentytwentythree' ); ?> </p> <!-- /wp:paragraph --> <!-- wp:search {"label":"<?php echo esc_html_x( 'Search', 'label', 'twentytwentythree' ); ?>","placeholder":"<?php echo esc_attr_x( 'Search...', 'placeholder for search field', 'twentytwentythree' ); ?>","showLabel":false,"buttonText":"<?php esc_attr_e( 'Search', 'twentytwentythree' ); ?>","buttonUseIcon":true} /-->
Home | Imprint | This part of the site doesn't use cookies.