开发者 | hearvox |
---|---|
更新时间 | 2018年2月21日 20:50 |
捐献地址: | 去捐款 |
PHP版本: | 3.5 及以上 |
WordPress版本: | 4.9.2 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
body_class()
in theme).class="post"
list (inserted by WordPress, requires post_class()
in theme).postscript
directory and content to the /wp-content/plugins/
directoryThe Settings > Postscript screen lists all available handles, those registered via the [wp_enqueue_scripts
hook])https://developer.wordpress.org/reference/hooks/wp_enqueue_scripts/} in your active theme and plugins and the defaults registered by WordPress itself.
You can add any registered script or stylesheet handle to the checkboxes in the Postscript meta box. The GitHub Dev Notes details on the inner workings of this plugin, including custom fields and taxonomies, transients, options, and filters.
Your Scripts and Styles: You can register your own CSS/JS file handles with the wp_register_script() and wp_register_style() functions. Default Scripts and Styles: WordPress auto-registers numerous styles and scripts via its core functions: wp_default_scripts() and wp_default_styles(). Each file gets its own unique handle: see the list of defaults.
Adding Thickbox to a post is an example of what this plugin does. WordPress ships with a modified ThickBox jQuery library, used to make modal lightbox windows. The add_thickbox() function enables this feature. When enabled, though, Thickbox's CSS and JS files load on every Post, whether the post needs it or not. This plugin improves site performance by enqueuing scripts only when specifically requested for an individual post, via the Postscript meta box. See the screenshots.
Postscript is now on GitHub. Pull Requests welcome.
This plugin is internationalized (default: English). Please contribute a translation in your language. The WordPress.org Polyglots Team maintains a comprehensive Translator’s Handbook. All text strings in this plugin are localized, following the guidelines of the Wordpress.org Plugin Handbook's Internationalization section.
This plugin was developed as part of a Reynolds Journalism Institute fellowship.