Making WordPress.org

Changeset 13839


Ignore:
Timestamp:
06/20/2024 01:29:10 AM (9 months ago)
Author:
adamwood
Message:

Learn: Sync with git WordPress/learn@cb9f74d

Location:
sites/trunk/wordpress.org/public_html/wp-content
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/wporg-learn.php

    r13754 r13839  
    8585    require_once get_includes_path() . 'post-type.php';
    8686    require_once get_includes_path() . 'profiles.php';
     87    require_once get_includes_path() . 'redirects.php';
    8788    require_once get_includes_path() . 'sensei.php';
    8889    require_once get_includes_path() . 'taxonomy.php';
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/functions.php

    r13159 r13839  
    11421142
    11431143/**
    1144  * Redirect meeting posts to associated link
    1145  *
    1146  * @return void
    1147  */
    1148 function wporg_learn_redirect_meetings() {
    1149     global $post;
    1150 
    1151     if ( is_singular( array( 'meeting' ) ) ) {
    1152 
    1153         if ( ! empty( $post->ID ) ) {
    1154 
    1155             $redirect = wp_http_validate_url( get_post_meta( $post->ID, 'link', true ) );
    1156 
    1157             if ( $redirect && wp_redirect( $redirect ) ) {
    1158                 exit;
    1159             }
    1160         }
    1161     }
    1162 
    1163 }
    1164 add_action( 'template_redirect', 'wporg_learn_redirect_meetings' );
    1165 
    1166 /**
    1167  * Redirect old pages to their new homes.
    1168  *
    1169  * @return void
    1170  */
    1171 function wporg_learn_redirect_old_urls() {
    1172     if ( ! is_404() ) {
    1173         return;
    1174     }
    1175 
    1176     $redirects = array(
    1177         // Source => Destination, any characters after the source will be appended to the destination.
    1178         '/workshop/'                      => '/tutorial/',
    1179         '/workshops'                      => '/tutorials',
    1180         '/social-learning'                => '/online-workshops',
    1181         '/workshop-presenter-application' => '/tutorial-presenter-application',
    1182         '/report-content-errors'          => '/report-content-feedback',
    1183     );
    1184 
    1185     // Use `REQUEST_URI` rather than `$wp->request`, to get the entire source URI including url parameters.
    1186     $request = $_SERVER['REQUEST_URI'] ?? '';
    1187 
    1188     foreach ( $redirects as $source => $destination ) {
    1189         if ( str_starts_with( $request, $source ) ) {
    1190             $redirect = $destination;
    1191 
    1192             // Append any extra request parameters.
    1193             if ( strlen( $request ) > strlen( $source ) ) {
    1194                 $redirect .= substr( $request, strlen( $source ) );
    1195             }
    1196 
    1197             wp_safe_redirect( $redirect );
    1198             die();
    1199         }
    1200     }
    1201 }
    1202 add_action( 'template_redirect', 'wporg_learn_redirect_old_urls' );
    1203 
    1204 /**
    12051144 * Add file MIME types for upload.
    12061145 *
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/patterns/front-page-header.php

    r13831 r13839  
    2424    <div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--30)">
    2525
    26         <!-- wp:heading {"level":1,"style":{"typography":{"fontSize":"50px","fontStyle":"normal","fontWeight":"400"}},"fontFamily":"eb-garamond"} -->
    27         <h1 class="wp-block-heading has-eb-garamond-font-family" style="font-size:50px;font-style:normal;font-weight:400"><?php esc_html_e( 'Learn WordPress', 'wporg-learn' ); ?></h1>
     26        <!-- wp:heading {"level":1,"style":{"typography":{"fontSize":"50px"}}} -->
     27        <h1 class="wp-block-heading" style="font-size:50px"><?php esc_html_e( 'Learn WordPress', 'wporg-learn' ); ?></h1>
    2828        <!-- /wp:heading -->
    2929
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/patterns/page-learning-pathways-content.php

    r13746 r13839  
    99?>
    1010
    11 <!-- wp:paragraph {"style":{"spacing":{"margin":{"top":"0"}}}} -->
    12 <p style="margin-top:0"><?php esc_html_e( 'Dive into our learning pathways which will take you from beginner to expert at your own pace.', 'wporg-learn' ); ?></p>
     11<!-- wp:heading {"level":1} -->
     12<h1 class="wp-block-heading"><?php esc_html_e( 'Learning Pathways', 'wporg-learn' ); ?></h1>
     13<!-- /wp:heading -->
     14
     15<!-- wp:paragraph {"style":{"spacing":{"margin":{"top":"var:preset|spacing|10"}}}} -->
     16<p style="margin-top:var(--wp--preset--spacing--10)"><?php esc_html_e( 'Dive into our learning pathways which will take you from beginner to expert at your own pace.', 'wporg-learn' ); ?></p>
    1317<!-- /wp:paragraph -->
    1418
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/patterns/page-online-workshops-content.php

    r13723 r13839  
    1010<!-- wp:group {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|50"}}},"layout":{"type":"constrained","justifyContent":"left","contentSize":"730px"}} -->
    1111<div class="wp-block-group" style="margin-bottom:var(--wp--preset--spacing--50)">
     12
     13    <!-- wp:heading {"level":1} -->
     14    <h1 class="wp-block-heading"><?php esc_html_e( 'Online Workshops', 'wporg-learn' ); ?></h1>
     15    <!-- /wp:heading -->
    1216
    1317    <!-- wp:paragraph -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/patterns/search-content.php

    r13834 r13839  
    77
    88?>
     9
     10<!-- wp:group {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|50"}}},"layout":{"type":"constrained","justifyContent":"left","contentSize":"730px"}} -->
     11<div class="wp-block-group" style="margin-bottom:var(--wp--preset--spacing--50)">
     12
     13    <!-- wp:heading {"level":1} -->
     14    <h1 class="wp-block-heading"><?php esc_html_e( 'Search results', 'wporg-learn' ); ?></h1>
     15    <!-- /wp:heading -->
     16
     17</div>
     18<!-- /wp:group -->
    919
    1020<!-- wp:group {"align":"wide","layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between"},"style":{"spacing":{"margin":{"top":"0","bottom":"var:preset|spacing|50"}}}} -->
     
    5767    <!-- wp:query-no-results -->
    5868
    59         <!-- wp:heading {"level":1,"fontFamily":"eb-garamond"} -->
    60         <h1 class="wp-block-heading has-eb-garamond-font-family"><?php esc_html_e( 'No results found', 'wporg-learn' ); ?></h1>
     69        <!-- wp:heading {"level":2} -->
     70        <h2 class="wp-block-heading"><?php esc_html_e( 'No results found', 'wporg-learn' ); ?></h2>
    6171        <!-- /wp:heading -->
    6272
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/src/learning-pathway-header/index.php

    r13833 r13839  
    5050    }
    5151
    52     $learning_pathway_id = $learning_pathway_object->term_id;
    53     $learning_pathway_name = $learning_pathway_object->name;
    54     $learning_pathway_description = $learning_pathway_object->description;
    55 
    5652    $content = '<!-- wp:group {"className":"wp-block-wporg-learn-learning-pathway-header-content","align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|edge-space","left":"var:preset|spacing|edge-space","top":"0","bottom":"0"}},"border":{"bottom":{"color":"var:preset|color|light-grey-1","width":"1px"}}},"backgroundColor":"' . esc_attr( $learning_pathway_slug ) . '","layout":{"type":"constrained"}} -->
    5753    <div class="wp-block-wporg-learn-learning-pathway-header-content wp-block-group alignfull has-' . esc_attr( $learning_pathway_slug ) . '-background-color has-background" style="border-bottom-color:var(--wp--preset--color--light-grey-1);border-bottom-width:1px;padding-top:0;padding-right:var(--wp--preset--spacing--edge-space);padding-bottom:0;padding-left:var(--wp--preset--spacing--edge-space)">
     
    6359            <div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)">
    6460
    65                 <!-- wp:heading {"level":1,"fontSize":"heading-1","fontFamily":"eb-garamond"} -->
    66                 <h1 class="wp-block-heading has-eb-garamond-font-family has-heading-1-font-size">' . esc_html( $learning_pathway_name ) . '</h1>
    67                 <!-- /wp:heading -->
     61                <!-- wp:query-title {"type":"archive","showPrefix":false} /-->
    6862
    6963                <!-- wp:paragraph {"style":{"typography":{"lineHeight":1.6}}} -->
    70                 <p style="line-height:1.6">' . esc_html( $learning_pathway_description ) . '</p>
     64                <p style="line-height:1.6">' . esc_html( $learning_pathway_object->description ) . '</p>
    7165                <!-- /wp:paragraph -->
    7266
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/style.css

    r13834 r13839  
    55 * Author URI: http://wordpress.org/
    66 * Description: A theme for learn.wordpress.org, built in 2024.
    7  * Version: 1.0.0-09d8faa
     7 * Version: 1.0.0-3f5c557
    88 * License: GNU General Public License v2 or later
    99 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/templates/page-learning-pathways.html

    r13777 r13839  
    66    <!-- wp:group {"align":"full","style":{"spacing":{"padding":{"left":"var:preset|spacing|edge-space","right":"var:preset|spacing|edge-space","top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}}},"layout":{"type":"constrained"}} -->
    77    <div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--edge-space);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--edge-space)">
    8 
    9         <!-- wp:post-title {"level":1,"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|10"}}}} /-->
    108
    119        <!-- wp:pattern {"slug":"wporg-learn-2024/page-learning-pathways-content"} /-->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/templates/page-online-workshops.html

    r13803 r13839  
    66    <!-- wp:group {"align":"full","style":{"spacing":{"padding":{"left":"var:preset|spacing|edge-space","right":"var:preset|spacing|edge-space","top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"}}},"layout":{"type":"constrained","contentSize":"1160px"}} -->
    77    <div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--edge-space);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--edge-space)">
    8 
    9         <!-- wp:post-title {"level":1} /-->
    108
    119        <!-- wp:pattern {"slug":"wporg-learn-2024/page-online-workshops-content"} /-->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/theme.json

    r13833 r13839  
    3232                "green-70": "#005C12"
    3333            },
     34            "form": {
     35                "border": {
     36                    "color": "var(--wp--preset--color--charcoal-5)",
     37                    "width": "1px",
     38                    "radius": "2px"
     39                }
     40            },
    3441            "heading": {
    3542                "typography": {
     
    3946                "level-1": {
    4047                    "typography": {
    41                         "lineHeight": 1.2
     48                        "fontFamily": "var(--wp--preset--font-family--eb-garamond)",
     49                        "fontSize": "36px",
     50                        "lineHeight": 1.3,
     51                        "fontWeight": 400
    4252                    },
    4353                    "breakpoint": {
     
    168178            "core/post-title": {
    169179                "typography": {
    170                     "fontFamily": "var(--wp--preset--font-family--eb-garamond)",
    171                     "fontSize": "36px",
    172                     "lineHeight": "1.3"
     180                    "fontFamily": "var(--wp--custom--heading--level-1--typography--font-family)",
     181                    "fontSize": "var(--wp--custom--heading--level-1--typography--font-size)",
     182                    "lineHeight": "var(--wp--custom--heading--level-1--typography--line-height)",
     183                    "fontWeight": "var(--wp--custom--heading--level-1--typography--font-weight)"
    173184                }
    174185            },
    175186            "core/query-title": {
    176187                "typography": {
    177                     "fontFamily": "var(--wp--preset--font-family--eb-garamond)",
    178                     "fontSize": "36px",
    179                     "lineHeight": "1.3",
    180                     "fontWeight": "400"
     188                    "fontFamily": "var(--wp--custom--heading--level-1--typography--font-family)",
     189                    "fontSize": "var(--wp--custom--heading--level-1--typography--font-size)",
     190                    "lineHeight": "var(--wp--custom--heading--level-1--typography--line-height)",
     191                    "fontWeight": "var(--wp--custom--heading--level-1--typography--font-weight)"
    181192                }
    182193            }
    183194        },
    184195        "elements": {
     196            "h1": {
     197                "typography": {
     198                    "fontFamily": "var(--wp--custom--heading--level-1--typography--font-family)",
     199                    "fontSize": "var(--wp--custom--heading--level-1--typography--font-size)",
     200                    "lineHeight": "var(--wp--custom--heading--level-1--typography--line-height)",
     201                    "fontWeight": "var(--wp--custom--heading--level-1--typography--font-weight)"
     202                }
     203            },
    185204            "h2": {
    186205                "typography": {
Note: See TracChangeset for help on using the changeset viewer.