🔥 Black Friday Sale: Get 65% OFF Any PageForge Pro Plan! Use code BF65 Claim Offer →
Konto Get it free
Simple Hook Widget icon
Möglicherweise aufgegeben Tested up to 3.3.2 #1 in custom hook

Simple Hook Widget

This widget allows the user to insert a hook, with a name of their choosing, in any sidebar.

Aktive Installationen10+10+ Stufe
Downloads · 30d38▼ -7.3% vs prev. 30d
Wertung—0 Bewertungen
Gesundheits-Score23/100In Gefahr
Downloads aller Zeiten4.2KSince Dec 2011
Unterstützung gelöst—Keine aktuellen Threads
erfordertWP 2.8PHP ANY
Downloads · 7d7▼ -36.4% week over week
Unser Urteil

Betrachten Sie eine Alternative

Simple Hook Widget shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites and was last updated 15 years ago, and scores 23/100 on our health check.

  • Kleine Benutzerbasis (10+ aktive Installationen)
  • Bisher sehr wenige Bewertungen
  • No update in 14 years
  • Only tested up to WordPress 3.3 (latest is 7.1)

Tägliche Downloads

258Aug 31Oct 14Nov 28
Gestern0
Täglicher Durchschnitt (1 Jahr)2
Spitzentag1215. Mai 2026
Letzte 12 Monate634

Download-Spitzen folgen normalerweise einer neuen Version - jede Website, die automatisch aktualisiert wird, gilt als Download.

Ranglisten

Where Simple Hook Widget stands today

WordPress.org Ranglisten suchen

Live-Position in der Plugin-Suche, Top 100
StichwortPositionKonkurrierende PluginsKategorie
custom hook >100 7,946 Best custom hook plugins →
development >100 8,383 Best development plugins →
Hook >100 10,000 Best Hook plugins →
sidebar >100 10,000 Best sidebar plugins →
widget >100 10,000 Best widget plugins →

Versionsübernahme

Anteil aktiver Sites pro Release.

  • 2100.0%

About Simple Hook Widget

From the official readme · v2

Beschreibung

This widget allows the user to insert a hook, with a name of their choosing, in any sidebar.

The hook can be anything, an existing hook from the WordPress Core, a plugin, a theme, or something you’ve come up with on the fly. Once the hook exists, your plugins, your theme, or the WordPress Core to make something happen with that hook.

This can be used in conjunction with other more complex plugins, to allow you to trigger a hook from the sidebar (yes, that is intentionally vague). It can also serve as a quick alternative to making very simple widgets tied to code from a theme. Say you have a chunk of code which already exists on your site, you’d like to also have it placed in a sidebar, but don’t want to make a widget out of it (since its entirely theme-centric). You could simply hook this chunk of code to a custom hook and use the Simple Hook Widget to place that custom hook in the sidebar.

This is clearly not the best method of widget development, but there may be times where such on option is useful to a developer in a pinch.

Update 2.0

  • New filter which allows developers to specify what hooks are available to choose from.

Warning: Use this plugin with care. If you are not a developer and don’t know what ‘hooks’ are, this plugin is not for you. This plugin will allow you to enter ANY hook, and will run it in the sidebar – that includes core WordPress loaded with actions that could result in problems for your site.

Developer Notes

IMPORTANT:

If the ‘simple-hook-list’ is not filtered, the Simple Hook Widget will not show a drop down in the widget interface, but instead it will provide an empty text field allowing a user to enter ANY hook they like.

Using the hooks

Here is a simple example of how to use a hook used in the Simple Hook Widget. Its just like using any other hook in WordPress. Remember, you can do whatever you want here, you just need to make sure the hook used in the add_action() is the same as the hook name selected in a particular widget.

Example #1:

function simple_hook_super_example() {
    echo "This is my super simple hook widget";
}
add_action('example-hook-name-one', 'simple_hook_super_example');


You can create any number of different widgets by simply writing a function, and adding it as an action to a hook. Here is a similar one as the first, but this is here to illustrate the point.

Example #2:

function simple_hook_awesome_example() {

//Do whatever you want your 'widget' to do, when the 'example-hook-name-two' hook is chosen.
echo "This is my awesome simple hook widget";

}
add_action(‘example-hook-name-two’, ‘simple_hook_awesome_example’);

Creating dropdown of Pre-determined hooks

Filter: ‘simple-hook-list’

Version 2.0 of the Simple Hook Widget includes the 'simple-hook-list' filter which allows developers to specify a set of hooks which can be selected from the widgets admin panel.

The function you create should return an associative array where the index is the actual hook's name, and the value is the text that will represent it in the drop down on the widgets panel. 

Example:

function simple_hook_example_filter($hooks){
$hooks = array (
‘example-hook-name-one’ => ‘Awesome Widget’,
‘example-hook-name-two’ => ‘Simple Widget’
);
return $hooks;
}
add_filter(‘simple-hook-list’, ‘simple_hook_example_filter’);

IMPORTANT:

If the ‘simple-hook-list’ is not filtered, the Simple Hook Widget will not show a drop down in the widget interface, but instead it will provide an empty text field allowing a user to enter ANY hook they like.

Hook: simple-hook-default

This hook allows developers provide a default value for the Simple Hook widget. By default, the default value for the hook, is an empty string.
Example:

function simple_hook_example_default($default_hook){
return ‘example-hook-name-two’;
}
`
Note: If filtering ‘simple-hook-list’ to create a drop down, the default value must match one of the keys in the array passed to the filter – otherwise this default will do nothing.

Hook: simplehookupdate_

This widget also contains an internal hook, which will be your hook, prefixed with simplehookupdate_. So if you use this plugin to create a hook name ‘testhook’, the widget, aside from creating the ‘testhook’ in the chosen sidebar location, will also create a hook called ‘simplehookupdate_testhook’. This hook occurs within the update method of the WP_Widget class, immediately before $instance is returned.

Not sure how useful this is, but a friend suggested it, so here is it.

Installation

  1. Upload plugin-name.php in das /wp-content/plugins/-Verzeichnis
  2. Aktivieren Sie das Plugin über das „Plugins“-Menü in WordPress
  3. In the widgets interface, drag to desired location.
  4. Enter desired hook name or select one from the drop down menu (if there is one).
  5. Enjoy cake.

Änderungsprotokoll

New functionality!

2.0

  • New ‘simple-hook-list’ filter which allows developers to specify what hooks are available to choose from in the widget panel.
  • New ‘simple-hook-default’ filter which allows developers to specify a default value for Simple Hook Widget.

1.1.1

  • Fixed a packaging problem which made plugin activation fail

1.1

  • Changed the name of the update hook prefix from simplehook_ to simplehookupdate_

1.0

  • Initial commit

Vollständiges Änderungsprotokoll auf WordPress.org →

Für Entwickler

Ist das dein Plugin? Zeigen Sie die Zahlen.

Fügen Sie Ihrer Website, Docs oder GitHub Readme ein Live-Badge hinzu. Es wird von selbst aktualisiert - kein Konto erforderlich.

Aktiv installiert Badge Bewertungsabzeichen Gesundheits-Score-Abzeichen

Fragen und Antworten

Simple Hook Widget: quick answers

Gerade Antworten, gezogen von Live WordPress.org Daten.

Quelle: WordPress.org

Is Simple Hook Widget free?

Yes. Simple Hook Widget is free to download and use from the official WordPress.org plugin directory.

Is Simple Hook Widget safe to use in 2026?

Simple Hook Widget shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites and was last updated 15 years ago, and scores 23/100 on our health check.

How many websites use Simple Hook Widget?

Simple Hook Widget is active on 10+ WordPress websites and has been downloaded 4,245 times since it launched in December 2011. It was downloaded 38 times in the last 30 days.

Does Simple Hook Widget work with WordPress 7.1?

Simple Hook Widget is officially tested up to WordPress 3.3.2, while the latest release is 7.1.5. It may still work, but try it on a staging site first.

When was Simple Hook Widget last updated?

The latest version, 2, was released on March 15, 2012 (15 years ago).

Who makes Simple Hook Widget?

Simple Hook Widget is developed and maintained by Eddie Moya.

Angetrieben von PageForge

Eine Vorlage und eine Tabelle. Eine echte Seite für jede Suche.

PageForge Verwandelt jede Zeile eines CSV in eine WordPress-Seite mit eigenem Titel, URL, SEO Felder und Schema entworfen. Kostenlos auf WordPress.org.

  • CSV und XLSX, plus Google Sheets auf Beruf und Unternehmen
  • seinen eigenen Titel, URL, SEO Felder und Schema für jede Seite
  • Arbeitet mit dem Blockeditor, Elementor, Divi und Avada
  • Kostenlos auf WordPress.org, keine Kreditkarte

↑↓ bewegen↵ öffnen