Making WordPress.org

Changeset 13963


Ignore:
Timestamp:
08/12/2024 03:47:32 AM (7 months ago)
Author:
adamwood
Message:

Learn: Sync with git WordPress/learn@b10e40b

Location:
sites/trunk/wordpress.org/public_html/wp-content
Files:
40 deleted
5 edited

Legend:

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

    r13873 r13963  
    2525 */
    2626add_action( 'init', __NAMESPACE__ . '\register_types' );
    27 add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\enqueue_block_style_assets' );
    28 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_block_style_assets' );
    2927
    3028/**
     
    419417
    420418/**
    421  * Enqueue scripts and stylesheets for custom block styles.
    422  *
    423  * @throws Error If the build files are not found.
    424  */
    425 function enqueue_block_style_assets() {
    426     if ( is_admin() ) {
    427         $script_asset_path = get_build_path() . 'block-styles.asset.php';
    428         if ( ! file_exists( $script_asset_path ) ) {
    429             throw new Error(
    430                 'You need to run `npm start` or `npm run build` for block styles first.'
    431             );
    432         }
    433 
    434         $script_asset = require $script_asset_path;
    435         wp_enqueue_script(
    436             'wporg-learn-block-styles',
    437             get_build_url() . 'block-styles.js',
    438             $script_asset['dependencies'],
    439             $script_asset['version']
    440         );
    441     }
    442 
    443     wp_enqueue_style(
    444         'wporg-learn-block-styles',
    445         get_build_url() . 'style-block-styles.css',
    446         array(),
    447         filemtime( get_build_path() . 'style-block-styles.css' )
    448     );
    449 }
    450 
    451 /**
    452419 * Register the learning duration block.
    453420 */
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/locale.php

    r13901 r13963  
    184184    $current_theme = wp_get_theme();
    185185    $theme_slug = $current_theme->get_stylesheet();
    186 
    187     if ( 'pub/wporg-learn-2020' === $theme_slug ) {
    188         return $clauses;
    189     }
    190186
    191187    if ( $query->is_post_type_archive( 'course' ) || $query->is_post_type_archive( 'lesson' ) || $query->is_post_type_archive( 'lesson-plan' ) ) {
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/webpack.config.js

    r13902 r13963  
    55 */
    66config.entry = {
    7     'block-styles': './js/block-styles/index.js',
    87    'course-status': './js/course-status/src/index.js',
    98    'duration-meta': './js/duration-meta/index.js',
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/wporg-learn.php

    r13839 r13963  
    22/**
    33 * Plugin name: WordPress.org Learn
    4  * Description: Functionality for learn.wordpress.org. See also the wporg-learn-2020 theme.
     4 * Description: Functionality for learn.wordpress.org. See also the wporg-learn-2024 theme.
    55 * Version:     1.0.0
    66 * Author:      WordPress.org
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/style.css

    r13957 r13963  
    55 * Author URI: http://wordpress.org/
    66 * Description: A theme for learn.wordpress.org, built in 2024.
    7  * Version: 1.0.0-bbe9ed4
     7 * Version: 1.0.0-c7f3917
    88 * License: GNU General Public License v2 or later
    99 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.