@@ -35,7 +35,7 @@ get_header(); ?>

%s

', $message ); + printf( + '

%s

', + sprintf( + /* translators: %s: WordPress version. */ + __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), + $GLOBALS['wp_version'] + ) + ); } /** @@ -45,7 +51,11 @@ function twentyfifteen_upgrade_notice() { */ function twentyfifteen_customize() { wp_die( - sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] ), + sprintf( + /* translators: %s: WordPress version. */ + __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), + $GLOBALS['wp_version'] + ), '', array( 'back_link' => true, @@ -61,7 +71,13 @@ add_action( 'load-customize.php', 'twentyfifteen_customize' ); */ function twentyfifteen_preview() { if ( isset( $_GET['preview'] ) ) { - wp_die( sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] ) ); + wp_die( + sprintf( + /* translators: %s: WordPress version. */ + __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), + $GLOBALS['wp_version'] + ) + ); } } add_action( 'template_redirect', 'twentyfifteen_preview' ); diff --git a/themes/twentyfifteen/inc/block-patterns.php b/themes/twentyfifteen/inc/block-patterns.php new file mode 100644 index 00000000..0e220d3e --- /dev/null +++ b/themes/twentyfifteen/inc/block-patterns.php @@ -0,0 +1,68 @@ + esc_html__( 'Twenty Fifteen', 'twentyfifteen' ) ) + ); +} + +/** + * Register Block Patterns. + */ +if ( function_exists( 'register_block_pattern' ) ) { + + // Gallery and Description. + register_block_pattern( + 'twentyfifteen/gallery-description', + array( + 'title' => esc_html__( 'Gallery and Description', 'twentyfifteen' ), + 'categories' => array( 'twentyfifteen' ), + 'content' => '

' . esc_html__( 'Our default 2015 theme is clean, blog-focused, and designed for clarity. Twenty Fifteen’s simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages.', 'twentyfifteen' ) . '


', + ) + ); + + // Contact Area. + register_block_pattern( + 'twentyfifteen/contact-area', + array( + 'title' => esc_html__( 'Contact area', 'twentyfifteen' ), + 'categories' => array( 'twentyfifteen' ), + 'content' => '

' . esc_html__( 'Email', 'twentyfifteen' ) . '
' . esc_html__( 'example@example.com', 'twentyfifteen' ) . '

' . esc_html__( 'Follow us', 'twentyfifteen' ) . '

' . esc_html__( 'Phone', 'twentyfifteen' ) . '
' . esc_html__( '(123) 555-5555', 'twentyfifteen' ) . '

' . esc_html__( 'Address', 'twentyfifteen' ) . '
' . esc_html__( '123 Main Street', 'twentyfifteen' ) . '
' . esc_html__( 'City, State, 00000', 'twentyfifteen' ) . '

', + ) + ); + + // Two Columns with Images. + register_block_pattern( + 'twentyfifteen/two-columns-with-images', + array( + 'title' => esc_html__( 'Two Columns with Images', 'twentyfifteen' ), + 'categories' => array( 'twentyfifteen' ), + 'content' => '
' . esc_attr__( 'A pier with a seagull.', 'twentyfifteen' ) . '

' . esc_html__( 'Adventure', 'twentyfifteen' ) . '

' . esc_html__( 'I faced about again, and rushed towards the approaching Martian, rushed right down the gravelly beach and headlong into the water. Others did the same.', 'twentyfifteen' ) . '

' . esc_attr__( 'A pier with seagulls.', 'twentyfifteen' ) . '

' . esc_html__( 'Travels', 'twentyfifteen' ) . '

' . esc_html__( 'A boatload of people putting back came leaping out as I rushed past. The stones under my feet were muddy and slippery, and the river was so low.', 'twentyfifteen' ) . '

', + ) + ); + + // Columns with a list. + register_block_pattern( + 'twentyfifteen/columns-with-list', + array( + 'title' => esc_html__( 'Columns with a List', 'twentyfifteen' ), + 'categories' => array( 'twentyfifteen' ), + 'content' => '

' . esc_html__( 'What to pack for the beach', 'twentyfifteen' ) . '

' . esc_html__( 'You don’t need a lot, trust us!', 'twentyfifteen' ) . '

' . esc_html__( 'As I watched, the planet seemed to grow larger and smaller and to advance and recede, but that was simply that my eye was tired. Forty millions of miles it was from us — more than forty millions of miles of void. Few people realize the immensity of vacancy in which the dust of the material universe swims.', 'twentyfifteen' ) . '

  • ' . esc_html__( 'Towels', 'twentyfifteen' ) . '
  • ' . esc_html__( 'Camera', 'twentyfifteen' ) . '
  • ' . esc_html__( 'Water Bottle', 'twentyfifteen' ) . '
  • ' . esc_html__( 'Swimsuit', 'twentyfifteen' ) . '
  • ' . esc_html__( 'Snacks', 'twentyfifteen' ) . '
', + ) + ); +} diff --git a/themes/twentyfifteen/inc/custom-header.php b/themes/twentyfifteen/inc/custom-header.php index 763ef00d..bf8655a7 100644 --- a/themes/twentyfifteen/inc/custom-header.php +++ b/themes/twentyfifteen/inc/custom-header.php @@ -16,23 +16,23 @@ function twentyfifteen_custom_header_setup() { $color_scheme = twentyfifteen_get_color_scheme(); $default_text_color = trim( $color_scheme[4], '#' ); - /** - * Filter Twenty Fifteen custom-header support arguments. - * - * @since Twenty Fifteen 1.0 - * - * @param array $args { - * An array of custom-header support arguments. - * - * @type string $default_text_color Default color of the header text. - * @type int $width Width in pixels of the custom header image. Default 954. - * @type int $height Height in pixels of the custom header image. Default 1300. - * @type string $wp-head-callback Callback function used to styles the header image and text - * displayed on the blog. - * } - */ add_theme_support( 'custom-header', + /** + * Filters Twenty Fifteen custom-header support arguments. + * + * @since Twenty Fifteen 1.0 + * + * @param array $args { + * An array of custom-header support arguments. + * + * @type string $default_text_color Default color of the header text. + * @type int $width Width in pixels of the custom header image. Default 954. + * @type int $height Height in pixels of the custom header image. Default 1300. + * @type string $wp-head-callback Callback function used to styles the header image and text + * displayed on the blog. + * } + */ apply_filters( 'twentyfifteen_custom_header_args', array( @@ -193,7 +193,7 @@ if ( ! function_exists( 'twentyfifteen_header_style' ) ) : ', $prev_link ); - endif; + } - if ( $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ) ) : + $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ); + if ( $next_link ) { printf( '', $next_link ); - endif; + } ?>