The init
hook is triggered a little earlier than the admin_init
. Between them is triggered wp_loaded
and few hooks related to updating the DB.
The init
hook fires when WP is finished loading (viewer-facing and administration side).
The admin_init
hook fires on administration side only (/wp-admin/*
), therefore is triggered also by front- and back-end ajax requests (/wp-admin/admin-ajax.php
) and POST handler (/wp-admin/admin-post.php
).
Related Posts:
- Passing a parameter to filter and action functions
- Get a list of all registered actions
- How can I edit post data before it is saved?
- Registering Class methods as hook callbacks
- How to customize woocommerce related products? [closed]
- Why does wp_enqueue_style() in plugin not load stylesheet?
- Customizing subject in comment notification e-mails
- Edit plugin without hooks in functions.php
- How can I log a user out of WordPress before the page loads?
- WP showing “warning: call_user_func_array()”, What to do?
- Modify featured image URL at runtime
- Seeking clarification on page request life-cycle
- Which hook should be used to validate custom form fields on the login form?
- Hook (upgrader_process_complete) running moment
- Pass A Value From Outside To A Plugin Variable
- Built in admin ajax hooks?
- How to filter content post only on save
- Filter or action hook to insert content on admin pages before tag
- plugin_action_links_{$plugin_file} hook not in the main plugin file
- How to find out what blocks are added by a plugin
- merging an array to an existing array using add_filter
- template_redirect not being called when using ajax
- what the hook for displaying course list page for learndash plugin? [closed]
- How to add rewrite rules and pagination to retrieve attachments files?
- Plugin custom Action Hook not working
- What are the benefit in adding hook in the init() hook?
- What are ideal hooks to call register_sidebars?
- AddFilter option_active_plugins is executed 6 times. Why?
- Hook to generate a dynamic sitemap with “All in One SEO Pack” Plugin
- How to correctly detect accessing wp-content/uploads?
- Deactivate Plugin on Theme Switch
- Where to hook my plugin’s action
- How to pull code snippet from functionality plugin?
- How do action and filter hooks understand where to look for the core function that we hooked our function to them
- Add custom message to the plugins page of WordPress
- Hooking in to replace the Sidebar/Widget areas
- How to get all of the activate_plugin action parameters?
- woocommerce_package_rates not fired when wordpress woocommerce accessed as non ajax
- Trigger Elementor Popup via code [closed]
- Filtering WooCommerce Orders by Category
- do_action() hook into load-(page)
- Howto check version of another plugin and then add a submenu page to it
- Why do plugins often ask to add in to templates?
- How to get menu location in wp_update_nav_menu hook
- Turning on output buffering in a wordpress plugin
- Are there action hooks for comments?
- How to use template_include hook with form submission?
- WooCommerce: after install hook
- How to use filter to disable adding a product to wishlist?
- wp_trash_post hook – problem with page updating if using wp_die
- Function added to hook “new_to_publish” not executing – custom plugin
- is it possible to hook every page style?
- Comment Approve – Add custom function when comment is approved
- Add action to custom Function
- Hook on creating a menu entry?
- Prevent plug-in scripts on a specific template?
- using wp_footer hook in a plugin
- Plugin Hook When New Author Added
- Use a hook or filter, or overwrite this Gamipress function?
- WordPress Custom Hook with Class method
- Fail on admin_enqueue_scripts when I try it to upload a CSS file to my WordPress Plugin
- How to remove a hook written with $this?
- Is there a hook similar to “save_post” which only fires AFTER the post is completely published?
- update_option_{$option} not working (do function after options are saved)
- Alternative Hook to the_content for Changing Background Color
- Unpublished Pages Failing To Appear On Custom Path
- add a hook of Woocommerce to a plugin but it only shows and doesn’t function properly
- save_post hook partly firing in update post
- ACF Fields are not showing up on Homepage
- Hooking into the HTML header container
- Hide WordPress Site URL from Source Code
- Show post object of any page in frontend
- When/where would want to attach other classes to the base class in a WordPress plugin?
- Plugin function in child theme
- Edit plugin’s HTML output with Hooks
- Use action, filter, or hook to append HTML to WordPress plugin function
- Passing function into add_action always returns the first argument
- Hook to display element as product on category page
- Is it possible to disable a theme programmatically?
- {status}_{post_type} does not run correctly?
- Identify if the_post hook is being called from the admin post list
- plugin not hooking to my custom hook
- Why can’t I shove an instance of a class into a variable from a do_action hook?
- Creating Custom Hook for my plugin
- Passing a parameter to filter and action functions
- WordPress hook source
- Modify a plugin’s content
- Manually return false for function_exists
- How to `remove_action` from plugin
- Plugin hook breaks new WP 4.0 media library grid view?
- Plugin Hook: Get posts
- Transition Post status not working
- functions.php conditional output for a single plugin
- How to make plugin work in each template in wordpress
- OOP Plugin: Where should I place the action hooks in the class?
- WordPress Hooks : Where to place callbacks that repetitively yield the same effect?
- How to Add Extra Text In WordPress Title Before Post Publish
- Suitable hook when creating, updating and deleting posts programmatically
- Change social icon in twenty twenty three theme
- is_user_logged_in() undefined at shutdown in plugin context