A name for an event that is executed at specific points throughout the WordPress core.

learn more… | top users | synonyms (2)

2
votes
0answers
78 views

action hooks returning old category instead of new category

With some help I created a WP Action to send an email to the author of a post (custom post type) when the category has been changed. This works ok, except that the function is returning the previous ...
2
votes
0answers
52 views

How can I invoke an action after a CiviCRM triggering event?

If I want to have a certain action taken after a CiviCRM 'trigger', what is the best approach? I'm a Drupal developer used to using Drupal workflows on CiviCRM actions, and I am unfamiliar with ...
2
votes
0answers
140 views

Auto Load Plugin Hooks inside Must Use Plugin

I am creating a custom MU plugin to run on a multi-site network. I am working on a function that will dynamically include files containing additional action and filter hooks based on the active ...
1
vote
0answers
28 views

add_action shortcut?

I think in PHP 5.4 or above (don't remember the exact version), instead of writing: function some_function() { } add_action( 'init', 'some_function' ); One can pass an anonymous function: ...
1
vote
0answers
20 views

Redux callback action

I'm very new with Redux. I don't know how to show and hide a textarea using switch (without saving). When my switch turns on, the text input displays and when it turns off, the input hides itself. I ...
1
vote
0answers
34 views

Using pre_get_posts to Filter Posts

I'm trying to filter archive_research.php to show only the research with status=current. In functions.php: add_action( 'pre_get_posts', 'only_current' ); function only_current( $query ) { if ( ...
1
vote
0answers
58 views

Comment search plugin

I want to develop a plugin which places a search input field above the first comment on the post pages, filters the comments below that post, and only shows the comments which include the string that ...
1
vote
0answers
92 views

load_plugin_textdomain doestn't work with add_action plugins_loaded

I am trying to load localization for my plugin. There is directory called languages in my plugin folder with .po and .mo files inside of it. I have the following code in the plugin main file: ...
1
vote
0answers
44 views

How to get all the predefined do_action() calls from an active theme

To hook my plugin content into anywhere, suppose I offered the theme developers to create their own hooks with a prefix (pre_) anywhere in their theme - the rest of the hook is unknown to me. So what ...
1
vote
0answers
69 views

Theme elements not translating

Ive got a theme that is set-up for translating but didn't come with any translations. I used poedit to automatically detect the strings, and subsequently translated it in full. However certain ...
1
vote
0answers
335 views

Having an add_action( 'user_new_form',)

I am using the following action; add_action( 'user_new_form', 'epx_add_user_form_to_admin_area',489); function epx_add_user_form_to_admin_area($current){ $current .= 'this is a test'; echo ...
1
vote
0answers
194 views

Add custom buttons with custom actions in Edit Post screen in WordPress?

I am creating something for a client and I have a Class that I created with a Custom Post Type called 'PuSH Feeds' and when the user adds a new post and publishes it they can then click on one of two ...
1
vote
0answers
47 views

Multiple Loops Meta Data

I am now trying to figure out how to create the functions/ loops to pull my data from custom post types. I have two post types(keys): And I need to pull the data from both to run my functions. ...
1
vote
0answers
182 views

How to customize the “Insert/edit link” popup box?

is there a way to customize the "Insert/edit link" popup box in the editor so that it does something like this: Have a checkbox that says "Insert affiliate tag at the end of link" If the checkbox is ...
1
vote
0answers
113 views

I have 2 plugins using the same wp_login action hook and one is not working

so this is after a few hours investigating, I have s2member plugin and a custom plugin what happens is they are both using wp_login hook in this manner, s2member: add_action("wp_login", ...
1
vote
0answers
69 views

Issue understanding and using WordPress filters and actions

I have a custom WordPress plugin that I have developed. The plugin is a widget bundle containing a bunch of custom widgets. The scenerio The plugin allows for custom css styles through creating a ...
1
vote
0answers
70 views

How to load script-related styles automatically?

Scenario: It is common that a JS dependency is bundled with a style file to work properly (just think about your favorite slideshow jQuery plugin). AFAIK, in this situation, the script and style have ...
1
vote
0answers
62 views

Alternative to the filter comment_reply_link

I'm making a plugin and need to add a link to every comment on the front-end. I've used the filter comment_reply_link but that filter doesn't work when we're on the lowest level of threaded comments ...
1
vote
0answers
44 views

Hooks are not being removed in child theme

I have a hook file: function load_admin_package(){ do_action('load_admin_package'); } /* * ----------------------------------- * Define hooks bellow * ----------------------------------- */ ...
1
vote
0answers
117 views

Set static page/post from another blog on same network

I have a multisite project and have a small problem with static front page/post. In general i am looking for a way to choose a static page/post out of the whole network on my main blog. Now i'm not ...
1
vote
0answers
71 views

How to prevent further updates of custom meta when using actions to set one meta based on another

I'm using rilwis' Meta Box plugin (see https://github.com/rilwis/meta-box) to add custom meta boxes to a custom post type. I then want to populate one piece of meta data based on the value of ...
1
vote
0answers
99 views

Copy post to separate database with “add_action(…)”

I'm basically trying to have a copy of a post be sent to another database's table when it's published. I've gotten it to add a new row in the new table, with my own static arguments, but I'm not sure ...
1
vote
0answers
74 views

Submit custom form from post content and execute in plugin

I have prepared custom form (quiz plugin) with embedding in custom posts via {{QUIZ_ID}} placeholder. My form is displayed in post correctly but bigger problem is what form action should I create (and ...
1
vote
0answers
71 views

Selectively applying action based on role

I've added an action to my functions.php file that forces a plugin (Content Scheduler) to act on posts, even when it wasn't explicitly enabled by the person writing the post. I've got that working, ...
0
votes
0answers
9 views

Building a request processor for multi-page forms, etc using $_GET requests

Good day, What I'm trying to accomplish in a semi-elegant way today is building a multi-step form type thing. Essentially, I'm trying to rewrite the page based on a $_GET request. Like, say, it's ...
0
votes
0answers
19 views

How do I get the full details of a registered/enqueued script?

I'm trying to get the details (such as src, in_footer etc) of enqueued/registered scripts. For example: add_action('init', function() { global $wp_scripts; var_dump($wp_scripts->queue); ...
0
votes
0answers
26 views

Filters, priority when run after plugins_loaded

in my main plugin I filter the_content to add rich snippet, something like this: add_filter('the_content', 'add_schema'); function add_schema($content) { $schema=NULL; //To avoid undefined ...
0
votes
0answers
16 views

Get Custom Post Type posts on normal edit-posts and pass to TinyMCE

I am following a tutorial for adding a dropdown list in tinyMCE editor. In the end I would like to have a Select list similar like it is in this image , but populated by post titles from Custom Post ...
0
votes
0answers
15 views

How to add new tab and data in Wordpress Users section

I have to add new tab and new data in wordpress users. Please see the image below. The points tab came from the plugin mycred but i don't know what was used. What I think was it was done using: ...
0
votes
0answers
43 views

Why a class property becomes empty?

I have a class with a private property/variable named $postID that I can pass successfully (this was tested) to every function within this class except one named handleForm(). When it is passed to ...
0
votes
0answers
38 views

Custom Message with Order status from WooCommerce Payment Gateway Callback to Order Thank You Page

I would like to pass on the custom message to order-received page in woocommerce. Here how i currently handle the callback from payment gateway if ( isset( $_REQUEST[ 'callback' ] ) { ...
0
votes
0answers
39 views

On WP 4.4, how to get the post id on comment_post hook

Since WP 4.4, seems like is not possible anymore to use get_the_ID() or the_ID() when hooking on comment_post action. How can I get the post_id when a new comment is saved?
0
votes
0answers
18 views

Adding a taxonomy filter

I'm am attempting to add a custom taxonomy filter. I have partially achieved this, I have a dropdown menu that displays all of the desired terms. However when I actually attempt to filter on these ...
0
votes
0answers
15 views

Is there any hooks or filters to detect an action after user upload video to AWS (Amazon Web Service)?

I am using the plug-in AWS and offloads3 to upload video to AWS, however, I would like to find a hook or filter to detect a state when after user uploaded video/image successfully to Amazon web ...
0
votes
0answers
29 views

Is it bad practice to use $_POST['post_type'] in an action hooked on save_post?

In a custom plugin I wrote an action hooked on save_post that Only needs to fire when a particular Custom Post Type is modified Sometimes uses wp_insert_post to add a post of a second Custom Post ...
0
votes
0answers
31 views

Custom button on admin page doesn't trigger click event

I created a custom button on the "users" admin page. I have a script (loaded correctly) which should register the button click, but it doesn't. I followed an example where they hooked the ...
0
votes
0answers
18 views

Add action after function defined in plugin

I'm trying to write my second ever plugin (my first was a derivative of Hello Dolly) and I have a function that does something, however my issue is that I don't know what action to use to call my ...
0
votes
0answers
11 views

How to trigger an email when a posts metadata has been updated?

I'm really struggling on this one, so I appreciate the help from all of you guys/gals. I've built a progress bar type of application for a client. The basic setup is that each project (custom post ...
0
votes
0answers
37 views

Access Action Hook from Child Class in External Plugin Class

I am attempting to access an action hook that is declared in a plugin's child class. The plugin uses a singleton instantiation pattern: class WC_Freshdesk { protected static $instance = null; ...
0
votes
0answers
24 views

Add info to plugin list view on WP admin

I'm writing a plugin, and want to add some custom info to the plugin list view on the wordpress backend. Like, here: [] Is there an action or a hook I can use, I tried searching for it but couldn't ...
0
votes
0answers
23 views

Why is this require statement not working?

I am faced with this strange issue when the script loads it gives me an error: [04-Oct-2015 18:36:04 UTC] PHP Warning: require(../main/otherfile.php): failed to open stream: No such file or ...
0
votes
0answers
18 views

Hook To Get All Posts Deleted

I've added an which makes a call to an external service every time a post is deleted. However, it's on the delete_post hook, which works fine when I delete a single post, but if multiple posts are ...
0
votes
0answers
15 views

Store Variable to be used Across Admin All Post Page

In the main taxonomy admin page (All page, All post, WooCommerce Orders, etc.) I am looking to store a variable to be stored for the page and then be used by a filter for each individual item row. ...
0
votes
0answers
41 views

WordPress registration: checking external database to see if name/email exists, then show error message

During registration (creating a new user account), in addition to checking the wordpress database, to see if user name or email already exist, I want to also check an external database. My code ...
0
votes
0answers
11 views

What Will Happen If I do This Hook-ing Pattern?

I am creating a custom hook inside a shortcode like this: do_action("my_custom_hook", $param_1, $param_2, $param_3); I then creating a file containing a class and hooks like the following: class ...
0
votes
0answers
45 views

Execute function after creating new custom post type

I have a function: function add_editor_styles() { global $post; $post_type = get_post_type(); $editor_style = get_template_directory_uri(). '/css/editor-style-' . $post_type . '.css'; ...
0
votes
0answers
14 views

Why is wp_set_comment_status not firing and executing my function?

I would like to send an email to all users on a WordPress blog that are registered and have a specific user custom field set. This email should be sent whenever a new comment is published. Here is ...
0
votes
0answers
42 views

Quick Edit And Edit Actions

I'm using this code. lastpostdate is my function in project. add_action('save_post', 'lastpostdate'); It's working in mysite/wp-admin/post.php but not working in mysite/wp-admin/edit.php with quick ...
0
votes
0answers
29 views

Adapting functions from Genesis theme

I am trying to adapt a tutorial based on the Genesis theme to the Bones starter theme, but am battling with the following functions: add_action( 'genesis_entry_header', 'tsm_do_acf_form_edit_toggle', ...
0
votes
0answers
29 views

Event fired when file attached to a post?

I am using a Plugin called Attachments which allows you to attach any number of files which each have there own defines meta data into a post. Adding new files uses the WP Media Library shown below. ...