Ticket #4029: 4029.diff
File 4029.diff, 2.7 KB (added by , 6 years ago) |
---|
-
functions.php
219 219 */ 220 220 function frontenberg_enable_oembed( $all_caps ) { 221 221 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' ) || 223 223 0 === strpos( $_SERVER['REQUEST_URI'], '/gutenberg/wp-json/gutenberg/v1/block-renderer/core/archives' ) || 224 224 0 === strpos( $_SERVER['REQUEST_URI'], '/gutenberg/wp-json/gutenberg/v1/block-renderer/core/latest-comments' ) 225 225 ) { … … 250 250 } 251 251 } 252 252 253 $query = array_intersect_key( $query, array_flip( $keys ) );253 $query = array_intersect_key( $query, array_flip( $keys ) ); 254 254 $query['post_type'] = 'attachment'; 255 255 if ( MEDIA_TRASH 256 256 && ! empty( $_REQUEST['query']['post_status'] ) … … 300 300 * @type string $tagline Optional. Site description when on home page. 301 301 * @type string $site Optional. Site title when not on home page. 302 302 * } 303 * 304 * @return string 303 305 */ 304 306 function gutenberg_title_parts( $title ) { 305 307 unset( $title['tagline'] ); … … 365 367 add_theme_support( 'editor-color-palette', [ 366 368 [ 367 369 'name' => esc_html__( 'Dark Blue', 'gutenbergtheme' ), 368 'slug' => 'dark-blue',370 'slug' => 'dark-blue', 369 371 'color' => '#0073aa', 370 372 ], 371 373 [ 372 374 373 375 'name' => esc_html__( 'Light Blue', 'gutenbergtheme' ), 374 'slug' => 'light-blue',376 'slug' => 'light-blue', 375 377 'color' => '#229fd8', 376 378 ], 377 379 [ 378 380 379 381 'name' => esc_html__( 'Dark Gray', 'gutenbergtheme' ), 380 'slug' => 'dark-gray',382 'slug' => 'dark-gray', 381 383 'color' => '#444', 382 384 ], 383 385 [ 384 386 385 387 'name' => esc_html__( 'Light Gray', 'gutenbergtheme' ), 386 'slug' => 'light-gray',388 'slug' => 'light-gray', 387 389 'color' => '#eee', 388 390 ], 389 391 ] ); … … 405 407 406 408 /** 407 409 * Register Google Fonts 410 * 411 * @return string 408 412 */ 409 413 function gutenbergtheme_fonts_url() { 410 414 $fonts_url = ''; … … 416 420 $notoserif = esc_html_x( 'on', 'Noto Serif font: on or off', 'gutenbergtheme' ); 417 421 418 422 if ( 'off' !== $notoserif ) { 419 $font_families = array();423 $font_families = array(); 420 424 $font_families[] = 'Noto Serif:400,400italic,700,700italic'; 421 425 422 426 $query_args = array( … … 437 441 function gutenbergtheme_scripts() { 438 442 wp_enqueue_style( 'gutenbergtheme-style', get_stylesheet_uri(), [], 10 ); 439 443 440 wp_enqueue_style( 'gutenbergthemeblocks-style', get_template_directory_uri() . '/blocks.css' );444 wp_enqueue_style( 'gutenbergthemeblocks-style', get_template_directory_uri() . '/blocks.css' ); 441 445 442 446 wp_enqueue_style( 'gutenbergtheme-fonts', gutenbergtheme_fonts_url(), array(), null ); 443 447