Articles of hooks

RSS Feed Custom Title?

For some reason my RSS feed is repeating the site title twice without a space, obviously quite annoying. BlognameBlogname for example. Is there any hook i can use to have a custom title for the RSS Feed? So i could have a title ‘This is My RSS Feed for Blogname’ or anything i wanted? Is […]

How to check if upload window came from the featured image link?

I need to verify if the media-upload screen came from a click on the “feature image link” on the admin screen. How can i do it? I’ve already change the way the uploader works , but I need to check this because there is a special flow for the featured image upload.

WordPress Ajax Problems

Update I got it to fire using the following curl command: curl -H “Accept: application/json” -X POST http://localhost/wordpress/wp-admin/admin-ajax.php -d “action=vixo_wordpress_signon&data=banjometer” –trace – Not really sure how to work out to get it to accept json, but hey… Original Question I am new to WordPress and I am having problems getting Ajax to work – but […]

How to Remove the “Restore” Link in Quick Edit?

I want to know is there any hook to remove the Restore link in the edit page – trash page? /wp-admin/edit.php?post_status=trash I know I can hide it with a css/jquery trick, but I prefer to use a hook for this.

Creating a function that receives the taxonomy terms that have been changed in a custom post type

Ive been looking into actions and hooks etc… from wordpress, but cant seem to do a very simple thing. I just want to execute a function whenever a post is updated, and within the function I want the names of the terms that have been changed on that save. So maybe some sort of before […]

Is there any way to allow a plugin to write over a previous version?

When installing a plugin, it will not install if the directory to which it is attempting to install already exists. This means that users of our plugin must first manually deactivate and delete the plugin. Is there any way to forcibly overwrite the directory or to deactivate the plugin and delete the directory at installation? […]

Question about how do wordpress filters/actions work

I have a question that I’m curious. In WordPress we can add a filter or action like this code: add_filter($filter_Name, $function_will_be_hook); add_action($action_Name, $function_will_be_hook); We can pass some parameters into function_will_be_hook(). But how does WordPress know that these parameters are related to its filters/actions. Example: function my_the_content_filter($content) { $content .= “I added some additon content”; return […]

action hook wp_head higher priority as all other plugins/hooks

I work a bit with the wordpress API and I want to try to include a <meta>-tag into my head area of my website. This is my code (works everything fine!): class dmd_noindex_options_page{ function __construct() { add_action( ‘wp_head’, array( $this, ‘set_meta’) ); } function set_meta(){ $pages = get_option(‘dmd_noindex_pages’); $pages_id = explode(‘,’, $pages); for($i = 0; […]

WordPress action and filter hooks runs asynchronously?

I have some functions that run fairly long to complete. These functions are called via hooks registration (i.e. add_action() and add_filter()). Would it impact the end-users when my tasks runs for a lengthly period or hooks run asynchronously? Thanks.

Add information above a custom post type listing of all posts page

Ok, that sounds like a rather confusing title, let me explain. I have created a custom post type (CPT) and I want to add some summary information about the posts of that post type above their listing (where the filter and bulk action buttons are), the page in question would be:{cpt} Is there a […]