开发者 | BrazenlyGeek |
---|---|
更新时间 | 2023年9月29日 11:04 |
捐献地址: | 去捐款 |
PHP版本: | 4.1 及以上 |
WordPress版本: | 6.3.1 |
版权: | GPLv3 or later |
theme_hook_before_meta_987
) in ANY theme or plugin that has ANY hooks, from WordPress' bare minimum hooks to hooks that are dynamically created and are as infinitely diverse as your site can be!phpinfo()
in the admin paneledit_themes
permission may access OpenHook or its features. If enabled by such a user, other users may use [email]
or [global]
shortcodes in their entries as well.thesis-openhook/
directory from the archive...
thesis-openhook/
directory to the wp-content/plugins/
directory.First, ensure you have enabled OpenBox in the Thesis 2.1.x "boxes" screen (OpenBox should be checkmarked and you'll need to press the save button). Second, visit the Thesis skin editor. Add instances of OpenBox from the boxes dropdown menu, and drag them into your skin template wherever you would like them to be. I recommend opening each instance of OpenBox (via the gear icon) and giving it a unique name so that they are not all "OpenBox." Finally, once you have saved your template, return to the regular admin panel and visit Thesis' skin content page. On this page, you'll be shown a list of all of the custom boxes, including OpenBoxes, you've added to your template, at which point you can edit them to your liking. Yes, this is convoluted, and for that I apologize; fortunately, it isn't my fault.
OpenHook 3 and newer does not automatically import pre-existing customizations. You will need to visit the OpenHook settings page accessible at Settings -> OpenHook; once there, you can use the "Upgrade from OpenHook 2" button to import your pre-existing customizations to the new schema. You'll then need to activate the Thesis & WordPress action groups as needed from the same settings page.
Of course! However, what you are able to do with OpenHook will be limited. Still, you will have access to WordPress' few public-facing hooks, the new shortcodes, and the phpinfo()
panel.
If you have already modified your theme's installation via functions.php
, custom_functions.php
, or some other similar file, you are welcome to port those changes into OpenHook to manage all of your changes in one place.
Note that your blog will use both your theme's custom functions and OpenHook, so the two are complementary.
Likewise, your theme's custom functions file will be processed after OpenHook, so you can override OpenHook via the custom functions file, if you need to.
Due to the powerful nature of OpenHook, access is restricted only to the highest level of users (i.e., those with the edit_themes
permission).
OpenHook is a powerful tool for customizing your site; however, with great power comes, ahem, great responsibility. You are able to use any (ANY!) PHP code within your OpenHook-managed customizations; any other administrators on your site with access to OpenHook can do the same. The freedom allowed means that database credentials could be displayed, your database could be deleted, or your entire site could be defaced. Therefore, while OpenHook certainly can be dangerous, if you have only trusted administrators on your site, you have nothing to worry about.
K2 is a pretty old WordPress theme -- an abandoned one, for all I can tell. However, it was the first theme that ever had a "hooks" plugin made for it -- K2 Hook Up, which the first version of OpenHook was based upon. The K2 theme is included to honor its place in WordPress history. OpenHook now allows access to all of its hooks, including one which K2 Hook Up didn't! I would also love to see a theme developer pick up K2 and update it for today's users. It's a great theme that shouldn't fade away completely.
load_plugin_textdomain()
changed to properly reference the /languages
directory (thanks pm1932)thesis-openhook
to conform to WordPress' guideline that this namespace match OpenHook's slug in the plugins repository (see https://make.wordpress.org/plugins/2015/09/01/plugin-translations-on-wordpress-org/)comment_form
OpenHook::upgrade()
's "is an upgraded needed?" checks now actually work, preventing upgrade code from processing on every page loadWP_DEBUG
notices taken care of