Making WordPress.org

Changeset 11413


Ignore:
Timestamp:
01/06/2022 05:56:14 AM (5 years ago)
Author:
tellyworth
Message:

WordPress.org Learn: sync with GitHub

​https://github.com/WordPress/learn/compare/0e236c1901eb301d0f392b94b3345cb6bae7aa84..3007947d3c47ff5c5a1793a27c7168db466198a6

Props ryelle, iandunn, hlashbrooke.

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

Legend:

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

    r11352 r11413  
    7777        $captions  = get_post_meta( $post->ID, 'video_caption_language' );
    7878
     79        $version_ids    = wp_get_post_terms( $post->ID, 'wporg_wp_version', array( 'fields' => 'ids' ) );
     80        $version_names  = wp_get_post_terms( $post->ID, 'wporg_wp_version', array( 'fields' => 'names' ) );
     81
    7982        $topic_names = array();
    8083        foreach ( $topic_ids as $id ) {
    … …  
    9295                        'param' => $topic_ids,
    9396                        'value' => $topic_names,
     97                ),
     98                'wp_version' => array(
     99                        'label' => __( 'Related Version', 'wporg-learn' ),
     100                        'param' => $version_ids,
     101                        'value' => $version_names,
    94102                ),
    95103                'level' => array(
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/taxonomy.php

    r11300 r11413  
    516516        );
    517517
    518         $post_types = array( 'lesson-plan', 'wporg_workshop', 'course', 'lesson' );
     518        $post_types = array( 'lesson-plan', 'wporg_workshop', 'course', 'lesson', 'meeting' );
    519519
    520520        register_taxonomy( 'wporg_wp_version', $post_types, $args );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/header.php

    r11400 r11413  
    1515
    1616if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
     17        // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    1718        echo do_blocks( '<!-- wp:wporg/global-header /-->' );
    1819} else {
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/template-parts/component-lesson-filters.php

    r11278 r11413  
    2424                'name'    => 'type',
    2525                'current' => filter_input( INPUT_GET, 'type', FILTER_VALIDATE_INT, FILTER_REQUIRE_ARRAY ) ?? array(),
     26        ),
     27        array(
     28                'label'   => get_taxonomy_labels( get_taxonomy( 'wporg_wp_version' ) )->singular_name,
     29                'terms'   => get_terms( array( 'taxonomy' => 'wporg_wp_version' ) ),
     30                'name'    => 'wp_version',
     31                'current' => filter_input( INPUT_GET, 'wp_version', FILTER_VALIDATE_INT, FILTER_REQUIRE_ARRAY ) ?? array(),
    2632        ),
    2733);
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/template-parts/component-workshop-filters.php

    r11294 r11413  
    3030                'name'  => 'captions',
    3131                'items' => \WPOrg_Learn\Post_Meta\get_available_workshop_locales( 'video_caption_language', 'native' ),
     32        ),
     33        array(
     34                'label' => __( 'WordPress Version', 'wporg-learn' ),
     35                'name'  => 'wp_version',
     36                'items' => get_terms( array(
     37                        'taxonomy' => 'wporg_wp_version',
     38                        'fields'   => 'id=>name',
     39                ) ),
    3240        ),
    3341);
Note: See TracChangeset for help on using the changeset viewer.