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

learn more… | top users | synonyms (2)

2
votes
0answers
80 views

Content hooks vs User hooks

This is more of a theory question than a question with a direct answer. I've been working with different actions for firing functions when a post is updated or deleted and when users are updated or ...
1
vote
0answers
31 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
63 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
68 views

How can I register a hook for all Custom Post Types that are published?

I'm developing a plugin. I want that when every Custom Post Type is published, a hook is called (where I send an email notification to the administrator). I know I can use: ...
1
vote
0answers
56 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
54 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
57 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
53 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
37 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
106 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
58 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
79 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
66 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
68 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
14 views

Removing WP-Login inputs

I'm building a passive captcha system for my WP sites, and I'm attempting to remove the inputs (username, password, submit) from my standard WP-Login page via php hooks; they'll be replaced via jQuery ...
0
votes
0answers
17 views

Stop a specific plugin from executing based on product id in cart

I am trying to stop a specific plugin from executing based on product id in cart. However i can't seem to get it running. There are a few places where i want the plugin to stop inserting its function. ...
0
votes
0answers
21 views

Filter WP_Query output before it is accessed (pre_get_posts)?

I have read Using pre_get_posts with WP_Query and I'm not sure where to go with it. I have a recent posts plugin which adds variables to WP_Query - one of which can be 'offset' posts. The problem is ...
0
votes
0answers
15 views

Autogenerated Title for Custom post type loses title when trashed/deleted

I am generating title for a custom post type using the following code. It takes the $fname, $mname, and $lname values and generates a title based on the post. This works fine for custom post creation ...
0
votes
0answers
14 views

What action is triggered when the plugin is installed?

What action is triggered when the plugin is installed? "wp_setup_theme" is other action :-(
0
votes
0answers
30 views

remove_filter right way

What is the right way to remove filter in condition? method 1 public function update_loop($query) { global $wp; if(!$query->is_main_query() || $query->is_admin) return; ...
0
votes
0answers
14 views

XML Imported Custom Posts

I have an xml feed populating a custom post type. I need the custom post type to add the first imported image as the featured image. I have come across the following function and adapted it: ...
0
votes
0answers
17 views

Accessing post_meta on save of new post

I am trying to get the value of a post_meta when the post is published. The problem is that all I can get is the post ID, but the post_meta must not yet be in the database when I make the query. I do ...
0
votes
0answers
15 views

Meta query not working with pre_get_posts

This works $q->set('meta_key', 'available-date_%_from'); $q->set('meta_value', '20140701'); This doesn't $q->set( 'meta_query', array( array( 'key' => 'available-date_%_from', ...
0
votes
0answers
26 views

Wordpress Unit Testing cleaning up hooks and filters

Using Wordpress' unit testing suite has been going quite well, and it's nice the WP_UnitTestCase takes care of cleaning up table data after each unit test. But one thing that doesn't seem to be ...
0
votes
0answers
12 views

Presetting the link of video attached to a Standard Post Format in a custom field

I am trying to create a function that presets the URL (of an attached video in a Standard Post Format) to a custom field when the post is created using a front-end form. (P.S.: All data inputted in ...
0
votes
0answers
11 views

Edit default action for profile_personal_options

Is there a way to edit the pre-existing action attached to the profile_personal_options hook that is built-in to WordPress?
0
votes
0answers
20 views

addaction hook cause redirection problem

I have added the hook in my wp functions: add_action('pa_taxname_edit_form_fields', 'woocom_edit_attribute_chk_field', 10, 2); function woocom_edit_attribute_chk_field($term, $taxonomy) { ...
0
votes
0answers
38 views

Wordpress admin WP_table_list show incorrectly

As the image above, my custom wp_list_table didn't show correctly. Code as below <?php if ( !class_exists( 'V2OMLVG_Video_Table' ) ) { class V2OMLVG_Video_Table extends WP_List_Table { ...
0
votes
0answers
58 views

External Script Using WP - Hooks / Actions Not Working?

I've researched this problem in depth, but still stumped. Simply stated, I have an external uploader script which loads WP. Yet I cannot seem to grab any of the actions/filters I've put into it. Why ...
0
votes
0answers
66 views

using media_handle_sideload() to add mp4 files to Media Library

For a site I'm building (for a client), I've written a shortcode, where the poster can enter [vine id="..."] followed by the ID of a Vine video. When the post is saved, my PHP functions will then go ...
0
votes
0answers
32 views

Expire a post with meta_value after two weeks

I am trying to use the below code to query for some posts and then change a meta_value in order to "expire" it after two weeks time. I can't get this to work and it's difficult to test since I can ...
0
votes
0answers
63 views

Wordpress upload file action hook

I have a custom post type called "Magazine" shown in the admin interface. Everytime a user uploads a file in the wp-admin to my custom post type "Magazine", I want to fire a hook because I have to ...
0
votes
0answers
65 views

post_content not parsed using save_post action hook

A site I'm building for a client has to be able to download Vine's to a server when they've been posted using a shortcode ([vine id="..."]). This works fine for my local install (it's a Multisite ...
0
votes
0answers
83 views

Post Rating System with wordpress

I'm using a Post Rating System with wordpress and jQuery, i followed this tutorial for that. ` jQuery(document).ready(function(){ jQuery("a.like:not('.voted')").live("click",function(){ ...
0
votes
0answers
80 views

Custom login errors and redirect

I am working on a custom login page in Wordpress and found these 2 functions for a redirect back to the custom login pages to show errors there and nog on the Wordpress default login page. The first ...
0
votes
0answers
23 views

adding access to a specific post in the wordpress admin left menu

I've added a custom post type on my wordpess called "Perso". here is the code : // Register Custom Post Type function custom_post_type() { $labels = array( 'name' => ...
0
votes
0answers
36 views

remove_action(“wp_ajax_function”, “function”); not working

I have the following code in a file called contact-form.php. The file lives here: wp-content/themes/NAMEOFTHEME/ (premium theme) function theme_contact_form() { // some code here (send mail when ...
0
votes
0answers
78 views

Adding custom Bulk Actions

I have been looking around for ways to add custom Bulk Actions to the categories page. Most of them say that it is impossible to do it in a clean way, because of the lack of a hook for this. Most of ...
0
votes
0answers
107 views

GET form action. Redirect to self

I'm writing filter for posts by category on author page. I send category name in $_GET array in this form: <form action="" accept-charset="UTF-8" method="get" id="form1"> <select ...
0
votes
0answers
63 views

Displaying Single Future Posts in a specific Category or Taxonomy

I want posts that are tagged with a certain term and scheduled to be posted some time in the future to be publicly available. So if I create a post, assign it a special term (category, tag, custom ...
0
votes
0answers
59 views

How would I remove an inline googleAPI font script in the the parent theme header.php?

Is there any way to remove the function call to the googlefontapi font in the parent header.php file besides copying the parent header.php file to the child theme and then overriding it and delete the ...
0
votes
0answers
13 views

Add_action not updating user_meta when trashing multiple checked posts

I have a point system to my wordpress theme. I've recently added a function that removes one point from the member if I remove their post. However, when I check and remove multiple posts in the ...
0
votes
0answers
50 views

OOP - add_action

I'm making a simple theme framework for personal use and I'm try to set up various options in a class. Basically, I want to use add_action within my class but the function doesn't seem to be firing ...
0
votes
0answers
76 views

Redirect to custom post type admin page after wp_trash_post

I currently have a custom post type (enquiries) with a custom metabox which displays the date(s) for that enquiry, these are saved as metakey key value pairs, there can be one or more. the metabox ...
0
votes
0answers
96 views

inline script : prettyPhoto setting deeplinking to false not working

This is suppose to be simple but I can not figure it out. I'm using WordPress prettyPhoto plugin for my project and I'm trying to set deeplinking to false (deeplinking:false). In the Chrome console, I ...
0
votes
0answers
37 views

how to perform wordpress bulk actions using table inherited from wordpress list table

In my plugin which shows a table of business listings from database, I wanted to add the option for bulk actions. Besides the checkboxes I displayed the control for bulk actions, but when I click ...
0
votes
0answers
55 views

Unsure how to add simple checkboxes that write to a small table to admin

I've been doing a lot of reading on the add_meta_boxes...but there's so much information that I'm confused about when to use them. I have a little plugin that writes out some checkboxes and then when ...
0
votes
0answers
24 views

Filter for modifying image on upload

So I'm working on building a new WordPress plugin for massive PNG compression, and I'm having a hard time finding the right filter to hook in to. I need to access the entire image so that I can open ...
0
votes
0answers
20 views

How can I update the role of a newly added user when displaying the registration form with a shortcode?

Basically I have a shortcode that includes a registration form(among other things). The custom form itself is also included on wp-login.php and user-new.php if the default role is set to ...
0
votes
0answers
52 views

Suppress the_content filter in a nested loop

I have some layout changes that are being applied to the_content. I need to do one of two things, but neither is working as expected... either: Pass data to the filter so that it knows if it is a ...