thoughtsideas/ti-whitelabel

WordPress 白标管理区域。

安装次数: 2,058

依赖项: 0

建议者: 0

安全性: 0

星标: 2

关注者: 1

分支: 0

开放问题: 2

类型:wordpress-muplugin

v0.2.1 2017-08-23 13:02 UTC

README

license GitHub release Build Status Packagist Packagist GitHub issues Libraries.io for GitHub

将您的 WordPress 安装重命名为匹配您的公司或客户品牌。

依赖项

安装

我们建议通过 Composer 安装此依赖项。

作为 Composer 依赖项

要将这些标准作为项目的一部分。将此存储库作为开发依赖项要求

composer require thoughtsideas/ti-whitelabel

制作您的更改

在基于 origin/master 的新分支上本地进行您的更改。将您的更改提交到您的分支,并定期将您的作品推送到服务器上同名分支。当您需要反馈或帮助,或者您认为分支已准备好合并时,打开一个 pull request。在其他人审阅并签署功能后,您可以将它合并到 master 中。

文档

在 Alpha/Beta 阶段,由于不断的变化,文档将主要以内联形式编写。在首次重大发布时将创建一个专门的章节。

自定义 WordPress 登录

自定义 CSS

/**
 * Apply our custom styles to the WordPress Login page.
 *
 * @param  array $defaults Default values set by the plugin.
 * @return array           Our modified styles.
 */
function my_customized_login_css( $defaults ) {

	$args = array(
		'background-color' => 'SlateGray', // Accepts all CSS color values.
		'logo'             => array(
			'url'             => get_theme_mod( 'custom_logo' ), // Relative or absolute.
			'width'           => '275px', // Accepts all CSS units.
			'height'          => '100px', // Accepts all CSS units.
		),
		'color'             => 'rgb(51, 51, 51)', // Accepts all CSS color values.
		'link'             => '#ffffff', // Accepts all CSS color values.
		'hover'            => 'hsl(0, 0%, 0%)', // Accepts all CSS color values.
	);

	return wp_parse_args( $args, $defaults );
}

add_filter(
	'ti_whitelable_login_css',
	'my_customized_login_css'
);

自定义头部 URL

/**
 * Apply our custom url to the WordPress Login page logo.
 *
 * @param  string $default  Default values set by the plugin.
 * @return string           Our modified value.
 */
function my_customized_header_url( $default ) {

	return 'https://thoughtsideas.uk';

}

add_filter(
	'ti_whitelabel_login_header_url',
	'my_customized_login_header_url'
);

自定义头部标题

/**
 * Apply our custom heading text to the WordPress Login page logo.
 *
 * @param  string $default  Default values set by the plugin.
 * @return string           Our modified value.
 */
function my_customized_header_title( $default ) {

	return 'Thoughts & Ideas - Simplifying your promotion.';

}

add_filter(
	'ti_whitelabel_login_header_title',
	'my_customized_login_header_title'
);

自定义 WordPress 管理

自定义管理员页脚文本

/**
 * Apply our custom admin footer text to the WordPress admin page.
 *
 * @return string           Our modified value.
 */
function my_customized_admin_footer_text() {
	return sprintf(
		'%1$s <a href="%3$s" target="_blank">%2$s</a>.',
		esc_html( 'Created by' ),
		esc_html( 'Thoughts & Ideas' ),
		esc_url( 'https://www.thoughtsideas.uk/' )
	);
}

add_filter(
	'ti_whitelabel_admin_footer_text',
	'my_customized_admin_footer_text'
);