stump-cli 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. data/lib/stump-cli/version.rb +1 -1
  2. data/lib/wp/{wp-content/themes/stump/.gitignore → .gitignore} +1 -0
  3. metadata +2 -64
  4. data/lib/wp/wp-content/themes/twentyfourteen/404.php +0 -32
  5. data/lib/wp/wp-content/themes/twentyfourteen/archive.php +0 -74
  6. data/lib/wp/wp-content/themes/twentyfourteen/author.php +0 -74
  7. data/lib/wp/wp-content/themes/twentyfourteen/category.php +0 -58
  8. data/lib/wp/wp-content/themes/twentyfourteen/comments.php +0 -66
  9. data/lib/wp/wp-content/themes/twentyfourteen/content-aside.php +0 -57
  10. data/lib/wp/wp-content/themes/twentyfourteen/content-audio.php +0 -57
  11. data/lib/wp/wp-content/themes/twentyfourteen/content-featured-post.php +0 -34
  12. data/lib/wp/wp-content/themes/twentyfourteen/content-gallery.php +0 -57
  13. data/lib/wp/wp-content/themes/twentyfourteen/content-image.php +0 -57
  14. data/lib/wp/wp-content/themes/twentyfourteen/content-link.php +0 -57
  15. data/lib/wp/wp-content/themes/twentyfourteen/content-none.php +0 -31
  16. data/lib/wp/wp-content/themes/twentyfourteen/content-page.php +0 -31
  17. data/lib/wp/wp-content/themes/twentyfourteen/content-quote.php +0 -57
  18. data/lib/wp/wp-content/themes/twentyfourteen/content-video.php +0 -57
  19. data/lib/wp/wp-content/themes/twentyfourteen/content.php +0 -66
  20. data/lib/wp/wp-content/themes/twentyfourteen/css/editor-style.css +0 -717
  21. data/lib/wp/wp-content/themes/twentyfourteen/css/ie.css +0 -1335
  22. data/lib/wp/wp-content/themes/twentyfourteen/featured-content.php +0 -39
  23. data/lib/wp/wp-content/themes/twentyfourteen/footer.php +0 -28
  24. data/lib/wp/wp-content/themes/twentyfourteen/functions.php +0 -519
  25. data/lib/wp/wp-content/themes/twentyfourteen/genericons/COPYING.txt +0 -9
  26. data/lib/wp/wp-content/themes/twentyfourteen/genericons/Genericons-Regular.otf +0 -0
  27. data/lib/wp/wp-content/themes/twentyfourteen/genericons/LICENSE.txt +0 -339
  28. data/lib/wp/wp-content/themes/twentyfourteen/genericons/README.txt +0 -123
  29. data/lib/wp/wp-content/themes/twentyfourteen/genericons/example.html +0 -464
  30. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.eot +0 -0
  31. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.svg +0 -135
  32. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.ttf +0 -0
  33. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.woff +0 -0
  34. data/lib/wp/wp-content/themes/twentyfourteen/genericons/genericons.css +0 -197
  35. data/lib/wp/wp-content/themes/twentyfourteen/header.php +0 -65
  36. data/lib/wp/wp-content/themes/twentyfourteen/image.php +0 -79
  37. data/lib/wp/wp-content/themes/twentyfourteen/images/pattern-dark.svg +0 -16
  38. data/lib/wp/wp-content/themes/twentyfourteen/images/pattern-light.svg +0 -6
  39. data/lib/wp/wp-content/themes/twentyfourteen/inc/back-compat.php +0 -63
  40. data/lib/wp/wp-content/themes/twentyfourteen/inc/custom-header.php +0 -147
  41. data/lib/wp/wp-content/themes/twentyfourteen/inc/customizer.php +0 -114
  42. data/lib/wp/wp-content/themes/twentyfourteen/inc/featured-content.php +0 -531
  43. data/lib/wp/wp-content/themes/twentyfourteen/inc/template-tags.php +0 -203
  44. data/lib/wp/wp-content/themes/twentyfourteen/inc/widgets.php +0 -269
  45. data/lib/wp/wp-content/themes/twentyfourteen/index.php +0 -61
  46. data/lib/wp/wp-content/themes/twentyfourteen/js/customizer.js +0 -38
  47. data/lib/wp/wp-content/themes/twentyfourteen/js/featured-content-admin.js +0 -9
  48. data/lib/wp/wp-content/themes/twentyfourteen/js/functions.js +0 -134
  49. data/lib/wp/wp-content/themes/twentyfourteen/js/html5.js +0 -8
  50. data/lib/wp/wp-content/themes/twentyfourteen/js/keyboard-image-navigation.js +0 -21
  51. data/lib/wp/wp-content/themes/twentyfourteen/js/slider.js +0 -598
  52. data/lib/wp/wp-content/themes/twentyfourteen/languages/twentyfourteen.pot +0 -467
  53. data/lib/wp/wp-content/themes/twentyfourteen/page-templates/contributors.php +0 -52
  54. data/lib/wp/wp-content/themes/twentyfourteen/page-templates/full-width.php +0 -42
  55. data/lib/wp/wp-content/themes/twentyfourteen/page.php +0 -48
  56. data/lib/wp/wp-content/themes/twentyfourteen/rtl.css +0 -854
  57. data/lib/wp/wp-content/themes/twentyfourteen/screenshot.png +0 -0
  58. data/lib/wp/wp-content/themes/twentyfourteen/search.php +0 -49
  59. data/lib/wp/wp-content/themes/twentyfourteen/sidebar-content.php +0 -16
  60. data/lib/wp/wp-content/themes/twentyfourteen/sidebar-footer.php +0 -19
  61. data/lib/wp/wp-content/themes/twentyfourteen/sidebar.php +0 -29
  62. data/lib/wp/wp-content/themes/twentyfourteen/single.php +0 -40
  63. data/lib/wp/wp-content/themes/twentyfourteen/style.css +0 -4321
  64. data/lib/wp/wp-content/themes/twentyfourteen/tag.php +0 -60
  65. data/lib/wp/wp-content/themes/twentyfourteen/taxonomy-post_format.php +0 -85
@@ -1,203 +0,0 @@
1
- <?php
2
- /**
3
- * Custom template tags for Twenty Fourteen
4
- *
5
- * @package WordPress
6
- * @subpackage Twenty_Fourteen
7
- * @since Twenty Fourteen 1.0
8
- */
9
-
10
- if ( ! function_exists( 'twentyfourteen_paging_nav' ) ) :
11
- /**
12
- * Display navigation to next/previous set of posts when applicable.
13
- *
14
- * @since Twenty Fourteen 1.0
15
- *
16
- * @global WP_Query $wp_query WordPress Query object.
17
- * @global WP_Rewrite $wp_rewrite WordPress Rewrite object.
18
- */
19
- function twentyfourteen_paging_nav() {
20
- global $wp_query, $wp_rewrite;
21
-
22
- // Don't print empty markup if there's only one page.
23
- if ( $wp_query->max_num_pages < 2 ) {
24
- return;
25
- }
26
-
27
- $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
28
- $pagenum_link = html_entity_decode( get_pagenum_link() );
29
- $query_args = array();
30
- $url_parts = explode( '?', $pagenum_link );
31
-
32
- if ( isset( $url_parts[1] ) ) {
33
- wp_parse_str( $url_parts[1], $query_args );
34
- }
35
-
36
- $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
37
- $pagenum_link = trailingslashit( $pagenum_link ) . '%_%';
38
-
39
- $format = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
40
- $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';
41
-
42
- // Set up paginated links.
43
- $links = paginate_links( array(
44
- 'base' => $pagenum_link,
45
- 'format' => $format,
46
- 'total' => $wp_query->max_num_pages,
47
- 'current' => $paged,
48
- 'mid_size' => 1,
49
- 'add_args' => array_map( 'urlencode', $query_args ),
50
- 'prev_text' => __( '&larr; Previous', 'twentyfourteen' ),
51
- 'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
52
- ) );
53
-
54
- if ( $links ) :
55
-
56
- ?>
57
- <nav class="navigation paging-navigation" role="navigation">
58
- <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentyfourteen' ); ?></h1>
59
- <div class="pagination loop-pagination">
60
- <?php echo $links; ?>
61
- </div><!-- .pagination -->
62
- </nav><!-- .navigation -->
63
- <?php
64
- endif;
65
- }
66
- endif;
67
-
68
- if ( ! function_exists( 'twentyfourteen_post_nav' ) ) :
69
- /**
70
- * Display navigation to next/previous post when applicable.
71
- *
72
- * @since Twenty Fourteen 1.0
73
- */
74
- function twentyfourteen_post_nav() {
75
- // Don't print empty markup if there's nowhere to navigate.
76
- $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
77
- $next = get_adjacent_post( false, '', false );
78
-
79
- if ( ! $next && ! $previous ) {
80
- return;
81
- }
82
-
83
- ?>
84
- <nav class="navigation post-navigation" role="navigation">
85
- <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
86
- <div class="nav-links">
87
- <?php
88
- if ( is_attachment() ) :
89
- previous_post_link( '%link', __( '<span class="meta-nav">Published In</span>%title', 'twentyfourteen' ) );
90
- else :
91
- previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ) );
92
- next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ) );
93
- endif;
94
- ?>
95
- </div><!-- .nav-links -->
96
- </nav><!-- .navigation -->
97
- <?php
98
- }
99
- endif;
100
-
101
- if ( ! function_exists( 'twentyfourteen_posted_on' ) ) :
102
- /**
103
- * Print HTML with meta information for the current post-date/time and author.
104
- *
105
- * @since Twenty Fourteen 1.0
106
- */
107
- function twentyfourteen_posted_on() {
108
- if ( is_sticky() && is_home() && ! is_paged() ) {
109
- echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>';
110
- }
111
-
112
- // Set up and print post meta information.
113
- printf( '<span class="entry-date"><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>',
114
- esc_url( get_permalink() ),
115
- esc_attr( get_the_date( 'c' ) ),
116
- esc_html( get_the_date() ),
117
- esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
118
- get_the_author()
119
- );
120
- }
121
- endif;
122
-
123
- /**
124
- * Find out if blog has more than one category.
125
- *
126
- * @since Twenty Fourteen 1.0
127
- *
128
- * @return boolean true if blog has more than 1 category
129
- */
130
- function twentyfourteen_categorized_blog() {
131
- if ( false === ( $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' ) ) ) {
132
- // Create an array of all the categories that are attached to posts
133
- $all_the_cool_cats = get_categories( array(
134
- 'hide_empty' => 1,
135
- ) );
136
-
137
- // Count the number of categories that are attached to the posts
138
- $all_the_cool_cats = count( $all_the_cool_cats );
139
-
140
- set_transient( 'twentyfourteen_category_count', $all_the_cool_cats );
141
- }
142
-
143
- if ( 1 !== (int) $all_the_cool_cats ) {
144
- // This blog has more than 1 category so twentyfourteen_categorized_blog should return true
145
- return true;
146
- } else {
147
- // This blog has only 1 category so twentyfourteen_categorized_blog should return false
148
- return false;
149
- }
150
- }
151
-
152
- /**
153
- * Flush out the transients used in twentyfourteen_categorized_blog.
154
- *
155
- * @since Twenty Fourteen 1.0
156
- */
157
- function twentyfourteen_category_transient_flusher() {
158
- // Like, beat it. Dig?
159
- delete_transient( 'twentyfourteen_category_count' );
160
- }
161
- add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' );
162
- add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
163
-
164
- /**
165
- * Display an optional post thumbnail.
166
- *
167
- * Wraps the post thumbnail in an anchor element on index
168
- * views, or a div element when on single views.
169
- *
170
- * @since Twenty Fourteen 1.0
171
- */
172
- function twentyfourteen_post_thumbnail() {
173
- if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
174
- return;
175
- }
176
-
177
- if ( is_singular() ) :
178
- ?>
179
-
180
- <div class="post-thumbnail">
181
- <?php
182
- if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
183
- the_post_thumbnail( 'twentyfourteen-full-width' );
184
- } else {
185
- the_post_thumbnail();
186
- }
187
- ?>
188
- </div>
189
-
190
- <?php else : ?>
191
-
192
- <a class="post-thumbnail" href="<?php the_permalink(); ?>">
193
- <?php
194
- if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
195
- the_post_thumbnail( 'twentyfourteen-full-width' );
196
- } else {
197
- the_post_thumbnail();
198
- }
199
- ?>
200
- </a>
201
-
202
- <?php endif; // End is_singular()
203
- }
@@ -1,269 +0,0 @@
1
- <?php
2
- /**
3
- * Custom Widget for displaying specific post formats
4
- *
5
- * Displays posts from Aside, Quote, Video, Audio, Image, Gallery, and Link formats.
6
- *
7
- * @link http://codex.wordpress.org/Widgets_API#Developing_Widgets
8
- *
9
- * @package WordPress
10
- * @subpackage Twenty_Fourteen
11
- * @since Twenty Fourteen 1.0
12
- */
13
-
14
- class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
15
-
16
- /**
17
- * The supported post formats.
18
- *
19
- * @access private
20
- * @since Twenty Fourteen 1.0
21
- *
22
- * @var array
23
- */
24
- private $formats = array( 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery' );
25
-
26
- /**
27
- * Constructor.
28
- *
29
- * @since Twenty Fourteen 1.0
30
- *
31
- * @return Twenty_Fourteen_Ephemera_Widget
32
- */
33
- public function __construct() {
34
- parent::__construct( 'widget_twentyfourteen_ephemera', __( 'Twenty Fourteen Ephemera', 'twentyfourteen' ), array(
35
- 'classname' => 'widget_twentyfourteen_ephemera',
36
- 'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts.', 'twentyfourteen' ),
37
- ) );
38
- }
39
-
40
- /**
41
- * Output the HTML for this widget.
42
- *
43
- * @access public
44
- * @since Twenty Fourteen 1.0
45
- *
46
- * @param array $args An array of standard parameters for widgets in this theme.
47
- * @param array $instance An array of settings for this widget instance.
48
- */
49
- public function widget( $args, $instance ) {
50
- $format = isset( $instance['format'] ) && in_array( $instance['format'], $this->formats ) ? $instance['format'] : 'aside';
51
-
52
- switch ( $format ) {
53
- case 'image':
54
- $format_string = __( 'Images', 'twentyfourteen' );
55
- $format_string_more = __( 'More images', 'twentyfourteen' );
56
- break;
57
- case 'video':
58
- $format_string = __( 'Videos', 'twentyfourteen' );
59
- $format_string_more = __( 'More videos', 'twentyfourteen' );
60
- break;
61
- case 'audio':
62
- $format_string = __( 'Audio', 'twentyfourteen' );
63
- $format_string_more = __( 'More audio', 'twentyfourteen' );
64
- break;
65
- case 'quote':
66
- $format_string = __( 'Quotes', 'twentyfourteen' );
67
- $format_string_more = __( 'More quotes', 'twentyfourteen' );
68
- break;
69
- case 'link':
70
- $format_string = __( 'Links', 'twentyfourteen' );
71
- $format_string_more = __( 'More links', 'twentyfourteen' );
72
- break;
73
- case 'gallery':
74
- $format_string = __( 'Galleries', 'twentyfourteen' );
75
- $format_string_more = __( 'More galleries', 'twentyfourteen' );
76
- break;
77
- case 'aside':
78
- default:
79
- $format_string = __( 'Asides', 'twentyfourteen' );
80
- $format_string_more = __( 'More asides', 'twentyfourteen' );
81
- break;
82
- }
83
-
84
- $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] );
85
- $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? $format_string : $instance['title'], $instance, $this->id_base );
86
-
87
- $ephemera = new WP_Query( array(
88
- 'order' => 'DESC',
89
- 'posts_per_page' => $number,
90
- 'no_found_rows' => true,
91
- 'post_status' => 'publish',
92
- 'post__not_in' => get_option( 'sticky_posts' ),
93
- 'tax_query' => array(
94
- array(
95
- 'taxonomy' => 'post_format',
96
- 'terms' => array( "post-format-$format" ),
97
- 'field' => 'slug',
98
- 'operator' => 'IN',
99
- ),
100
- ),
101
- ) );
102
-
103
- if ( $ephemera->have_posts() ) :
104
- $tmp_content_width = $GLOBALS['content_width'];
105
- $GLOBALS['content_width'] = 306;
106
-
107
- echo $args['before_widget'];
108
- ?>
109
- <h1 class="widget-title <?php echo esc_attr( $format ); ?>">
110
- <a class="entry-format" href="<?php echo esc_url( get_post_format_link( $format ) ); ?>"><?php echo $title; ?></a>
111
- </h1>
112
- <ol>
113
-
114
- <?php
115
- while ( $ephemera->have_posts() ) :
116
- $ephemera->the_post();
117
- $tmp_more = $GLOBALS['more'];
118
- $GLOBALS['more'] = 0;
119
- ?>
120
- <li>
121
- <article <?php post_class(); ?>>
122
- <div class="entry-content">
123
- <?php
124
- if ( has_post_format( 'gallery' ) ) :
125
-
126
- if ( post_password_required() ) :
127
- the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
128
- else :
129
- $images = array();
130
-
131
- $galleries = get_post_galleries( get_the_ID(), false );
132
- if ( isset( $galleries[0]['ids'] ) )
133
- $images = explode( ',', $galleries[0]['ids'] );
134
-
135
- if ( ! $images ) :
136
- $images = get_posts( array(
137
- 'fields' => 'ids',
138
- 'numberposts' => -1,
139
- 'order' => 'ASC',
140
- 'orderby' => 'menu_order',
141
- 'post_mime_type' => 'image',
142
- 'post_parent' => get_the_ID(),
143
- 'post_type' => 'attachment',
144
- ) );
145
- endif;
146
-
147
- $total_images = count( $images );
148
-
149
- if ( has_post_thumbnail() ) :
150
- $post_thumbnail = get_the_post_thumbnail();
151
- elseif ( $total_images > 0 ) :
152
- $image = array_shift( $images );
153
- $post_thumbnail = wp_get_attachment_image( $image, 'post-thumbnail' );
154
- endif;
155
-
156
- if ( ! empty ( $post_thumbnail ) ) :
157
- ?>
158
- <a href="<?php the_permalink(); ?>"><?php echo $post_thumbnail; ?></a>
159
- <?php endif; ?>
160
- <p class="wp-caption-text">
161
- <?php
162
- printf( _n( 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photo</a>.', 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photos</a>.', $total_images, 'twentyfourteen' ),
163
- esc_url( get_permalink() ),
164
- number_format_i18n( $total_images )
165
- );
166
- ?>
167
- </p>
168
- <?php
169
- endif;
170
-
171
- else :
172
- the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
173
- endif;
174
- ?>
175
- </div><!-- .entry-content -->
176
-
177
- <header class="entry-header">
178
- <div class="entry-meta">
179
- <?php
180
- if ( ! has_post_format( 'link' ) ) :
181
- the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
182
- endif;
183
-
184
- printf( '<span class="entry-date"><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>',
185
- esc_url( get_permalink() ),
186
- esc_attr( get_the_date( 'c' ) ),
187
- esc_html( get_the_date() ),
188
- esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
189
- get_the_author()
190
- );
191
-
192
- if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
193
- ?>
194
- <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
195
- <?php endif; ?>
196
- </div><!-- .entry-meta -->
197
- </header><!-- .entry-header -->
198
- </article><!-- #post-## -->
199
- </li>
200
- <?php endwhile; ?>
201
-
202
- </ol>
203
- <a class="post-format-archive-link" href="<?php echo esc_url( get_post_format_link( $format ) ); ?>">
204
- <?php
205
- /* translators: used with More archives link */
206
- printf( __( '%s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ), $format_string_more );
207
- ?>
208
- </a>
209
- <?php
210
-
211
- echo $args['after_widget'];
212
-
213
- // Reset the post globals as this query will have stomped on it.
214
- wp_reset_postdata();
215
-
216
- $GLOBALS['more'] = $tmp_more;
217
- $GLOBALS['content_width'] = $tmp_content_width;
218
-
219
- endif; // End check for ephemeral posts.
220
- }
221
-
222
- /**
223
- * Deal with the settings when they are saved by the admin.
224
- *
225
- * Here is where any validation should happen.
226
- *
227
- * @since Twenty Fourteen 1.0
228
- *
229
- * @param array $new_instance New widget instance.
230
- * @param array $instance Original widget instance.
231
- * @return array Updated widget instance.
232
- */
233
- function update( $new_instance, $instance ) {
234
- $instance['title'] = strip_tags( $new_instance['title'] );
235
- $instance['number'] = empty( $new_instance['number'] ) ? 2 : absint( $new_instance['number'] );
236
- if ( in_array( $new_instance['format'], $this->formats ) ) {
237
- $instance['format'] = $new_instance['format'];
238
- }
239
-
240
- return $instance;
241
- }
242
-
243
- /**
244
- * Display the form for this widget on the Widgets page of the Admin area.
245
- *
246
- * @since Twenty Fourteen 1.0
247
- *
248
- * @param array $instance
249
- */
250
- function form( $instance ) {
251
- $title = empty( $instance['title'] ) ? '' : esc_attr( $instance['title'] );
252
- $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] );
253
- $format = isset( $instance['format'] ) && in_array( $instance['format'], $this->formats ) ? $instance['format'] : 'aside';
254
- ?>
255
- <p><label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', 'twentyfourteen' ); ?></label>
256
- <input id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" class="widefat" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>"></p>
257
-
258
- <p><label for="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>"><?php _e( 'Number of posts to show:', 'twentyfourteen' ); ?></label>
259
- <input id="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>" type="text" value="<?php echo esc_attr( $number ); ?>" size="3"></p>
260
-
261
- <p><label for="<?php echo esc_attr( $this->get_field_id( 'format' ) ); ?>"><?php _e( 'Post format to show:', 'twentyfourteen' ); ?></label>
262
- <select id="<?php echo esc_attr( $this->get_field_id( 'format' ) ); ?>" class="widefat" name="<?php echo esc_attr( $this->get_field_name( 'format' ) ); ?>">
263
- <?php foreach ( $this->formats as $slug ) : ?>
264
- <option value="<?php echo esc_attr( $slug ); ?>"<?php selected( $format, $slug ); ?>><?php echo get_post_format_string( $slug ); ?></option>
265
- <?php endforeach; ?>
266
- </select>
267
- <?php
268
- }
269
- }
@@ -1,61 +0,0 @@
1
- <?php
2
- /**
3
- * The main template file
4
- *
5
- * This is the most generic template file in a WordPress theme and one
6
- * of the two required files for a theme (the other being style.css).
7
- * It is used to display a page when nothing more specific matches a query,
8
- * e.g., it puts together the home page when no home.php file exists.
9
- *
10
- * @link http://codex.wordpress.org/Template_Hierarchy
11
- *
12
- * @package WordPress
13
- * @subpackage Twenty_Fourteen
14
- * @since Twenty Fourteen 1.0
15
- */
16
-
17
- get_header(); ?>
18
-
19
- <div id="main-content" class="main-content">
20
-
21
- <?php
22
- if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
23
- // Include the featured content template.
24
- get_template_part( 'featured-content' );
25
- }
26
- ?>
27
-
28
- <div id="primary" class="content-area">
29
- <div id="content" class="site-content" role="main">
30
-
31
- <?php
32
- if ( have_posts() ) :
33
- // Start the Loop.
34
- while ( have_posts() ) : the_post();
35
-
36
- /*
37
- * Include the post format-specific template for the content. If you want to
38
- * use this in a child theme, then include a file called called content-___.php
39
- * (where ___ is the post format) and that will be used instead.
40
- */
41
- get_template_part( 'content', get_post_format() );
42
-
43
- endwhile;
44
- // Previous/next post navigation.
45
- twentyfourteen_paging_nav();
46
-
47
- else :
48
- // If no content, include the "No posts found" template.
49
- get_template_part( 'content', 'none' );
50
-
51
- endif;
52
- ?>
53
-
54
- </div><!-- #content -->
55
- </div><!-- #primary -->
56
- <?php get_sidebar( 'content' ); ?>
57
- </div><!-- #main-content -->
58
-
59
- <?php
60
- get_sidebar();
61
- get_footer();
@@ -1,38 +0,0 @@
1
- /**
2
- * Twenty Fourteen Theme Customizer enhancements for a better user experience.
3
- *
4
- * Contains handlers to make Theme Customizer preview reload changes asynchronously.
5
- */
6
- ( function( $ ) {
7
- // Site title and description.
8
- wp.customize( 'blogname', function( value ) {
9
- value.bind( function( to ) {
10
- $( '.site-title a' ).text( to );
11
- } );
12
- } );
13
- wp.customize( 'blogdescription', function( value ) {
14
- value.bind( function( to ) {
15
- $( '.site-description' ).text( to );
16
- } );
17
- } );
18
- // Header text color.
19
- wp.customize( 'header_textcolor', function( value ) {
20
- value.bind( function( to ) {
21
- if ( 'blank' === to ) {
22
- $( '.site-title, .site-description' ).css( {
23
- 'clip': 'rect(1px, 1px, 1px, 1px)',
24
- 'position': 'absolute'
25
- } );
26
- } else {
27
- $( '.site-title, .site-description' ).css( {
28
- 'clip': 'auto',
29
- 'position': 'static'
30
- } );
31
-
32
- $( '.site-title a' ).css( {
33
- 'color': to
34
- } );
35
- }
36
- } );
37
- } );
38
- } )( jQuery );
@@ -1,9 +0,0 @@
1
- /**
2
- * Twenty Fourteen Featured Content admin behavior: add a tag suggestion
3
- * when changing the tag.
4
- */
5
- /* global ajaxurl:true */
6
-
7
- jQuery( document ).ready( function( $ ) {
8
- $( '#customize-control-featured-content-tag-name input' ).suggest( ajaxurl + '?action=ajax-tag-search&tax=post_tag', { delay: 500, minchars: 2 } );
9
- });