[wordpress插件] Customize Posts自定义帖子

wordpress 插件 文章 2020-04-10 16:50 384 0 全屏看文

AI助手支持GPT4.0

评分
92
描述

This is a feature plugin intended to implement #34923: Introduce basic

这是一个旨在实现#34923 的功能插件:介绍基本

content authorship in the Customizer.

定制器中的内容作者身份。

The goal for this plugin is to be able to expose the editing of posts and pages in the Customizer, allowing you to edit post data and postmeta for any number of posts, and preview the changes before saving them for others to see.

此插件的目标是能够在定制器中公开帖子和页面的编辑,使您可以编辑任意数量的帖子的帖子数据和postmeta,并在保存更改之前预览更改以供其他人查看。

This plugin was birthed out of the Widget Customizer feature-as-plugin project which was merged into WordPress Core: as widgets (in 3.9) and nav menus (4.3) can now be managed in the Customizer, so too should posts and pages be editable

这个插件诞生于Widget Customizer功能即插件项目,该项目已合并到WordPress Core:由于Widget(3.9中)和nav菜单(4.3)现在可以在Customizer中进行管理,因此帖子和页面也应可编辑

in the Customizer as well.

在定制器中也是如此。

Did you know that changing the featured image actually makes the change live even before you save the post?

您知道吗更改特色图片实际上使更改生效,甚至在您保存帖子之前

This is very surprising/unexpected behavior.

这是非常令人惊讶/意外的行为。

The only way to truly preview a change to a featured image is to use something like Customize Posts.

真正预览对特色图片所做的更改的唯一方法是使用“自定义帖子”之类的内容。

Likewise, did you know that changing a page template cannot be previewed from the post editor? When you change the selected page template, the change will not show up when you preview the page (see <

同样,您是否知道无法从帖子编辑器预览更改页面模板吗??更改选定的页面模板时,在预览页面时更改不会显示(请参见<

a href="https://core.trac.wordpress.org/ticket/11049" rel="nofollow">#11049).

a href =“ https://core.trac.wordpress.org/ticket/11049” rel =“ nofollow”>#11049 )。

However, in Customize Posts you can preview changes to the page template just by changing the dropdown selection, and then you can see what your page would look like with the new template after the preview refreshes.

但是,在“自定义帖子”中,您只需更改下拉菜单即可 预览页面模板的更改,然后您可以在刷新预览后查看使用新模板后页面的外观。

>

>

Most other changes to metaboxes containing data that gets saved to custom fields (postmeta) also get written when clicking the Preview button.

在单击“预览”按钮时,对包含数据的元框的其他大多数更改也将被写入(自定义字段)。

The Customize Posts plugin provides a framework to edit postmeta in the Customizer with a live preview of the changes.

Customize Posts插件提供了一个框架,用于在Customizer中编辑实时更改的预览。

(Fixing this underlying issue of incorrectly persisting postmeta when doing a preview is captured in #20299.

(已解决在#20299 中捕获的在预览时错误保留持久元数据的潜在问题。

)

As much as possible, the previewing of changes in Customize Posts utilizes the selective refresh capabilities introduced in WordPress 4.5.

WordPress 4.5中引入的“ rel =“ nofollow”>选择性刷新功能。

Not only does this mean it is faster to preview changes to posts and postmeta, but it also allows you to shift-click on an element to focus on the corresponding control in the Customizer pane.

这不仅意味着可以更快地预览对帖子和帖子的更改,而且还允许您按住Shift键并单击某个元素,以将焦点放在“定制程序”窗格中的相应控件上。

For example you can shift-click on the post title in the preview to focus on the post title control’s input field, or shift-click on a featured image to focus on the control’s button to open the media library.

例如,您可以在预览中按住Shift键并单击以突出显示标题控件的输入字段,或者按住Shift键单击具有特色的图像以焦点单击控件的按钮来打开媒体库。

Development of this plugin is done on GitHub.

已在GitHub上 进行了开发。

Pull requests welcome.

拉请求欢迎。

Please see issues reported there before going to the 问题

/wordpress.org/support/plugin/customize-posts">plugin forum.

/wordpress.org/support/plugin/customize-posts“>插件论坛。

(This Customize Posts plugin is not to be confused with 10up's

(此 Customize Posts 插件不要与10up的 混淆。

Post Customizer.)

帖子定制器 。)

Demo Videos

演示视频

The following are listed in reverse chronological order.

以下按相反的时间顺序列出。

The first, more recent videos, show more polish.

第一个是最近播放的视频,显示的是更多波兰语。

[2016-04-28] New features in 0.5.0.

[2016-04-28] 0.5.0中的新功能。

>

[2016-03-28] Previewing post from Post Edit screen.

[2016-03-28]从“帖子编辑”屏幕预览帖子。

"}];jQuery(function(){$("#article_content").find("a").each(function(){var url =$(this).attr("href");for(var i=0;i"+c+"

");} } }) })