esc_attr__ example

<?php /** * Layered images with duotone block pattern */
return array(
    'title'      => __( 'Layered images with duotone', 'twentytwentytwo' ),
    'categories' => array( 'featured', 'gallery' ),
    'content'    => '<!-- wp:cover {"url":"' . esc_url( get_template_directory_uri() ) . '/assets/images/ducks.jpg","dimRatio":0,"minHeight":666,"contentPosition":"center center","isDark":false,"align":"wide","style":{"spacing":{"padding":{"top":"1em","right":"1em","bottom":"1em","left":"1em"}},"color":{"duotone":["#000000","#FFFFFF"]}}} --> <div class="wp-block-cover alignwide is-light" style="padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em;min-height:666px"><span aria-hidden="true" class="has-background-dim-0 wp-block-cover__gradient-background has-background-dim"></span><img class="wp-block-cover__image-background" alt="' . esc_attr__( 'Painting of ducks in the water.', 'twentytwentytwo' ) . '" src="' . esc_url( get_template_directory_uri() ) . '/assets/images/ducks.jpg" data-object-fit="cover"/><div class="wp-block-cover__inner-container"><!-- wp:image {"align":"center","width":384,"height":580,"sizeSlug":"large"} --> <div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-salmon.jpg" alt="' . esc_attr__( 'Illustration of a flying bird.', 'twentytwentytwo' ) . '" width="384" height="580"/></figure></div> <!-- /wp:image --></div></div> <!-- /wp:cover -->',
);
<?php /** * Large list of names block pattern */
return array(
    'title'      => __( 'Large list of names', 'twentytwentytwo' ),
    'categories' => array( 'featured', 'text' ),
    'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"6rem","bottom":"6rem"}},"elements":{"link":{"color":{"text":"var:preset|color|primary"}}}},"backgroundColor":"tertiary","textColor":"primary","layout":{"inherit":true}} --> <div class="wp-block-group alignfull has-primary-color has-tertiary-background-color has-text-color has-background has-link-color" style="padding-top:6rem;padding-bottom:6rem"><!-- wp:group {"align":"wide"} --> <div class="wp-block-group alignwide"><!-- wp:image {"width":175,"height":82,"sizeSlug":"full","linkDestination":"none"} --> <figure class="wp-block-image size-full is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/icon-binoculars.png" alt="' . esc_attr__( 'An icon representing binoculars.', 'twentytwentytwo' ) . '" width="175" height="82"/></figure> <!-- /wp:image --></div> <!-- /wp:group --> <!-- wp:group {"align":"wide"} --> <div class="wp-block-group alignwide"><!-- wp:spacer {"height":32} --> <div style="height:32px" aria-hidden="true" class="wp-block-spacer"></div> <!-- /wp:spacer --> <!-- wp:paragraph {"style":{"typography":{"fontWeight":"300"}},"fontSize":"x-large"} --> <p class="has-x-large-font-size" style="font-weight:300">' . esc_html__( 'Jesús Rodriguez, Doug Stilton, Emery Driscoll, Megan Perry, Rowan Price, Angelo Tso, Edward Stilton, Amy Jensen, Boston Bell, Shay Ford, Lee Cunningham, Evelynn Ray, Landen Reese, Ewan Hart, Jenna Chan, Phoenix Murray, Mel Saunders, Aldo Davidson, Zain Hall.', 'twentytwentytwo' ) . '</p> <!-- /wp:paragraph --> <!-- wp:spacer {"height":32} --> <div style="height:32px" aria-hidden="true" class="wp-block-spacer"></div> <!-- /wp:spacer --> <!-- wp:buttons --> <div class="wp-block-buttons"><!-- wp:button {"backgroundColor":"primary","textColor":"background"} --> <div class="wp-block-button"><a class="wp-block-button__link has-background-color has-primary-background-color has-text-color has-background">'
<header class="entry-header alignwide"> <?php twenty_twenty_one_post_thumbnail(); ?> </header><!-- .entry-header --> <?php endif; ?> <div class="entry-content"> <?php         the_content();

        wp_link_pages(
            array(
                'before'   => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">',
                'after'    => '</nav>',
                /* translators: %: Page number. */
                'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ),
            )
        );
        ?> </div><!-- .entry-content --> <?php if ( get_edit_post_link() ) : ?> <footer class="entry-footer default-max-width"> <?php

    $media_dims = apply_filters( 'media_meta', $media_dims$post );

    $image_edit_button = '';

    if ( wp_attachment_is_image( $post->ID ) && wp_image_editor_supports( array( 'mime_type' => $post->post_mime_type ) ) ) {
        $nonce             = wp_create_nonce( "image_editor-$post->ID" );
        $image_edit_button = "<input type='button' id='imgedit-open-btn-$post->ID' onclick='imageEdit.open( $post->ID, \"$nonce\" )' class='button' value='" . esc_attr__( 'Edit Image' ) . "' /> <span class='spinner'></span>";
    }

    $attachment_url = get_permalink( $attachment_id );

    $item = " $type_html $toggle_links $order $display_title <table class='slidetoggle describe $class'> <thead class='media-item-info' id='media-head-$post->ID'> <tr> <td class='A1B1' id='thumbnail-head-
 . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-salmon.jpg" alt="' . esc_attr__( 'Illustration of a flying bird.', 'twentytwentytwo' ) . '"/></figure> <!-- /wp:image --> <!-- wp:spacer {"height":4} --> <div style="height:4px" aria-hidden="true" class="wp-block-spacer"></div> <!-- /wp:spacer --> <!-- wp:site-title {"isLink":false,"style":{"typography":{"fontStyle":"normal","fontWeight":"300","lineHeight":"1.2"}},"fontSize":"large","fontFamily":"source-serif-pro"} /--> <!-- wp:site-tagline /--> <!-- wp:spacer {"height":16} --> <div style="height:16px" aria-hidden="true" class="wp-block-spacer"></div> <!-- /wp:spacer --> <!-- wp:heading {"level":4,"fontSize":"large"} --> <h4 class="has-large-font-size"><em>'
/** * Performs an action following a single plugin update. * * @since 2.8.0 */
    public function after() {
        $this->plugin = $this->upgrader->plugin_info();
        if ( ! empty( $this->plugin ) && ! is_wp_error( $this->result ) && $this->plugin_active ) {
            // Currently used only when JS is off for a single plugin update?             printf(
                '<iframe title="%s" style="border:0;overflow:hidden" width="100%%" height="170" src="%s"></iframe>',
                esc_attr__( 'Update progress' ),
                wp_nonce_url( 'update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin )
            );
        }

        $this->decrement_update_count( 'plugin' );

        $update_actions = array(
            'activate_plugin' => sprintf(
                '<a href="%s" target="_parent">%s</a>',
                wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin ),
                __( 'Activate Plugin' )
            ),
<?php /** * Image with caption block pattern */
return array(
    'title'      => __( 'Image with caption', 'twentytwentytwo' ),
    'categories' => array( 'featured', 'columns', 'gallery' ),
    'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"6rem","bottom":"6rem"}},"elements":{"link":{"color":{"text":"var:preset|color|background"}}}},"backgroundColor":"primary","textColor":"background","layout":{"inherit":true}} --> <div class="wp-block-group alignfull has-background-color has-primary-background-color has-text-color has-background has-link-color" style="padding-top:6rem;padding-bottom:6rem"><!-- wp:media-text {"mediaId":202,"mediaLink":"' . esc_url( get_template_directory_uri() ) . '/assets/images/bird-on-gray.jpg","mediaType":"image","verticalAlignment":"bottom","imageFill":false} --> <div class="wp-block-media-text alignwide is-stacked-on-mobile is-vertically-aligned-bottom"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/bird-on-gray.jpg" alt="' . esc_attr__( 'Hummingbird illustration', 'twentytwentytwo' ) . '" class="wp-image-202 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph --> <p><strong>' . esc_html__( 'Hummingbird', 'twentytwentytwo' ) . '</strong></p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>' . esc_html__( 'A beautiful bird featuring a surprising set of color feathers.', 'twentytwentytwo' ) . '</p> <!-- /wp:paragraph --></div></div> <!-- /wp:media-text --></div> <!-- /wp:group -->',
);
/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
        $title = apply_filters( 'widget_title', $title$instance$this->id_base );

        if ( $title ) {
            $feed_link = '';
            $feed_url  = strip_tags( $url );
            $feed_icon = includes_url( 'images/rss.png' );
            $feed_link = sprintf(
                '<a class="rsswidget rss-widget-feed" href="%1$s"><img class="rss-widget-icon" style="border:0" width="14" height="14" src="%2$s" alt="%3$s"%4$s /></a> ',
                esc_url( $feed_url ),
                esc_url( $feed_icon ),
                esc_attr__( 'RSS' ),
                ( wp_lazy_loading_enabled( 'img', 'rss_widget_feed_icon' ) ? ' loading="lazy"' : '' )
            );

            /** * Filters the classic RSS widget's feed icon link. * * Themes can remove the icon link by using `add_filter( 'rss_widget_feed_link', '__return_empty_string' );`. * * @since 5.9.0 * * @param string|false $feed_link HTML for link to RSS feed. * @param array $instance Array of settings for the current widget. */
<?php /** * About page with media on the right */
return array(
    'title'      => __( 'About page with media on the right', 'twentytwentytwo' ),
    'categories' => array( 'pages' ),
    'content'    => '<!-- wp:media-text {"align":"full","mediaPosition":"right","mediaLink":"' . esc_url( get_template_directory_uri() ) . '/assets/images/bird-on-black.jpg","mediaType":"image","style":{"elements":{"link":{"color":{"text":"var:preset|color|background"}}}},"backgroundColor":"foreground","textColor":"background"} --> <div class="wp-block-media-text alignfull has-media-on-the-right is-stacked-on-mobile has-background-color has-foreground-background-color has-text-color has-background has-link-color"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/bird-on-black.jpg" alt="' . esc_attr__( 'An image of a bird flying', 'twentytwentytwo' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:spacer {"height":32} --> <div style="height:32px" aria-hidden="true" class="wp-block-spacer"></div> <!-- /wp:spacer --> <!-- wp:site-logo {"width":60} /--> <!-- wp:group {"style":{"spacing":{"padding":{"right":"min(8rem, 5vw)","top":"min(20rem, 20vw)"}}}} --> <div class="wp-block-group" style="padding-top:min(20rem, 20vw);padding-right:min(8rem, 5vw)"><!-- wp:heading {"style":{"typography":{"fontWeight":"300","lineHeight":"1.115","fontSize":"clamp(3rem, 6vw, 4.5rem)"}}} --> <h2 style="font-size:clamp(3rem, 6vw, 4.5rem);font-weight:300;line-height:1.115"><em>' . wp_kses_post( __( 'Emery<br>Driscoll', 'twentytwentytwo' ) ) . '</em></h2> <!-- /wp:heading --> <!-- wp:paragraph {"style":{"typography":{"lineHeight":"1.6"}}} --> <p style="line-height:1.6">' . esc_html__( 'Oh hello. My name’s Emery, and you’ve found your way to my website. I’m an avid bird watcher, and I also broadcast my own radio show on Tuesday evenings at 11PM EDT.', 'twentytwentytwo' ) . '</p> <!-- /wp:paragraph --> <!-- wp:spacer {"height":40} --> <div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div> <!-- /wp:spacer --> <!-- wp:social-links {"iconColor":"background","iconColorValue":"var(--wp--preset--color--foreground)","iconBackgroundColor":"foreground","iconBackgroundColorValue":"var(--wp--preset--color--background)"} --> <ul class="wp-block-social-links has-icon-color has-icon-background-color"><!-- wp:social-link {"url":"#","service":"wordpress"} /--> <!-- wp:social-link {"url":"#","service":"twitter"} /--> <!-- wp:social-link {"url":"#","service":"instagram"} /--></ul> <!-- /wp:social-links --></div> <!-- /wp:group --></div> <!-- wp:spacer {"height":32} --> <div style="height:32px" aria-hidden="true" class="wp-block-spacer"></div> <!-- /wp:spacer --></div> <!-- /wp:media-text -->',
 . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-a.png" alt="' . esc_attr__( 'An illustration of a bird in flight', 'twentytwentytwo' ) . '"/></figure> <!-- /wp:image --> <!-- wp:group {"align":"full","layout":{"inherit":true}} --> <div class="wp-block-group alignfull"><!-- wp:columns {"align":"wide"} --> <div class="wp-block-columns alignwide"><!-- wp:column {"width":"33.33%"} --> <div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:heading {"fontSize":"x-large"} --> <h2 class="has-x-large-font-size">' . esc_html__( 'Extended Trailer', 'twentytwentytwo' ) . '</h2> <!-- /wp:heading --> <!-- wp:paragraph --> <p>' . esc_html__( 'Oh hello. My name’s Angelo, and you’ve found your way to my blog. I write about a range of topics, but lately I’ve been sharing my hopes for next year.', 'twentytwentytwo' ) . '</p> <!-- /wp:paragraph --></div> <!-- /wp:column --> <!-- wp:column {"width":"66.66%"} --> <div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:video {"id":181} --> <figure class="wp-block-video"><video controls src="'
<?php if ( $stat_totals && isset( $stat_totals['all'] ) && (int) $stat_totals['all']->spam > 0 ) : ?> <div class="akismet-section-header__actions"> <a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>"> <?php esc_html_e( 'Detailed stats', 'akismet' ); ?> </a> </div> </div> <!-- close akismet-section-header --> <div class="akismet-new-snapshot"> <?php /* name attribute on iframe is used as a cache-buster here to force Firefox to load the new style charts: https://bugzilla.mozilla.org/show_bug.cgi?id=356558 */ ?> <div class="akismet-new-snapshot__chart"> <iframe id="stats-iframe" allowtransparency="true" scrolling="no" frameborder="0" style="width: 100%; height: 220px; overflow: hidden;" src="<?php echo esc_url( sprintf( 'https://tools.akismet.com/1.0/snapshot.php?blog=%s&token=%s&height=200&locale=%s&is_redecorated=1', urlencode( get_option( 'home' ) )urlencode( Akismet::get_access_token() )get_locale() ) ); ?>" name="<?php echo esc_attr( 'snapshot-' . filemtime( __FILE__ ) ); ?>" title="<?php echo esc_attr__( 'Akismet stats' ); ?>"></iframe> </div> <ul class="akismet-new-snapshot__list"> <li class="akismet-new-snapshot__item"> <h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'Past six months', 'akismet' ); ?></h3> <span class="akismet-new-snapshot__number"><?php echo number_format( $stat_totals['6-months']->spam ); ?></span> <span class="akismet-new-snapshot__text"><?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['6-months']->spam, 'akismet' ) ); ?></span> </li> <li class="akismet-new-snapshot__item"> <h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'All time', 'akismet' ); ?></h3> <span class="akismet-new-snapshot__number"><?php echo number_format( $stat_totals['all']->spam ); ?></span> <span class="akismet-new-snapshot__text"><?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['all']->spam, 'akismet' ) ); ?></span> </li> <li class="akismet-new-snapshot__item"> <h3 class="akismet-new-snapshot__header">
/* translators: %s: Title of an invalid menu item. */
                'invalidTitleTpl'        => __( '%s (Invalid)' ),
                /* translators: %s: Title of a menu item in draft status. */
                'pendingTitleTpl'        => __( '%s (Pending)' ),
                /* translators: %d: Number of menu items found. */
                'itemsFound'             => __( 'Number of items found: %d' ),
                /* translators: %d: Number of additional menu items found. */
                'itemsFoundMore'         => __( 'Additional items found: %d' ),
                'itemsLoadingMore'       => __( 'Loading more results... please wait.' ),
                'reorderModeOn'          => __( 'Reorder mode enabled' ),
                'reorderModeOff'         => __( 'Reorder mode closed' ),
                'reorderLabelOn'         => esc_attr__( 'Reorder menu items' ),
                'reorderLabelOff'        => esc_attr__( 'Close reorder mode' ),
            ),
            'settingTransport'         => 'postMessage',
            'phpIntMax'                => PHP_INT_MAX,
            'defaultSettingValues'     => array(
                'nav_menu'      => $temp_nav_menu_setting->default,
                'nav_menu_item' => $temp_nav_menu_item_setting->default,
            ),
            'locationSlugMappedToName' => get_registered_nav_menus(),
        );

        
 . 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="' . esc_url( get_template_directory_uri() ) . '/assets/images/roses-tremieres-hollyhocks-1884.jpg" alt="' . esc_attr__( '&#8220;Roses Trémières&#8221; by Berthe Morisot', 'twentytwentyone' ) . '"/></figure> <!-- /wp:image --> <!-- wp:spacer --> <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div> <!-- /wp:spacer --> <!-- wp:image {"align":"full","sizeSlug":"large","className":"is-style-twentytwentyone-image-frame"} --> <figure class="wp-block-image alignfull size-large is-style-twentytwentyone-image-frame"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/in-the-bois-de-boulogne.jpg" alt="' . esc_attr__( '&#8220;In the Bois de Boulogne&#8221; by Berthe Morisot', 'twentytwentyone' ) . '"/></figure> <!-- /wp:image --></div> <!-- /wp:column --> <!-- wp:column {"verticalAlignment":"center"} --> <div class="wp-block-column is-vertically-aligned-center"><!-- wp:spacer --> <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div> <!-- /wp:spacer --> <!-- wp:image {"sizeSlug":"large","className":"alignfull size-full is-style-twentytwentyone-border"} --> <figure class="wp-block-image size-large alignfull size-full is-style-twentytwentyone-border"><img src="'
<?php /** * Bird image * * This pattern is used only to reference a dynamic image URL. * It does not appear in the inserter. */
return array(
    'title'    => __( 'Heading and bird image', 'twentytwentytwo' ),
    'inserter' => false,
    'content'  => '<!-- wp:image {"align":"wide","sizeSlug":"full","linkDestination":"none"} --> <figure class="wp-block-image alignwide size-full"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-d.png" alt="' . esc_attr__( 'Illustration of a bird flying.', 'twentytwentytwo' ) . '"/></figure> <!-- /wp:image -->',
);

        );

        // Media & Text Article Title.         register_block_pattern(
            'twentytwentyone/media-text-article-title',
            array(
                'title'         => esc_html__( 'Media and text article title', 'twentytwentyone' ),
                'categories'    => array( 'twentytwentyone' ),
                'viewportWidth' => 1440,
                'description'   => esc_html_x( 'A Media & Text block with a big image on the left and a heading on the right. The heading is followed by a separator and a description paragraph.', 'Block pattern description', 'twentytwentyone' ),
                'content'       => '<!-- wp:media-text {"mediaId":1752,"mediaLink":"' . esc_url( get_template_directory_uri() ) . '/assets/images/playing-in-the-sand.jpg","mediaType":"image","className":"is-style-twentytwentyone-border"} --><div class="wp-block-media-text alignwide is-stacked-on-mobile is-style-twentytwentyone-border"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/playing-in-the-sand.jpg" alt="' . esc_attr__( '&#8220;Playing in the Sand&#8221; by Berthe Morisot', 'twentytwentyone' ) . '" class="wp-image-1752"/></figure><div class="wp-block-media-text__content"><!-- wp:heading {"align":"center"} --><h2 class="has-text-align-center">' . esc_html__( 'Playing in the Sand', 'twentytwentyone' ) . '</h2><!-- /wp:heading --><!-- wp:separator {"className":"is-style-dots"} --><hr class="wp-block-separator is-style-dots"/><!-- /wp:separator --><!-- wp:paragraph {"align":"center","fontSize":"small"} --><p class="has-text-align-center has-small-font-size">' . wp_kses_post( __( 'Berthe Morisot<br>(French, 1841-1895)', 'twentytwentyone' ) ) . '</p><!-- /wp:paragraph --></div></div><!-- /wp:media-text -->',
            )
        );

        // Overlapping Images.         register_block_pattern(
            'twentytwentyone/overlapping-images',
            array(
                'title'         => esc_html__( 'Overlapping images', 'twentytwentyone' ),
                'categories'    => array( 'twentytwentyone' ),
                'viewportWidth' => 1024,
                'blockTypes'    => array( 'core/columns' ),
                
Home | Imprint | This part of the site doesn't use cookies.