浏览代码

Varia: Remove unnecessary conditional checks.

Allan Cole 5 年之前
父节点
当前提交
24723f7760
共有 1 个文件被更改,包括 0 次插入38 次删除
  1. 0 38
      varia/inc/jetpack.php

+ 0 - 38
varia/inc/jetpack.php

@@ -36,41 +36,3 @@ function varia_jetpack_setup() {
 	);
 }
 add_action( 'after_setup_theme', 'varia_jetpack_setup' );
-
-/**
- * Custom function to check for a post thumbnail;
- * If Jetpack is not available, fall back to has_post_thumbnail()
- */
-function varia_has_post_thumbnail( $post = null ) {
-	if ( function_exists( 'jetpack_has_featured_image' ) ) {
-		return jetpack_has_featured_image( $post );
-	} else {
-		return has_post_thumbnail( $post );
-	}
-}
-
-/**
- * Display a Featured Image on archive pages if option is ticked.
- */
-function varia_jetpack_featured_image_archive_display() {
-    if ( ! function_exists( 'jetpack_featured_images_remove_post_thumbnail' ) ) {
-        return false;
-    } else {
-        $options         = get_theme_support( 'jetpack-content-options' );
-        $featured_images = ( ! empty( $options[0]['featured-images'] ) ) ? $options[0]['featured-images'] : null;
-
-        $settings = array(
-            'archive-default' => ( isset( $featured_images['archive-default'] ) && false === $featured_images['archive-default'] ) ? '' : 1,
-        );
-
-        $settings = array_merge( $settings, array(
-            'archive-option'  => get_option( 'jetpack_content_featured_images_archive', $settings['archive-default'] ),
-        ) );
-
-        if ( $settings['archive-option'] ) {
-            return true;
-        } else {
-            return false;
-        }
-    }
-}