文件操作 - yoast-seo.php
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/jimbrandstatter/public_html/wp-content/themes/Total/inc/integration/yoast-seo.php
编辑文件内容
<?php namespace TotalTheme\Integration; \defined( 'ABSPATH' ) || exit; /** * Yoast SEO Plugin Integration. */ class Yoast_SEO { /** * Hook into actions and filters. */ public static function init() { \add_action( 'after_setup_theme', [ self::class, 'add_theme_support' ] ); if ( \apply_filters( 'wpex_filter_wpseo_metadesc', true ) ) { \add_filter( 'wpseo_metadesc', [ self::class, 'metadesc' ] ); } totaltheme_init_class( __NAMESPACE__ . '\Yoast_SEO\Breadcrumbs' ); totaltheme_init_class( __NAMESPACE__ . '\Yoast_SEO\Pagination_Fix' ); totaltheme_init_class( __NAMESPACE__ . '\Yoast_SEO\Customizer' ); } /** * Register Yoast SEO theme support. */ public static function add_theme_support(): void { \add_theme_support( 'yoast-seo-breadcrumbs' ); } /** * Auto Generate meta description if empty using Total excerpt function. */ public static function metadesc( $metadesc ) { if ( ! $metadesc && \is_singular() ) { $post_excerpt = (string) \wpex_get_excerpt( [ 'length' => (int) \apply_filters( 'wpex_yoast_metadesc_length', 160 ), 'trim_type' => 'characters', 'more' => '', ] ); if ( $post_excerpt ) { $metadesc = \trim( \wp_strip_all_tags( $post_excerpt ) ); } } return $metadesc; } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件