[wordpress插件] Customizer Theme Switcher定制器主题切换器

wordpress 插件 文章 2020-04-10 22:50 540 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

This plugin is a WordPress core feature-plugin proposed for WordPress 4.2.

此插件是为WordPress 4.2建议的WordPress核心功能插件。

The goal is to bring theme-browsing and theme-switching into the Customizer to streamline the themes experience.

目的是将主题浏览和主题切换引入定制器,以简化主题体验。

The current status is extremely basic code-wise, but implements most of what’s available on the themes admin page.

当前状态是极其基本的代码方式,但是实现了主题管理页面上可用的大部分功能。

See our posts on Make WordPress Core for more info.

有关更多信息,请参见我们的关于使WordPress成为核心的帖子

If you're interested in contributing to this project, ping @celloexpressions on WordPress core Slack.

如果您有兴趣为这个项目做贡献,请在 WordPress核心Slack 上ping @celloexpressions。

p>

>

Core Merge Notes

核心合并说明

= UX =

= UX =

* Remove #customize-info for theme previews.

*删除#customize-info进行主题预览。

* Change front-end admin bar Themes link to point to themes in the Customizer (deep-linked).

*更改前端管理栏的主题链接,以指向定制程序中的主题(深链接)。

* When a new theme is activated, go to the home page (front end), not the themes admin.

*激活新主题后,请转到主页(前端),而不是主题管理员。

* If user doesn’t confirm that they want to leave unsaved changes, remove customize-loading body class (requires core patch).

*如果用户不确认要保留未保存的更改,则删除自定义加载正文类(需要核心补丁)。

Code

代码

    • See inline comments.
    • 查看嵌入式注释。

    • Move custom section and control to class-wp-customize-control|section.php in wp-includes.
    • 将自定义部分和控件移至 wp-includes 中的 class-wp-customize-control | section.php

    • Merge all CSS into customize-controls.css, scope to .wp-customizer.
    • 将所有CSS合并到custom-controls.css中,范围为 .wp-customizer

    • Move .themes-panel-back to the Customizer header, adjust JS accordingly.
    • .themes-panel-back 移至Customizer标题,相应地调整JS。

    • Merge JS into customizer-controls.js, after the respective object types.
    • 在相应对象类型之后,

    • 将JS合并到 customizer-controls.js 中。

    • Merge remaining PHP (all in Customize Register callback) into register_controls() in class-wp-customize-manager.php.
    • 将剩余的PHP(全部在Customize Register回调中)合并到 class-wp-customize-manager.php 中的 register_controls()中。

    • Account for https://core.trac.wordpress.org/ticket/26611
    • https://core.trac.wordpress.org/ticket/26611的帐户

安装步骤

    1. Take the easy route and install through the WordPress plugin adder OR
    2. 采用简单的方法并通过WordPress插件添加程序进行安装或

    3. Download the .zip file and upload the unzipped folder to the /wp-content/plugins/ directory
    4. 下载.zip文件,并将解压缩的文件夹上载到 / wp-content / plugins / 目录

    5. Activate the plugin through the ‘Plugins’ menu in WordPress
    6. 通过WordPress中的“插件”菜单激活插件

    7. Visit the Customizer (Appearance -> Customize) to browse & switch themes.
    8. 访问定制器(外观->定制)以浏览和切换主题。

下载地址
https://downloads.wordpress.org/plugin/customizer-theme-switcher.zip
-EOF-

AI助手支持GPT4.0