Make WordPress Core


Ignore:
Timestamp:
03/21/2019 12:46:11 PM (6 years ago)
Author:
iseulde
Message:

Block Editor: Update the WordPress Packages from Gutenberg 5.3

  • @wordpress/a11y@2.2.0
  • @wordpress/annotations@1.2.0
  • @wordpress/api-fetch@3.1.0
  • @wordpress/autop@2.2.0
  • @wordpress/babel-plugin-import-jsx-pragma@2.1.0
  • @wordpress/babel-preset-default@4.1.0
  • @wordpress/blob@2.3.0
  • @wordpress/block-editor@1.1.0
  • @wordpress/block-library@2.4.0
  • @wordpress/block-serialization-default-parser@3.1.0
  • @wordpress/blocks@6.2.0
  • @wordpress/components@7.2.0
  • @wordpress/compose@3.2.0
  • @wordpress/core-data@2.2.0
  • @wordpress/data@4.4.0
  • @wordpress/date@3.2.0
  • @wordpress/deprecated@2.2.0
  • @wordpress/docgen@1.1.0
  • @wordpress/dom-ready@2.2.0
  • @wordpress/dom@2.2.0
  • @wordpress/e2e-test-utils@1.1.0
  • @wordpress/e2e-tests@1.1.0
  • @wordpress/edit-post@3.3.0
  • @wordpress/edit-widgets@0.2.0
  • @wordpress/editor@9.2.0
  • @wordpress/element@2.3.0
  • @wordpress/escape-html@1.2.0
  • @wordpress/eslint-plugin@2.1.0
  • @wordpress/format-library@1.4.0
  • @wordpress/hooks@2.2.0
  • @wordpress/html-entities@2.2.0
  • @wordpress/i18n@3.3.0
  • @wordpress/keycodes@2.2.0
  • @wordpress/list-reusable-blocks@1.3.0
  • @wordpress/notices@1.3.0
  • @wordpress/nux@3.2.0
  • @wordpress/plugins@2.2.0
  • @wordpress/priority-queue@1.1.0
  • @wordpress/redux-routine@3.2.0
  • @wordpress/rich-text@3.2.0
  • @wordpress/scripts@3.1.0
  • @wordpress/shortcode@2.2.0
  • @wordpress/url@2.5.0
  • @wordpress/viewport@2.3.0
  • @wordpress/wordcount@2.2.0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/calendar.php

    r44810 r44960  
    1414 */
    1515function render_block_core_calendar( $attributes ) {
    16     global $monthnum, $year, $post;
     16    global $monthnum, $year;
     17
    1718    $previous_monthnum = $monthnum;
    1819    $previous_year     = $year;
    1920
    20     if ( isset( $attributes['month'] ) ) {
    21         // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
    22         $monthnum = $attributes['month'];
    23     }
    24 
    25     if ( isset( $attributes['year'] ) ) {
    26         // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
    27         $year = $attributes['year'];
     21    if ( isset( $attributes['month'] ) && isset( $attributes['year'] ) ) {
     22        $permalink_structure = get_option( 'permalink_structure' );
     23        if (
     24            strpos( $permalink_structure, '%monthnum%' ) !== false &&
     25            strpos( $permalink_structure, '%year%' ) !== false
     26        ) {
     27            // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
     28            $monthnum = $attributes['month'];
     29            // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
     30            $year = $attributes['year'];
     31        }
    2832    }
    2933
Note: See TracChangeset for help on using the changeset viewer.