~canonical-sysadmins/wordpress/4.2.4

« back to all changes in this revision

Viewing changes to wp-content/themes/twentythirteen/functions.php

  • Committer: Paul Gear
  • Date: 2015-04-24 01:35:20 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: paul.gear@canonical.com-20150424013520-w4p9ksth76zh6opw
Merge new upstream release 4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * theme as custom template tags. Others are attached to action and filter
7
7
 * hooks in WordPress to change core functionality.
8
8
 *
9
 
 * When using a child theme (see http://codex.wordpress.org/Theme_Development
10
 
 * and http://codex.wordpress.org/Child_Themes), you can override certain
 
9
 * When using a child theme (see https://codex.wordpress.org/Theme_Development
 
10
 * and https://codex.wordpress.org/Child_Themes), you can override certain
11
11
 * functions (those wrapped in a function_exists() call) by defining them first
12
12
 * in your child theme's functions.php file. The child theme's functions.php
13
13
 * file is included before the parent theme's file, so the child theme
16
16
 * Functions that are not pluggable (not wrapped in function_exists()) are
17
17
 * instead attached to a filter or action hook.
18
18
 *
19
 
 * For more information on hooks, actions, and filters, @link http://codex.wordpress.org/Plugin_API
 
19
 * For more information on hooks, actions, and filters, @link https://codex.wordpress.org/Plugin_API
20
20
 *
21
21
 * @package WordPress
22
22
 * @subpackage Twenty_Thirteen
87
87
 
88
88
        /*
89
89
         * This theme supports all available post formats by default.
90
 
         * See http://codex.wordpress.org/Post_Formats
 
90
         * See https://codex.wordpress.org/Post_Formats
91
91
         */
92
92
        add_theme_support( 'post-formats', array(
93
93
                'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video'
146
146
                        'family' => urlencode( implode( '|', $font_families ) ),
147
147
                        'subset' => urlencode( 'latin,latin-ext' ),
148
148
                );
149
 
                $fonts_url = add_query_arg( $query_args, "//fonts.googleapis.com/css" );
 
149
                $fonts_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' );
150
150
        }
151
151
 
152
152
        return $fonts_url;
170
170
                wp_enqueue_script( 'jquery-masonry' );
171
171
 
172
172
        // Loads JavaScript file with functionality specific to Twenty Thirteen.
173
 
        wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '2014-06-08', true );
 
173
        wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true );
174
174
 
175
175
        // Add Source Sans Pro and Bitter fonts, used in the main stylesheet.
176
176
        wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null );
319
319
 */
320
320
function twentythirteen_entry_meta() {
321
321
        if ( is_sticky() && is_home() && ! is_paged() )
322
 
                echo '<span class="featured-post">' . __( 'Sticky', 'twentythirteen' ) . '</span>';
 
322
                echo '<span class="featured-post">' . esc_html__( 'Sticky', 'twentythirteen' ) . '</span>';
323
323
 
324
324
        if ( ! has_post_format( 'link' ) && 'post' == get_post_type() )
325
325
                twentythirteen_entry_date();
413
413
                'post_type'      => 'attachment',
414
414
                'post_mime_type' => 'image',
415
415
                'order'          => 'ASC',
416
 
                'orderby'        => 'menu_order ID'
 
416
                'orderby'        => 'menu_order ID',
417
417
        ) );
418
418
 
419
419
        // If there is more than 1 attachment in a gallery...
431
431
 
432
432
                // or get the URL of the first image attachment.
433
433
                else
434
 
                        $next_attachment_url = get_attachment_link( array_shift( $attachment_ids ) );
 
434
                        $next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
435
435
        }
436
436
 
437
437
        printf( '<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>',