承接 seothemes/core-custom-colors 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

seothemes/core-custom-colors

Composer 安装命令:

composer require seothemes/core-custom-colors

包简介

Add color settings to the Customizer through configuration

README 文档

README

Add color settings to the Customizer with CSS output.

Installation

This component should be installed using Composer, with the command composer require seothemes/core-custom-colors.

Usage

Within your config file (typically found at config/defaults.php), use the CustomColors as an array key to add a list color settings to add to the Customizer.

For example:

use SEOThemes\Core\CustomColors;

$custom_colors = [
	'background' => [
		'default' => '#ffffff',
		'output'  => [
			[
				'elements'   => [
					'.site-container',
				],
				'properties' => [
					'background-color' => '%s',
				],
			],
		],
	],
];

return [
    CustomColors::class => $custom_colors,
];

The above will add a new Background Color setting to the Colors section of the Customizer. It will also output the following CSS on the front-end of the site:

.site-container{background-color:#fff}

Load the component

Components should be loaded in your theme functions.php file, using the Theme::setup static method. Code should run on the after_setup_theme hook (or genesis_setup if you use Genesis Framework).

add_action( 'after_setup_theme', function() {
    $config = include_once __DIR__ . '/config/defaults.php';
    D2\Core\Theme::setup( $config );
} );

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: gpl-2.0-or-later
  • 更新时间: 2018-08-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固