Making WordPress.org

Ticket #4029: 4029.diff

File 4029.diff, 2.7 KB (added by faisal03, 5 years ago)
  • functions.php

     
    219219 */
    220220function frontenberg_enable_oembed( $all_caps ) {
    221221        if (
    222                 0 === strpos( $_SERVER['REQUEST_URI'], '/gutenberg/wp-json/oembed/1.0/proxy' )  ||
     222                0 === strpos( $_SERVER['REQUEST_URI'], '/gutenberg/wp-json/oembed/1.0/proxy' ) ||
    223223                0 === strpos( $_SERVER['REQUEST_URI'], '/gutenberg/wp-json/gutenberg/v1/block-renderer/core/archives' ) ||
    224224                0 === strpos( $_SERVER['REQUEST_URI'], '/gutenberg/wp-json/gutenberg/v1/block-renderer/core/latest-comments' )
    225225        ) {
     
    250250                }
    251251        }
    252252
    253         $query = array_intersect_key( $query, array_flip( $keys ) );
     253        $query              = array_intersect_key( $query, array_flip( $keys ) );
    254254        $query['post_type'] = 'attachment';
    255255        if ( MEDIA_TRASH
    256256                && ! empty( $_REQUEST['query']['post_status'] )
     
    300300 *     @type string $tagline Optional. Site description when on home page.
    301301 *     @type string $site    Optional. Site title when not on home page.
    302302 * }
     303 *
     304 * @return string
    303305 */
    304306function gutenberg_title_parts( $title ) {
    305307        unset( $title['tagline'] );
     
    365367                add_theme_support( 'editor-color-palette', [
    366368                        [
    367369                                'name'  => esc_html__( 'Dark Blue', 'gutenbergtheme' ),
    368                                 'slug' => 'dark-blue',
     370                                'slug'  => 'dark-blue',
    369371                                'color' => '#0073aa',
    370372                        ],
    371373                        [
    372374
    373375                                'name'  => esc_html__( 'Light Blue', 'gutenbergtheme' ),
    374                                 'slug' => 'light-blue',
     376                                'slug'  => 'light-blue',
    375377                                'color' => '#229fd8',
    376378                        ],
    377379                        [
    378380
    379381                                'name'  => esc_html__( 'Dark Gray', 'gutenbergtheme' ),
    380                                 'slug' => 'dark-gray',
     382                                'slug'  => 'dark-gray',
    381383                                'color' => '#444',
    382384                        ],
    383385                        [
    384386
    385387                                'name'  => esc_html__( 'Light Gray', 'gutenbergtheme' ),
    386                                 'slug' => 'light-gray',
     388                                'slug'  => 'light-gray',
    387389                                'color' => '#eee',
    388390                        ],
    389391                ] );
     
    405407
    406408/**
    407409 * Register Google Fonts
     410 *
     411 * @return string
    408412 */
    409413function gutenbergtheme_fonts_url() {
    410414    $fonts_url = '';
     
    416420        $notoserif = esc_html_x( 'on', 'Noto Serif font: on or off', 'gutenbergtheme' );
    417421
    418422        if ( 'off' !== $notoserif ) {
    419                 $font_families = array();
     423                $font_families   = array();
    420424                $font_families[] = 'Noto Serif:400,400italic,700,700italic';
    421425
    422426                $query_args = array(
     
    437441function gutenbergtheme_scripts() {
    438442        wp_enqueue_style( 'gutenbergtheme-style', get_stylesheet_uri(), [], 10 );
    439443
    440         wp_enqueue_style( 'gutenbergthemeblocks-style', get_template_directory_uri() . '/blocks.css');
     444        wp_enqueue_style( 'gutenbergthemeblocks-style', get_template_directory_uri() . '/blocks.css' );
    441445
    442446        wp_enqueue_style( 'gutenbergtheme-fonts', gutenbergtheme_fonts_url(), array(), null );
    443447