Method by which plugins and themes extend core WordPress functionality.

learn more… | top users | synonyms

1
vote
0answers
112 views

Removing Generated HTML Comments from SEO Plugins (All in One SEO, Yoast, Platinum SEO) [closed]

Most of the SEO plugins out there sign the code of the site with a comment with their name and even their software version. For example, All in One SEO adds the following: <!-- All in One SEO ...
1
vote
0answers
169 views

Woocommerce action before Place Order

I want to know is there any hooks in woocommerce before placing an order, In my case, What I want to achieve is, If the customer selects the COD option in the check page, and click place order I want ...
1
vote
0answers
21 views

Which hook is fired when tag is added or changed? [duplicate]

I have a transient that collects WordPress tags with specific description. I'm looking for a hook name that fires when user edits a WordPress tag or creates a new tag in admin so I can delete my ...
0
votes
0answers
19 views

Attempting to add an imagemap/ content to Front Page — shows up only in meta description

I'm dealing with a nasty old theme for a friend that uses a huge slider as its homepage background image. I'd rather not scrap and recreate the site, as back in the day I put in a good amount of ...
-1
votes
2answers
38 views

What is meaning of BEFORE and AFTER in this hook name?

I'm trying to interpret this action hook name: ws_plugin__s2member_pro_before_sc_authnet_form_after_shortcode_atts What is meaning of BEFORE and AFTER in this hook name? Do the underscores mean ...
1
vote
0answers
60 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 ...
0
votes
0answers
61 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

weird redirect from Movable Type installation

I'm helping a friend moving his blog from MT to wordpress, in order to do so I have created a truth table on the database (rosetta) by looking at all the old static files and I've created a relation ...
3
votes
1answer
144 views

Multiple wp_schedule_event cron jobs in plugin cause multi-execution

over the last week I have been working on some cron jobs for a real-estate website that has hundreds of updates/deletes and new posts added each day. I am very near the end now and looking to ...
0
votes
1answer
102 views

WP_query hooks before execute a search query

Anybody knows if there's a hook before execution of a search query (not in main loop) in order to change the 's' parameter to avoid Wordpress' phrase splitting? Examples are welcome... thanks P.S.: ...
0
votes
1answer
57 views

Custom Fields as Post Type Options

Im using a theme for vehicle listings and the WPUF Pro plugin for frontend submitting. WPUF plugin automatically reads the taxonomies of themes post_type (vehicle), but the theme got vehicle ...
0
votes
1answer
124 views

Add “data-” attribute to image links

Is it possible to add an attribute and value to image links? I currently have: <a href="#"> <img class="img-responsive aligncenter wp-image-1286 size-full" src="#" alt="..." width="858" ...
9
votes
3answers
143 views

Generate dormant hook references

It seems a lot of plugin developers take the time to add filter/action hooks to let users tweak their products’ functionality. Which is great, but what they often don’t do is provide a list of hooks ...
0
votes
1answer
179 views

Update post meta using pending_to_publish hook

Below is my code for updating post meta. function changePostExpireDatetime( $post ){ $featurePlanID = get_post_meta($post->ID, 'post_price_plan_id', true ); ...
0
votes
1answer
174 views

Woocommerce single_product_summary hook not working

I'm trying to add my own custom fields to the single product summary after the main product's title output on my product page. I've looked into the woocommerce documentation ...
0
votes
1answer
96 views

Set a default category - if the user didn't select one- before creating a post

Is there some option hook to set a default category for a custom_post_type when the user didn't choose any ? For example in RoR it's very simple - by using before_save filter you can set whatever ...
1
vote
1answer
216 views

Can I remove WooCommerce main content hook?

<?php /** * woocommerce_before_main_content hook * * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) * @hooked woocommerce_breadcrumb ...
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
1answer
109 views

How do I hook into the container of wp_nav_menu?

I know I can edit the items within the wp_nav_menu by declaring a custom walker, but I want to add some code just inside the container, which isn't handled by a walker. It's in ...
0
votes
1answer
22 views

Can an RSS item be altered with a hook?

I would like to alter the content of each item in a site's RSS feed with a regular expression. The rss2_item hook is close but it is run just after the item has been output, so is only really useful ...
0
votes
0answers
31 views

Checking if text from product 2 is equal to product 1

I am using Woocommerce product addons to allow users to upload a pdf file when ordering 2 products. I would like the following logic to be applied when both items are in the cart. If filename ...
0
votes
0answers
22 views

Passing variables to JavaScript from multiple hooks

I use inside the hook 'wp_enqueue_scripts' the following code to deliver home_url() value to some javascript function in the module with handle 'rdhil_read_write_css'. It was fine and the javascript ...
1
vote
0answers
214 views

add_filter hook redirect view cart button in woocommerce

In my current multilanguage wp project I'm trying to redirect the user from the checkout (which is in the current language choosen by the user) via "view cart"-button to a translated cart page. ...
2
votes
1answer
55 views

Over write plugin templates

Is that possible for overwriting a plugin templates via making a folder in theme file and copy the file in that folder and altering the content [both folder and file name have the same name as ...
0
votes
1answer
23 views

Getting entry ID from frm_email_message filter in formidable

Using the filter frm_email_message in formidable I want to change the message body in an email but I need to get the entry id. I can get it using a different filter frm_email_value. Is there a way ...
0
votes
0answers
54 views

how to find add_filter hook name?

I'm using jetpack photon. but it's not cache sidebar widget's image. so I found this code function jeherve_photonize_text_widget_images( $content ) { if ( class_exists( 'Jetpack_Photon' ) ) { ...
0
votes
0answers
12 views

Which filter called the function [duplicate]

I've created a function that does some replacing of urls and is called by several filters: add_filter( 'theme_root_uri', array( $this, 'replaceCDN' ), 99, 1 ); add_filter( 'plugins_url', array( ...
0
votes
1answer
117 views

How to customize category_description()?

In a website I am working on ,there are 50 categories + sub categories, each has a a very long description text, then in an archive page I display all the titles of the categories + their description ...
-1
votes
2answers
214 views

How to hook into permalink when publishing-saving post?

I want to know how I can change the structure of the permalink to my desired one before saving or publishing my post in Wordpress? For instance, when I add the title like the wordpress blog in my post ...
1
vote
0answers
39 views

How to change the default mail when admin approuved an user?

How to change the email (content & template) when the administrator approuved an user?
0
votes
2answers
175 views

Yoast SEO hooks overriding themselves

I have some dynamic templates where I have to customize the canonical links. According to Yoast documentation the hook to use is wpseo_canonical I have two functions pointing to different pages ...
0
votes
0answers
28 views

Can I use a hook other than 'init' to handle form submissions?

I'm developing a plugin that handles form submissions at several different points. As such, I was relying on being able to use global $post and get_query_var to determine which stage the user is at ...
1
vote
2answers
50 views

Don't delete a page if it holds users

I have to do something but I just can't come up with a way to do it. On one hand I have created pages who are companies. So every page is a company-page. On the other hand I have created users who ...
0
votes
0answers
11 views

What is the earliest hook you can piggyback on to check terms/taxonomy for a collection view?

I am attempting to set up some conditional logic based on whether or not get_the_terms( $post->ID, 'product_cat' ) has the term 'Photographs' in it. Currently I'm using the wp hook, but that ...
0
votes
0answers
37 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. ...
0
votes
1answer
48 views

Block Update Profile Errors

I'm trying to validate the form users submit when updating their profile data. I've hooked into user_profile_update_errors. It prints errors correctly to the user, however, it still allows the ...
0
votes
0answers
48 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 ...
1
vote
1answer
28 views

What hook/filter can I use to add/edit/show/hide the title under (on hover) links on the table view?

I'm not entirely sure the name given to these links, but the class is called "row-actions".
1
vote
2answers
997 views

How to add a button to custom post type's posts-page

How can I add a button to a posts -page. (In this case a custom post type). I'd like to place it next to, or near, the "Add new" button, to import content from a web service.
0
votes
0answers
20 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
19 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
56 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 ...
2
votes
1answer
366 views

When can you get current page ID and initialize hooks right after?

I'm developing a plugin and need to know on what page user is and then add specific hooks and filters for that page. And my problem is that is_page() and the_ID() doesn't work outside of wp, ...
0
votes
1answer
60 views

New User ID not working in custom function with user_register hook

I'm adding data to a table whenever a new user registers on the site. add_action( 'user_register', 'auto_follow_admin', 10, 1 ); function auto_follow_admin() { global $wpdb; ...
0
votes
1answer
20 views

Action hook with wrapper html

I want to add a space for a banner across the top of my WooCommerce Category pages, but i'm trying to figure out how to add some markup that will wrap the action. In my archive-product.php I have the ...
0
votes
1answer
176 views

Remove links from the_content when using filters wp_trim_excerpt

I'm using wp_trim_excerpt which is working perfectly but I want to strip the links contained in the the_excerpt (using get_the_content), I've looked online and tried many solutions to get the thing to ...
0
votes
1answer
82 views

How can I edit comment meta value before it is saved?

I have introduced a custom field in comments form using add_comment_meta() function. I would like to know if there is a way to edit the data of the comment meta just before the post data is saved so ...
0
votes
0answers
200 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
1answer
43 views

WordPress save_post hook not firing when checking if _GET['post'] is set

I was facing an issue (a custom metabox not saving), and after 2 hours I finally realised that, if you try to add an action to the save_post hook inside an if statement checking whether $_GET['post'] ...
1
vote
0answers
112 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 ...