Scripts Organizer. Visual Studio Code editor inside WordPress

Monaco Editor WordPress Autocomplete for hooks and actions.

With the latest release we shipped Autocomplete for all WordPress actions & filters & parameters.

We are using native VS autocomplete made by Automatic. Visit WordPress Hooks Intellisense for VS Code Extension. With using their code we can be easy up to date every WordPress core updates and changes.

With latest update we can play the “difference game” where we compared same commands for Visual Studio and Scripts Organizer.

Action, Hooks

screenshot 2023 01 30 at 15.17.34

WordPress Hooks are a way to modify the behavior of WordPress themes and plugins. There are two types of hooks: actions and filters. Actions allow you to add or remove code at specific points in the WordPress execution process. Filters allow you to modify content before it is displayed. Hooks allow you to modify the core code of WordPress without having to edit it directly, making it easier to maintain compatibility with future updates.

We have added list of most used one:

  • muplugins_loaded
  • plugins_loaded
  • setup_theme
  • after_setup_theme
  • init
  • wp_loaded
  • wp_head
  • wp_footer
  • admin_head
  • admin_footer
  • wp_body_open

muplugins_loaded

is a WordPress action hook that is triggered after Must-Use plugins (MU plugins) have been loaded. MU plugins are a special type of plugins that are loaded before regular plugins and are not affected by actions such as “deactivate” or “delete.” This hook provides a way for MU plugins to perform actions or run code once they have been loaded.

plugins_loaded

is a WordPress action hook that is triggered once all plugins have been loaded and registered. This hook provides a way for plugins to perform actions or run code once they have been loaded and activated. It is commonly used to load plugin translations, setup plugin options, or initiate any plugin-specific functionality.

setup_theme

is a WordPress action hook that is triggered after the active theme’s functions.php file has been loaded but before any template files have been included. This hook provides a way for themes to perform setup tasks such as registering support for various WordPress features (e.g. post thumbnails, custom headers, etc.), enqueueing scripts and styles, or defining custom image sizes.

after_setup_theme

is a WordPress action hook that is triggered after the active theme’s setup has been completed. This hook provides a way for themes or plugins to perform additional setup tasks that may be dependent on the theme’s setup, such as registering custom post types, taxonomies, or sidebars. It is also commonly used to load theme translations or to perform any other theme-specific functionality that needs to be executed after the theme’s setup is complete.

init

is a WordPress action hook that is triggered after WordPress has finished loading but before any headers are sent. This hook provides a way for plugins or themes to perform initialization tasks such as registering post types, taxonomies, shortcodes, or meta boxes. It is also commonly used to setup rewrite rules or to perform any other plugin- or theme-specific functionality that needs to be executed early in the WordPress execution process.

wp_loaded

is a WordPress action hook that is triggered once WordPress, all plugins, and the theme have finished loading. This hook provides a way for plugins or themes to perform any final tasks that may depend on all other parts of WordPress being fully loaded. It is often used for tasks such as setting up custom rewrite rules, adding custom query variables, or performing any other plugin- or theme-specific functionality that needs to be executed once all other parts of WordPress are fully loaded.

wp_head

is a WordPress action hook that is triggered in the head section of a WordPress theme’s HTML document. This hook provides a way for plugins or themes to add or remove code to the head section of the document, such as meta tags, stylesheets, or scripts. It is commonly used to add custom styles, scripts, or other elements that need to be included in the head section of the document.

wp_footer

is a WordPress action hook that is triggered in the footer section of a WordPress theme’s HTML document, just before the closing </body> tag. This hook provides a way for plugins or themes to add or remove code to the footer section of the document, such as scripts, analytics tracking code, or other custom elements. It is commonly used to add custom scripts, tracking code, or other elements that need to be included in the footer section of the document.

admin_head

is a WordPress action hook that is triggered in the head section of the WordPress admin area. This hook provides a way for plugins or themes to add or remove code to the head section of the WordPress admin, such as stylesheets, scripts, or custom meta tags. It is commonly used to add custom styles, scripts, or other elements that are specific to the WordPress admin area.

admin_footer

is a WordPress action hook that is triggered in the footer section of the WordPress admin area, just before the closing </body> tag. This hook provides a way for plugins or themes to add or remove code to the footer section of the WordPress admin, such as scripts, analytics tracking code, or other custom elements. It is commonly used to add custom scripts, tracking code, or other elements that are specific to the WordPress admin area.

wp_body_open

is a WordPress action hook that is triggered immediately after the opening <body> tag in a WordPress theme’s HTML document. This hook provides a way for themes or plugins to add code immediately after the opening <body> tag, such as custom tracking scripts or other elements. It was introduced in WordPress 5.2 as a replacement for the now-deprecated body_open hook.

Priority

Priority is a parameter in WordPress action hooks and filters that determines the order in which functions attached to the hook or filter will be executed. Functions with a lower priority value will be executed before functions with a higher priority value. If two functions have the same priority value, they will be executed in the order in which they were added to the hook or filter.

The priority value can be an integer or a string, with integers being the most common. A priority value of 10 is a common default value for many hooks and filters. Functions attached to hooks and filters can be given a priority value when they are added using the add_action or add_filter functions.

In WordPress, there is no specific maximum value for the priority parameter in action hooks and filters. The priority value can be any integer, positive or negative. However, higher values may cause the function to be executed later in the process, while lower values may cause the function to be executed earlier in the process. It is important to choose a priority value that appropriately balances the timing of the function’s execution with the order in which other functions attached to the same hook or filter are executed.