Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
A name for an event that is executed at specific points throughout the WordPress core.
11
votes
Accepted
Perform an action when post is updated/published
The save_post action fires When a post is updated and/or published -- including when a new post is inserted.
<?php
add_action( 'save_post', 'wpse41912_save_post' );
function wpse41912_save_post()
{
…
6
votes
Change which sidebar get_sidebar() gets from functions.php
Get sidebar is a really thin wrapper around locate_template, which just searches the current child theme and parent theme directory for the given sidebar.
get_sidebar in wp-includes/general-template. …
1
vote
Dynamic wp_enqueue_scripts?
You could use anonymous functions in PHP 5.3+ to do this.
<?php
function addThemeJS($enqueueThemeJS, $handle, $src, $deps, $ver, $in_footer)
{
add_action('wp_enqueue_scripts', function() use ($ha …
5
votes
Accepted
Using auth_redirect returns cannot modify header information
It works fine on my localhost as well.
The reason it probably doesn't work on your server is that it's not using output buffering. Hooking into wp_head means that the page has already started printi …
1
vote
Can taxonomies of custom post types be used with category actions?
What you're looking for are the create_$taxonomy, edit_$taxonomy and delete_$taxonomy hooks. $taxonomy is, of course, your taxonomy name.
<?php
add_action( 'create_your_tax', 'wpse32510_create', 10, …
2
votes
How to create Admin Notice from Plugin with argument?
This would be an good use PHP 5.3+ anonymous functions.
Closure example:
<?php
function Twit_the_url( $post_ID )
{
//connect to twitter api
//send tweet with url
//get twitter respon …
3
votes
Using preg_replace to filter custom textarea
preg_replace expects it's regex to be surrounded by a character. Usually that's a slash, like this:
'/.*/'
When you do this:
preg_replace('%%PROPOSAL_LINK_URL%%', $some_text, $replacement);
preg …