dekodeinteraktiv/resets

此包已被弃用且不再维护。作者建议使用dekode/wp-resets包。

WordPress 必须使用的 Dekode 插件

安装: 68

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 5

分支: 0

开放问题: 0

类型:wordpress-muplugin

2.0.3 2021-04-20 06:48 UTC

This package is auto-updated.

Last update: 2021-04-20 06:52:18 UTC


README

目录

描述

这是一个由 Dekode 用于优化 WordPress 的基本功能集合。

加载

此 mu 插件默认不加载到 WordPress 中。您需要在 mu 插件文件夹中手动创建加载文件。

您还应该将插件添加到项目的 .gitignore 文件中。

<?php
/**
 * Autoloader for wp-resets
 *
 */

declare( strict_types = 1 );

if ( file_exists( trailingslashit( __DIR__ ) . 'wp-resets/resets.php' ) ) {
	require trailingslashit( __DIR__ ) . 'wp-resets/resets.php';
}

使用方法

function setup_custom_project() {
	add_theme_support( 'admin-cards' );
	add_theme_support( 'admin-cleanup' );
	add_theme_support( 'disable-comments' );
	add_theme_support( 'disable-customizer' );
	add_theme_support( 'disable-emoji' );
	add_theme_support( 'disable-feeds' );
	add_theme_support( 'disable-xmlrpc' );
	add_theme_support( 'optimize-embeds' );
	add_theme_support( 'optimize-wp-head' );
	add_theme_support( 'optimize-yoast-schema' );
	add_theme_support( 'post-to-article' );
	add_theme_support( 'searchwp-norwegian-stopwords' );
	add_theme_support( 'youtube-embed-nocookie' );
}
add_action( 'after_setup_theme', 'setup_custom_project' );