Make WordPress Core

Ticket #61951: 61591.diff

File 61591.diff, 4.0 KB (added by sabernhardt, 10 months ago)

creating hidden templates for the headings so they can use PHP

  • src/wp-content/themes/twentytwentyfour/patterns/hidden-posts-heading.php

     
     1<?php
     2/**
     3 * Title: Posts heading
     4 * Slug: twentytwentyfour/hidden-posts-heading
     5 * Categories: hidden
     6 * Inserter: no
     7 */
     8?>
     9<!-- wp:heading {"level":1,"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|50"}}}} -->
     10<h1 class="wp-block-heading alignwide" style="padding-top:var(--wp--preset--spacing--50)"><?php esc_html_e( 'Posts', 'twentytwentyfour' ); ?></h1>
     11<!-- /wp:heading -->
  • src/wp-content/themes/twentytwentyfour/templates/index.html

    Property changes on: src/wp-content/themes/twentytwentyfour/patterns/hidden-posts-heading.php
    ___________________________________________________________________
    Added: svn:eol-style
    ## -0,0 +1 ##
    +native
    \ No newline at end of property
     
    22
    33<!-- wp:group {"tagName":"main","align":"full","layout":{"type":"constrained"}} -->
    44<main class="wp-block-group alignfull">
    5         <!-- wp:heading {"level":1,"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|50"}}}} -->
    6         <h1 class="wp-block-heading alignwide" style="padding-top:var(--wp--preset--spacing--50)">Posts</h1>
    7         <!-- /wp:heading -->
     5        <!-- wp:pattern {"slug":"twentytwentyfour/hidden-posts-heading"} /-->
    86        <!-- wp:pattern {"slug":"twentytwentyfour/posts-3-col"} /-->
    97</main>
    108<!-- /wp:group -->
  • src/wp-content/themes/twentytwentythree/patterns/hidden-heading.php

     
     1<?php
     2/**
     3 * Title: Hidden Heading for Homepage
     4 * Slug: twentytwentythree/hidden-heading
     5 * Inserter: no
     6 */
     7?>
     8<!-- wp:heading {"level":1,"align":"wide","style":{"spacing":{"margin":{"bottom":"var:preset|spacing|60"}}}} -->
     9<h1 class="alignwide" style="margin-bottom:var(--wp--preset--spacing--60)"><?php echo esc_html_x( 'Mindblown: a blog about philosophy.', 'Main heading for homepage', 'twentytwentythree' ); ?></h1>
     10<!-- /wp:heading -->
  • src/wp-content/themes/twentytwentythree/templates/home.html

    Property changes on: src/wp-content/themes/twentytwentythree/patterns/hidden-heading.php
    ___________________________________________________________________
    Added: svn:eol-style
    ## -0,0 +1 ##
    +native
    \ No newline at end of property
     
    22
    33<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|70"}}},"layout":{"type":"constrained"}} -->
    44<main class="wp-block-group" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--70)">
    5         <!-- wp:heading {"level":1,"align":"wide","style":{"spacing":{"margin":{"bottom":"var:preset|spacing|60"}}}} -->
    6         <h1 class="alignwide" style="margin-bottom:var(--wp--preset--spacing--60)">Mindblown: a blog about philosophy.</h1>
    7         <!-- /wp:heading -->
     5        <!-- wp:pattern {"slug":"twentytwentythree/hidden-heading"} /-->
    86
    97        <!-- wp:query {"query":{"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true},"displayLayout":{"type":"flex","columns":3},"align":"wide","layout":{"type":"constrained"}} -->
    108        <div class="wp-block-query alignwide">