PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.7
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.7
16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 All 506 releases
← All changes | modules/theme-tools/compat/twentyfourteen.php +3 -38 13.6.2 → 16.3-a.7 View file →
@@ -5,48 +5,13 @@
5 5 *
6 6 * @package automattic/jetpack
7 7 */
8 8
9 -/**
10 - * A last try to show posts, in case the Featured Content plugin returns no IDs.
11 - *
12 - * @param array $featured_ids Array of 'featured' post IDs.
13 - * @return array
14 - */
15 -function twentyfourteen_featured_content_post_ids( $featured_ids ) {
16 - if ( empty( $featured_ids ) ) {
17 - $featured_ids = array_slice( get_option( 'sticky_posts', array() ), 0, 6 );
18 - }
19 -
20 - return $featured_ids;
9 +if ( ! defined( 'ABSPATH' ) ) {
10 + exit( 0 );
21 11 }
22 -add_action( 'featured_content_post_ids', 'twentyfourteen_featured_content_post_ids' );
23 12
24 13 /**
25 - * Set the default tag name for Featured Content.
26 - *
27 - * @param WP_Customize_Manager $wp_customize Theme Customizer object.
28 - * @return void
29 - */
30 -function twentyfourteen_customizer_default( $wp_customize ) {
31 - $wp_customize->get_setting( 'featured-content[tag-name]' )->default = 'featured';
32 -}
33 -add_action( 'customize_register', 'twentyfourteen_customizer_default' );
34 -
35 -/**
36 - * Sets a default tag of 'featured' for Featured Content.
37 - *
38 - * @param array $settings Featured content settings.
39 - * @return array
40 - */
41 -function twentyfourteen_featured_content_default_settings( $settings ) {
42 - $settings['tag-name'] = 'featured';
43 -
44 - return $settings;
45 -}
46 -add_action( 'featured_content_default_settings', 'twentyfourteen_featured_content_default_settings' );
47 -
48 -/**
49 14 * Removes sharing markup from post content if we're not in the loop and it's a
50 15 * formatted post.
51 16 *
52 17 * @param bool $show Whether to show sharing options.
@@ -54,9 +19,9 @@
54 19 * @return bool
55 20 */
56 21 function twentyfourteen_mute_content_filters( $show, $post ) {
57 22 $formats = get_theme_support( 'post-formats' );
58 - if ( ! in_the_loop() && has_post_format( $formats[0], $post ) ) {
23 + if ( ! in_the_loop() && is_array( $formats ) && has_post_format( $formats[0], $post ) ) {
59 24 $show = false;
60 25 }
61 26 return $show;
62 27 }