Linux 软件免费装
Banner图

OpenHook

开发者 BrazenlyGeek
更新时间 2023年9月29日 11:04
捐献地址: 去捐款
PHP版本: 4.1 及以上
WordPress版本: 6.3.1
版权: GPLv3 or later

标签

shortcode admin customization hooks HTML PHP ClassicPress Astra phpinfo Thesis Flat Headway K2 "Theme Hook Alliance" "custom code"

下载

2.0.2 1.1 2.0 2.0.1 2.1 2.3.2 3 3.1 3.2 3.2.1 3.3 3.3.1 3.3.2 3.4 4.0.1 4.1 4.2.0 4.2.1 4.3.0 4.0 4.3.1

详情介绍:

If you aren't altogether comfortable with editing PHP files to customize your site, OpenHook is for you! An increasing number of themes & plugins come equipped with a myriad of hooks — points within their code which can receive user customizations, known as actions — which can be customized from within your WordPress admin panel using OpenHook! OpenHook brings the world of hooks & actions to the mainstream, providing an easy to use admin interface in which you can customize your site without limit, whether you're using HTML/CSS/JavaScript or PHP! Features

安装:

After you have downloaded the file and extracted the thesis-openhook/ directory from the archive...
  1. Upload the entire thesis-openhook/ directory to the wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Visit Settings -> OpenHook and customize to your heart's content!
Alternatively, you can use WordPress' automatic plugin installer. Go ahead, it's easier!

屏幕截图:

  • How the Headway theme page of OpenHook looks. There is a toggle on the General page to choose to view all pages at once.
  • A snapshot of the shortcodes page.
  • How OpenBox appears on Thesis' box management screen.
  • An example of OpenBox in action in Thesis' skin editor.

升级注意事项:

4.2.0 If you are using OpenHook 2 or 3, you are strongly encouraged to update to take advantage of all of OpenHook's new features! 4.1.0 This long-overdue update adds support for the Flat theme as well as any theme supporting Theme Hook Alliance hooks while also fixing a few bugs and cleaning things up a little! For Thesis 2 users, OpenBox should now function properly! 4.0.0 Now providing support for the theme Headway as well as adding several custom shortcodes! Numerous more minor changes have been made, so dive in and check 'em out! 3.0.0 OpenHook 3 provides a leaner, cleaner interface for managing your customizations. If you are upgrading from 2.x.x, be sure to FIRST upgrade your options via Settings -> OpenHook; otherwise, you may find your customizations have vanished!

常见问题:

How does OpenBox work in Thesis 2.1.x?

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.

I upgraded from OpenHook 2.x.x; where did all of my customizations go?

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.

I don't use one of the supported themes; can I still use this plugin?

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.

Where can I get the supported themes?

What about the code in my theme's custom functions file?

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.

Why can only certain users on my site access OpenHook?

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).

What are the security risks involved in using OpenHook?

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.

Why is K2 included?

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.

更新日志:

4.3.1 4.3.0 4.2.1 4.2.0 4.1.0 4.0.1 4.0.0 3.4.0 3.3.1 3.3.0 3.2.1 3.2.0 3.1.0 3.0.0 2.3.2 2.3.1 2.3.0 2.2.5 2.2.4 2.2.3