Articles of wpse plugin

Is there a way to define a default caption to all uploaded images

As the title of this answer say, I want to define a default caption to all uploaded images in my WordPress… Is there a way to do something like this?

How can I change the frequency of a scheduled event?

I have declared a scheduled event in a plugin like this : function shedule_email_alerts() { if ( !wp_next_scheduled( ‘send_email_alerts_hook’ ) ) { wp_schedule_event(time(), ‘hourly’, ‘send_email_alerts_hook’); } } Then i wanted to change the frequency to ‘daily’, by doing so, replacing the original function with : function shedule_email_alerts() { if ( !wp_next_scheduled( ‘send_email_alerts_hook’ ) ) { […]

How do I display a user specific content?

I have a site that displays the content only to registered users. Most of the content is available to all the users, but some of it is user specific (i.e. all users have that page, but each sees a it’s own content which no one else can see). Any idea as to how I can […]

Importing Tweets with certain hashtags into WordPress

I’m looking for a way to import tweets into WordPress as posts. In fact, I want to display tweets about a certain topic on a page in WordPress. So page A would contain tweets about hashtag x, and page B would contain tweets hashtag y. There is at least one plugin that imports tweets (Tweet-Import), […]

Dynamic template serving, change theme_root using add_filter from current theme

Some plugins use the ‘template’, ‘option_template’ and ‘option_stylesheet’ to dynamically serve (alternative) wordpress templates. For example, Nathan Rice’s ServeDefaultToIESix. For Example – add_filter(‘template’, ‘change_theme’); add_filter(‘option_template’, ‘change_theme’); add_filter(‘option_stylesheet’, ‘change_theme’); function change_theme() { // Alternate theme return ‘AwesomeTheme’; } Above code only works from a wordpress plugin. What i need, is to switch to alternative template, located […]

Implementing advanced add_* function wrappers

add_action() and add_filter() are major functions. However in some scenarios add one more function and hook it somewhere approach gets bulky and inconvenient. I had determined for myself several use cases that can streamline code with wrappers on top of add_* functions. Things that are better handled with single-liner than extra function each and every […]

How do I check if I linked to a post before I delete it?

If I want to “safely” delete a post. I want to make sure that no link exists (within my blog) to “to-be-deleted” post. How do I do that?

A tool to analyze rewrite rules?

Is there a good tool to analyze my rewrite rules? I always get confused with the regexes and the parameter replacements. I have created something myself and will post it here so others can use it, but please feel free to add other tools!

WPSE Plugin Repository: The plugins that came out of WP-Answers

Link your WPSE-Plugins If you answered a question and made a plugin out of your code, than this is your place to share it. The Idea: An old comment from @MikeSchinkel during the beta phase where he wrote something like “I wonder how many plugins will come out of WA”. “Rules” Write a short – […]

Adding an Arbitrary Link to the Admin Menu?

Is there a way to add a arbitrary hyperlink to the WordPress admin menu (I mean the menu on the left when you log into the admin dashboard)? For example, can one add a link to Google? In my particular case, I’d like to add a styleguide page for a WordPress theme I’m working on […]