Method by which plugins and themes extend core WordPress functionality.

learn more… | top users | synonyms

2
votes
0answers
36 views

How to hook into unregistering a widget instance?

I would like to hook into a widget instance after it is removed from a sidebar panel on the Appearances -> Widgets admin page. So if the instance was an active widget and then removed, I would like ...
2
votes
0answers
116 views

Featured image upload finished hook

I'm looking for a way to hook into the process of uploading a featured image. Ideally I would want to be able to do some stuff right when the upload has finished, before the thumbnails are generated. ...
1
vote
0answers
44 views

template_redirect or admin-ajax.php?

My plugin needs to be reachable by the public and accept query vars. When called, it will run some backend db tasks, call a 3rd party API and sometimes redirect. Previously, I was using ...
1
vote
0answers
21 views

Rewrite rule for page with plugin shortcode

I created a plugin to display a list of real estate properties on a page. The list is embedded into a custom page as a shortcode: [real_estate_list status="1"] The list is loaded from an external ...
1
vote
0answers
23 views

wp.media add context

I have wp.media frame on my plugin to upload doc, docx file. I am filtering the uploaded file. If uploaded other than supported file, it will display this error I am filtering it at ...
1
vote
0answers
34 views

wp cron job fires at every second or so, if callback is wrapped with DOING_CRON check it never fires at all

I am a bit lost while dealing with a open source plugin implementing wp cron. You can read about the problem on github https://github.com/nekojira/wp-currencies/issues/6#issuecomment-116735909 - I ...
1
vote
0answers
63 views

Add media library tab

I'm trying to make a new tab in the media library. I have found the function add_media_page which helps me add a page in the media menu to the left. How ever, this menu is not always visible, for ...
1
vote
0answers
25 views

put custom taxonomy slug in front of their respective term slugs

I needed to register two custom taxonomies which partly share some terms. The structure would look like this, when commerce and crafting are two different custom taxonomies: Commerce Furniture ...
1
vote
0answers
106 views

Get log of function/method calls made by do_action() on WordPress initialization

Is there any way I can get a log of the method calls that are made when do_action( 'init') is fired?
1
vote
0answers
131 views

Hook before & after plugin / core update

I'm working on a maintenance plugin for my website and I want to enable it before plugin/core upgrade starts and disable it after plugin/upgrade ends. Any ideas ? Thanks! :) PS: all I know is I can ...
1
vote
0answers
1k views

How to set a custom path, for ajax image upload folder in admin?

I am coding my first Wordpress plugin that handles some data for a custom (shop-like) post type. It also has an image uploader within a metabox, where you simply drag in your images and it ...
1
vote
0answers
54 views

PHP header() gives headers already sent

I am working on a checkout proces in Wordpress where if customer clicks on the checkout button he gets redirected to a payment provider. Important to know: I use a session in this proces. I use PHP ...
1
vote
0answers
101 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
67 views

Add custom text in the media library image meta area

I want to add some custom text in this area in the media library: Is there a filter I could hook into or how can I add content there? If not, how do we do this using Javascript? I want the text to ...
1
vote
0answers
67 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
133 views

Show message in media-new.php

I'm wondering if there's a way to show a specific message when user uploads a file using the wp-admin/media-new.php script. So far I have this: function my_uploads_notice(){ global $pagenow; ...
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
109 views

Firing a function AFTER redirect

I am using a function that redirects the user to a custom page, rather than wp-login in the event of errors. In my case I am using the Http Referer function to send the user back to the same page ...
1
vote
0answers
95 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
211 views

Hook into existing tinyMCE button

Is there a way to hook into an existing tinyMCE editor button? I have a plugin that currently has a button on the editor and it shows a popup-box when clicked. This box has tabs inside. I would like ...
1
vote
0answers
67 views

Add a new confirmation page before saving

I'm going to add a hook that does some modifications of the text before saving. Before making the changes permanent, I would like the user to confirm the changes after a "save_post" hook. Is there a ...
1
vote
0answers
80 views

Can I hook into wp_update_core outside of the admin?

I'm trying to bring some of the admin functionality to a custom front end in WordPress. Questions of security and pragmatism of this aside, is there an available hook to trigger wp_update_core outside ...
0
votes
0answers
12 views

How to trigger function on theme delete?

Tryed to find action or some hook to fire a function when theme is being delited, but didn't found any hook.. May be someone can tell if there's a way to fire my function on themes delete event ? I ...
0
votes
0answers
13 views

Adding Information To All Posts Screen

What I'm looking to do is add the value of a post's metafield in each post's row on the all posts screen. I'm attaching a screenshot of where I'd like this information to show up. The info would be ...
0
votes
0answers
15 views

Creating Action Hooks For Automatic File Inclusion

I want to create a hook for automatic file inclusion in my plugin, but I am finding my stuck moments. May be somebody could help me out. Here is what I tried: $args = array( "url" =>"" ); ...
0
votes
0answers
18 views

do action inside a class is not working

I am trying to create my custom hook and call it from within a metabox class. Here is the pattern: metabox.php -- <?php require("libs.php"); require("test.php"); class metabox() { function ...
0
votes
0answers
23 views

Remove Sidebar from Specific Product Category “Slug”, “not all” | Wordpress Woocommerce

My question is, Can i remove the sidebar only for particular URLs of my side. If the url is like below - remove the side bar and make the page full wridth ...
0
votes
0answers
12 views

Wrapping main content area of the blog page with a div by action or filter hooks

I used loop_start and loop_end hooks to wrap the main loop to load posts. But the problem is there are recent posts and category sections which is also getting wrapped up. I only want to wrap the main ...
0
votes
0answers
34 views

Template file structure , wordpress hook for altering the template

i need to convert a html structure to theme. So this is my html structure <html> <head> ................. </head> <body> <div class="main"> <div ...
0
votes
0answers
17 views

Custom Post Type On Publish Update Meta Field

I'm wondering if someone can shed some light on how I can update a custom meta field value, when a new post is created in a custom post type? Specifically, I have a custom post type named ...
0
votes
0answers
17 views

Wrapping succeeding shortcodes together

I'm developing a WordPress theme where the gallery shortcode breaks out of my main content div. I haven't really put this in to practice but I'm thinking of theories how to accomplish this easily. ...
0
votes
0answers
21 views

Multisite: Hook when wordpress creates new user record for a subsite

I'm trying to find an hook ( filter / action ) to catch when wordpress create new user record on a subsite. Example: Actually I've SiteA SiteB an user register itself on SiteA and ...
0
votes
0answers
21 views

How to work with hooks and Posts to posts plugin?

I am using Scribu's Posts to posts plugin to create connections between posts. For example I have custom post type Lesson, and to every lesson one (or more) Teacher can be connected. Connection is ...
0
votes
0answers
14 views

Hook upon database insertion?

I have downloaded a plugin that inserts a new row into a table in my database. I want to perform a calculation on this row as soon as it is inserted into the database, in my own plugin. I've seen a ...
0
votes
0answers
16 views

hook for adding a new column in woocommerce subscriptions

I try to add a new column in Woocommerce subscriptions, I would like to know what hook i will need to display my new column Thank you Nilda
0
votes
0answers
23 views

Add a new dynamic submenu to an existing menu trough a hook

I have created a function which binds to a shortcode, for inserting a language switcher in the form of a dropdown menu. Now I don't want this menu inserted trough shortcode, but instead i want to ...
0
votes
0answers
20 views

How to modify core when there is no hook?

I want to add a custom HTML5 attribute to the <form> element in the comments form. Since the form field itself is generated by comment_form(), and there is no hook to edit within the opening ...
0
votes
0answers
27 views

Trigger jQuery event with WordPress hook

I'm looking to fire a custom jQuery event after a user submits a comment but I can't quite grasp how to do that within the PHP code. I'm using the comment_post hook: add_action('comment_post', ...
0
votes
0answers
17 views

Checking login status before wp_get_current_user is initialised

I am building a theme switcher, that needs to block access to not logged in and subscriber users. Problem is that this has to be done in a function that is called at the "setup_theme" phase/hook, and ...
0
votes
0answers
14 views

Filter to set a variable once a post is populated?

I'm working on a playlists plugin. The playlists are just custom post types; and they have extra properties I need to populate once a 'playlist' post is loaded. So the idea would be to have a ...
0
votes
0answers
28 views

Hook on Publishing a Post Doesn't Fire Correctly (or so I think)

Currently, I'm trying to send out a Push Notification to iPhone every time a blog post is published on my WordPress website. I am using a PHP script to send out the push notification (which works with ...
0
votes
0answers
54 views

Geting only alert Output from JS file but not run functionality with avilable hook wp_footer and any other

Working Code Status: I was testing my js files, what these files were adding and running correctly or not. So I write a alert code in my-custom.js with my theme functionality, and now I hook my ...
0
votes
0answers
39 views

Adding Banner below nav

I'm using GeneratePress and want to add a banner image below .main-navigation what action/hook do i have to use to do this? I've tried looking in functions but i cant see anything for the top and ...
0
votes
0answers
68 views

Hook before posting via JSON REST API

I have been testing out the JSON REST API the past few days with some pretty good results however I have run into a bit of a barrier when making a post. I need to hook into the post call before the ...
0
votes
0answers
18 views

In Wordpress upgrade hooks, detect what plugin or theme is being upgraded?

I'm writing a plugin that detects when any plugin or theme is installed or being upgraded, and takes appropriate action. I've figured out that I should use the filter hook upgrader_pre_install to ...
0
votes
0answers
45 views

Replace upload system/Override wp_handle_upload

I am going to be running a WP site on Heroku, and none of the current solutions for the media library fit my needs. There is a system for Amazon S3 (not using because paid), and a mapping system for ...
0
votes
0answers
35 views

When to hook into edit profile action?

I have the following function which combines the values of a few user profile fields and saves them as a new user_meta called COMBINED_WORKSHOPS. The function works, but I don't know when/where to ...
0
votes
0answers
18 views

Add class to link surrounding avatar

I need to adjust styling of the -tag surrounding each avatar on my page. It's easy to add a class to the avatar img itself with this code: add_filter( 'bp_core_avatar_class', ...
0
votes
0answers
30 views

How should I use a plugin function as a hook?

I'm using Expire Password plugin, an open source plugin to expire users. It actually lets you expire users from the Users admin page, individually. I need to create a new user from a front-end form, ...
0
votes
0answers
20 views

Send email to post author 1 day before his project ends

I am running wordpress with a job board and I would like to integrate an automated email notification: Users post jobs as a custom post type. Freelancers can send proposals within 7 days. When 1 day ...