AI助手支持GPT4.0
The customizer is a single-page application that includes a lot of events, messages, and state changes which drive the application.
定制程序是一个单页应用程序,其中包含许多驱动该应用程序的事件,消息和状态更改。
Being aware of these things is essential for developing JavaScript for the customizer.
意识到这些事情对于为定制程序开发JavaScript至关重要。 p>
To use, activate the plugin, open the customizer and the browser console and enter:
要使用,请激活插件,打开定制程序和浏览器控制台,然后输入: p>
CustomizerDevTools.startLogging()CustomizerDevTools.startLogging() pre>You can then either start interacting with the customizer app to see the log entries from that point, or you can reload the customizer to see the log entries emitted during the customizer initialization.然后,您可以开始与定制器应用程序进行交互以查看从该点开始的日志条目,也可以重新加载定制器以查看在定制器初始化期间发出的日志条目。 p>Not everything in the customizer is currently implemented to emit a log entry.当前并非实现定制器中的所有功能来发出日志条目。File an issue for any specific event that may be needed.针对可能需要的任何特定事件提出问题。 p>Features:功能: p>
CustomizerDevTools.startLogging()CustomizerDevTools.startLogging()
CustomizerDevTools.startLogging()
CustomizerDevTools.startLogging()
pre>
You can then either start interacting with the customizer app to see the log entries from that point, or you can reload the customizer to see the log entries emitted during the customizer initialization.
然后,您可以开始与定制器应用程序进行交互以查看从该点开始的日志条目,也可以重新加载定制器以查看在定制器初始化期间发出的日志条目。 p>
Not everything in the customizer is currently implemented to emit a log entry.
当前并非实现定制器中的所有功能来发出日志条目。
File an issue for any specific event that may be needed.
针对可能需要的任何特定事件提出问题。 p>
Features:
功能: p>
CustomizerDevTools.stopLogging()
CustomizerDevTools.startLogging() code>开始记录定制器事件,并通过 CustomizerDevTools.stopLogging() code>停止。In the former, you can filter what is logged out by passing a string or regular expression (RegExp object) to match against the given log, or you can use the browser console's built-in log filtering.<在前者中,您可以通过传递字符串或正则表达式( RegExp code>对象)以匹配给定的日志来过滤注销的内容,或者可以使用浏览器控制台的内置日志过滤。 /li>/ li>Logs out all events triggered on wp.customize.注销所有在 wp.customize code>上触发的事件。 li>Logs out additions and changes to to wp.customize.state.注销添加并更改为 wp.customize.state code>。 li>Logs changes to the active and expanded states for panels, sections, and controls.将面板,部分和控件的更改记录为 active code>和 expanded code>状态。 li>Logs out messages sent and received by the pane (controls) and preview.注销由窗格(控件)发送和接收的消息并进行预览。 li>Logs out dynamic addition and removal of panels, sections, controls, partials, and settings (after the ready event triggers).注销动态添加和删除面板,节,控件,部分和设置(在 ready code>事件触发器之后)。 li>The wp.customize object from the Customizer preview is made persistently available from the parent frame via CustomizerDevTools.previewCustomize.通过 CustomizerDevTools.previewCustomize code>可以从父框架中永久使用Customizer预览中的 wp.customize code>对象。This reference is updated whenever the preview refreshes, so you no longer have to change the frame window context to access this object.每当预览刷新时,此引用都会更新,因此您不再需要更改框架窗口上下文来访问此对象。 li>In the same way, the current Customizer preview window is exposed as CustomizerDevTools.previewWindow.以同样的方式,当前的Customizer预览 window code>显示为 CustomizerDevTools.previewWindow code>。This is a shortcut for doing wp.customize.previewer.targetWindow.get(), and it has the added benefit of allowing the browser’s dev tools to provide auto-completion.这是执行 wp.customize.previewer.targetWindow.get() code>的快捷方式,它的附加好处是允许浏览器的开发工具提供自动完成功能。 li>
CustomizerDevTools.stopLogging() code>停止。In the former, you can filter what is logged out by passing a string or regular expression (RegExp object) to match against the given log, or you can use the browser console's built-in log filtering.<在前者中,您可以通过传递字符串或正则表达式( RegExp code>对象)以匹配给定的日志来过滤注销的内容,或者可以使用浏览器控制台的内置日志过滤。 /li>/ li>Logs out all events triggered on wp.customize.注销所有在 wp.customize code>上触发的事件。 li>Logs out additions and changes to to wp.customize.state.注销添加并更改为 wp.customize.state code>。 li>Logs changes to the active and expanded states for panels, sections, and controls.将面板,部分和控件的更改记录为 active code>和 expanded code>状态。 li>Logs out messages sent and received by the pane (controls) and preview.注销由窗格(控件)发送和接收的消息并进行预览。 li>Logs out dynamic addition and removal of panels, sections, controls, partials, and settings (after the ready event triggers).注销动态添加和删除面板,节,控件,部分和设置(在 ready code>事件触发器之后)。 li>The wp.customize object from the Customizer preview is made persistently available from the parent frame via CustomizerDevTools.previewCustomize.通过 CustomizerDevTools.previewCustomize code>可以从父框架中永久使用Customizer预览中的 wp.customize code>对象。This reference is updated whenever the preview refreshes, so you no longer have to change the frame window context to access this object.每当预览刷新时,此引用都会更新,因此您不再需要更改框架窗口上下文来访问此对象。 li>In the same way, the current Customizer preview window is exposed as CustomizerDevTools.previewWindow.以同样的方式,当前的Customizer预览 window code>显示为 CustomizerDevTools.previewWindow code>。This is a shortcut for doing wp.customize.previewer.targetWindow.get(), and it has the added benefit of allowing the browser’s dev tools to provide auto-completion.这是执行 wp.customize.previewer.targetWindow.get() code>的快捷方式,它的附加好处是允许浏览器的开发工具提供自动完成功能。 li>
In the former, you can filter what is logged out by passing a string or regular expression (RegExp object) to match against the given log, or you can use the browser console's built-in log filtering.<
RegExp
在前者中,您可以通过传递字符串或正则表达式( RegExp code>对象)以匹配给定的日志来过滤注销的内容,或者可以使用浏览器控制台的内置日志过滤。 /li>/ li>Logs out all events triggered on wp.customize.注销所有在 wp.customize code>上触发的事件。 li>Logs out additions and changes to to wp.customize.state.注销添加并更改为 wp.customize.state code>。 li>Logs changes to the active and expanded states for panels, sections, and controls.将面板,部分和控件的更改记录为 active code>和 expanded code>状态。 li>Logs out messages sent and received by the pane (controls) and preview.注销由窗格(控件)发送和接收的消息并进行预览。 li>Logs out dynamic addition and removal of panels, sections, controls, partials, and settings (after the ready event triggers).注销动态添加和删除面板,节,控件,部分和设置(在 ready code>事件触发器之后)。 li>The wp.customize object from the Customizer preview is made persistently available from the parent frame via CustomizerDevTools.previewCustomize.通过 CustomizerDevTools.previewCustomize code>可以从父框架中永久使用Customizer预览中的 wp.customize code>对象。This reference is updated whenever the preview refreshes, so you no longer have to change the frame window context to access this object.每当预览刷新时,此引用都会更新,因此您不再需要更改框架窗口上下文来访问此对象。 li>In the same way, the current Customizer preview window is exposed as CustomizerDevTools.previewWindow.以同样的方式,当前的Customizer预览 window code>显示为 CustomizerDevTools.previewWindow code>。This is a shortcut for doing wp.customize.previewer.targetWindow.get(), and it has the added benefit of allowing the browser’s dev tools to provide auto-completion.这是执行 wp.customize.previewer.targetWindow.get() code>的快捷方式,它的附加好处是允许浏览器的开发工具提供自动完成功能。 li>
/li>
/ li>
wp.customize
wp.customize code>上触发的事件。 li>Logs out additions and changes to to wp.customize.state.注销添加并更改为 wp.customize.state code>。 li>Logs changes to the active and expanded states for panels, sections, and controls.将面板,部分和控件的更改记录为 active code>和 expanded code>状态。 li>Logs out messages sent and received by the pane (controls) and preview.注销由窗格(控件)发送和接收的消息并进行预览。 li>Logs out dynamic addition and removal of panels, sections, controls, partials, and settings (after the ready event triggers).注销动态添加和删除面板,节,控件,部分和设置(在 ready code>事件触发器之后)。 li>The wp.customize object from the Customizer preview is made persistently available from the parent frame via CustomizerDevTools.previewCustomize.通过 CustomizerDevTools.previewCustomize code>可以从父框架中永久使用Customizer预览中的 wp.customize code>对象。This reference is updated whenever the preview refreshes, so you no longer have to change the frame window context to access this object.每当预览刷新时,此引用都会更新,因此您不再需要更改框架窗口上下文来访问此对象。 li>In the same way, the current Customizer preview window is exposed as CustomizerDevTools.previewWindow.以同样的方式,当前的Customizer预览 window code>显示为 CustomizerDevTools.previewWindow code>。This is a shortcut for doing wp.customize.previewer.targetWindow.get(), and it has the added benefit of allowing the browser’s dev tools to provide auto-completion.这是执行 wp.customize.previewer.targetWindow.get() code>的快捷方式,它的附加好处是允许浏览器的开发工具提供自动完成功能。 li>
wp.customize.state
wp.customize.state code>。 li>Logs changes to the active and expanded states for panels, sections, and controls.将面板,部分和控件的更改记录为 active code>和 expanded code>状态。 li>Logs out messages sent and received by the pane (controls) and preview.注销由窗格(控件)发送和接收的消息并进行预览。 li>Logs out dynamic addition and removal of panels, sections, controls, partials, and settings (after the ready event triggers).注销动态添加和删除面板,节,控件,部分和设置(在 ready code>事件触发器之后)。 li>The wp.customize object from the Customizer preview is made persistently available from the parent frame via CustomizerDevTools.previewCustomize.通过 CustomizerDevTools.previewCustomize code>可以从父框架中永久使用Customizer预览中的 wp.customize code>对象。This reference is updated whenever the preview refreshes, so you no longer have to change the frame window context to access this object.每当预览刷新时,此引用都会更新,因此您不再需要更改框架窗口上下文来访问此对象。 li>In the same way, the current Customizer preview window is exposed as CustomizerDevTools.previewWindow.以同样的方式,当前的Customizer预览 window code>显示为 CustomizerDevTools.previewWindow code>。This is a shortcut for doing wp.customize.previewer.targetWindow.get(), and it has the added benefit of allowing the browser’s dev tools to provide auto-completion.这是执行 wp.customize.previewer.targetWindow.get() code>的快捷方式,它的附加好处是允许浏览器的开发工具提供自动完成功能。 li>
active
expanded
active code>和 expanded code>状态。 li>Logs out messages sent and received by the pane (controls) and preview.注销由窗格(控件)发送和接收的消息并进行预览。 li>Logs out dynamic addition and removal of panels, sections, controls, partials, and settings (after the ready event triggers).注销动态添加和删除面板,节,控件,部分和设置(在 ready code>事件触发器之后)。 li>The wp.customize object from the Customizer preview is made persistently available from the parent frame via CustomizerDevTools.previewCustomize.通过 CustomizerDevTools.previewCustomize code>可以从父框架中永久使用Customizer预览中的 wp.customize code>对象。This reference is updated whenever the preview refreshes, so you no longer have to change the frame window context to access this object.每当预览刷新时,此引用都会更新,因此您不再需要更改框架窗口上下文来访问此对象。 li>In the same way, the current Customizer preview window is exposed as CustomizerDevTools.previewWindow.以同样的方式,当前的Customizer预览 window code>显示为 CustomizerDevTools.previewWindow code>。This is a shortcut for doing wp.customize.previewer.targetWindow.get(), and it has the added benefit of allowing the browser’s dev tools to provide auto-completion.这是执行 wp.customize.previewer.targetWindow.get() code>的快捷方式,它的附加好处是允许浏览器的开发工具提供自动完成功能。 li>
expanded code>状态。 li>Logs out messages sent and received by the pane (controls) and preview.注销由窗格(控件)发送和接收的消息并进行预览。 li>Logs out dynamic addition and removal of panels, sections, controls, partials, and settings (after the ready event triggers).注销动态添加和删除面板,节,控件,部分和设置(在 ready code>事件触发器之后)。 li>The wp.customize object from the Customizer preview is made persistently available from the parent frame via CustomizerDevTools.previewCustomize.通过 CustomizerDevTools.previewCustomize code>可以从父框架中永久使用Customizer预览中的 wp.customize code>对象。This reference is updated whenever the preview refreshes, so you no longer have to change the frame window context to access this object.每当预览刷新时,此引用都会更新,因此您不再需要更改框架窗口上下文来访问此对象。 li>In the same way, the current Customizer preview window is exposed as CustomizerDevTools.previewWindow.以同样的方式,当前的Customizer预览 window code>显示为 CustomizerDevTools.previewWindow code>。This is a shortcut for doing wp.customize.previewer.targetWindow.get(), and it has the added benefit of allowing the browser’s dev tools to provide auto-completion.这是执行 wp.customize.previewer.targetWindow.get() code>的快捷方式,它的附加好处是允许浏览器的开发工具提供自动完成功能。 li>
ready
ready code>事件触发器之后)。 li>The wp.customize object from the Customizer preview is made persistently available from the parent frame via CustomizerDevTools.previewCustomize.通过 CustomizerDevTools.previewCustomize code>可以从父框架中永久使用Customizer预览中的 wp.customize code>对象。This reference is updated whenever the preview refreshes, so you no longer have to change the frame window context to access this object.每当预览刷新时,此引用都会更新,因此您不再需要更改框架窗口上下文来访问此对象。 li>In the same way, the current Customizer preview window is exposed as CustomizerDevTools.previewWindow.以同样的方式,当前的Customizer预览 window code>显示为 CustomizerDevTools.previewWindow code>。This is a shortcut for doing wp.customize.previewer.targetWindow.get(), and it has the added benefit of allowing the browser’s dev tools to provide auto-completion.这是执行 wp.customize.previewer.targetWindow.get() code>的快捷方式,它的附加好处是允许浏览器的开发工具提供自动完成功能。 li>
CustomizerDevTools.previewCustomize
CustomizerDevTools.previewCustomize code>可以从父框架中永久使用Customizer预览中的 wp.customize code>对象。This reference is updated whenever the preview refreshes, so you no longer have to change the frame window context to access this object.
wp.customize code>对象。This reference is updated whenever the preview refreshes, so you no longer have to change the frame window context to access this object.
This reference is updated whenever the preview refreshes, so you no longer have to change the frame window context to access this object.
每当预览刷新时,此引用都会更新,因此您不再需要更改框架窗口上下文来访问此对象。 li>
window
CustomizerDevTools.previewWindow
window code>显示为 CustomizerDevTools.previewWindow code>。This is a shortcut for doing wp.customize.previewer.targetWindow.get(), and it has the added benefit of allowing the browser’s dev tools to provide auto-completion.
CustomizerDevTools.previewWindow code>。This is a shortcut for doing wp.customize.previewer.targetWindow.get(), and it has the added benefit of allowing the browser’s dev tools to provide auto-completion.
This is a shortcut for doing wp.customize.previewer.targetWindow.get(), and it has the added benefit of allowing the browser’s dev tools to provide auto-completion.
wp.customize.previewer.targetWindow.get()
这是执行 wp.customize.previewer.targetWindow.get() code>的快捷方式,它的附加好处是允许浏览器的开发工具提供自动完成功能。 li>
wp.customize.previewer.targetWindow.get() code>的快捷方式,它的附加好处是允许浏览器的开发工具提供自动完成功能。 li>
ul>
Make sure you also install the Customizer Browser History and 确保您还安装了定制浏览器历史记录和"https://github.com/xwp/wp-customize-snapshots" rel="nofollow">Customize Snapshots plugins so that you can reload the browser window and have the Customizer load with the same state as before you“ https://github.com/xwp/wp-customize-snapshots” rel =“ nofollow”>自定义快照插件,以便您可以重新加载浏览器窗口并以与之前相同的状态加载Customizer
确保您还安装了定制浏览器历史记录和"https://github.com/xwp/wp-customize-snapshots" rel="nofollow">Customize Snapshots plugins so that you can reload the browser window and have the Customizer load with the same state as before you
"https://github.com/xwp/wp-customize-snapshots" rel="nofollow">Customize Snapshots
“ https://github.com/xwp/wp-customize-snapshots” rel =“ nofollow”>自定义快照
reloaded, including the persistence of the focused panel, section, control, the previewed URL, the scroll position in the preview, and which device is being previewed.
重新加载,包括集中的面板,部分,控件的持久性,预览的URL,预览中的滚动位置以及正在预览的设备。 p>
Requires PHP≥5.3.
需要PHP≥5.3。 p>
原文出处:http://www.sanshu.cn/a/9927.html
群主管理都是支付大佬