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
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
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
Results tagged with Search options answers only user 1685

Method by which plugins and themes extend core WordPress functionality.

0
votes
Unfortunately there is no global transient filter - you'd either need to know all the transient names you want to target, or you'll have to use the special all hook (which runs for all actions and fil …
answered Oct 25 '16 by TheDeadMedic
8
votes
all is just a string the WordPress developers picked to behave differently than any other hook. When you attach to all, your callback will fire for all other hooks. I wouldn't spend too much time …
answered May 13 '16 by TheDeadMedic
2
votes
You should be using methods of the $query instance instead of the is_* template tags. And are the categories you are trying to filter a custom taxonomy? cat only works on the default category taxonomy …
answered Feb 18 '15 by TheDeadMedic
2
votes
The map_meta_cap function handles context arguments generically - you can give it anything and it'll happily pass it down the chain. It's only particular capabilities like edit_post that expect the ar …
answered Nov 27 '15 by TheDeadMedic
2
votes
is it "strange" that this hooks is called more than once? No, not at all - this filter will fire anytime get_option( 'active_plugins' ) is called, which almost certainly happens multiple times per request. …
answered Oct 4 '16 by TheDeadMedic
1
vote
If you want to toggle the editor "on the fly", you'll need to revert to a pure JavaScript solution, and only ever "visually" hide it (as opposed to removing it server-side): function wpse_189693_hide …
answered May 28 '15 by TheDeadMedic
8
votes
register_activation_hook only runs once i.e. when the plugin is first activated - use the init hook instead to "boot up" your plugin: add_action( 'init', 'LocatorMap::init' );
answered Dec 6 '16 by TheDeadMedic
0
votes
Errm, you can't. And more importantly, why would you want to? The whole point of hooks is to open up an API to other developers! You can use a singleton/static flags and/or private methods (called …
answered Feb 18 '15 by TheDeadMedic
0
votes
Personally I would use wp_get_current_user(), no globals: function plugin_admin_init() { $user = wp_get_current_user(); }
answered Apr 16 '14 by TheDeadMedic
2
votes
I would use the registration_redirect filter. This allows you to set where the user is sent to, but leaves WordPress to perform the redirect (after everything has successfully processed). function wp …
answered Mar 26 '14 by TheDeadMedic
1
vote
Use the pre_get_posts action to override the default query. In the admin, a date query will be the query var m in the format YYYYMM. Assuming your meta dates are stored the same as MySQL dates (YYYY-M …
answered May 29 '15 by TheDeadMedic
2
votes
In your first code example, you hook into the pre_get_posts action, which fires during the main query. But instead of manipulating that query, you trigger another one using query_posts(), which fires …
answered Jun 24 '13 by TheDeadMedic
8
votes
The hook is not the problem - your code runs in the context of the current site, not the one just created! The following code isn't tested, but it should at least highlight the problem: function wpse …
answered Nov 7 '12 by TheDeadMedic
0
votes
Use a static method - the add_action will fire for each instantiation, but the hook will only be registered once: add_action( 'wp_enqueue_scripts', __CLASS__ . '::planner_load_scripts' ); static pub …
answered May 3 '16 by TheDeadMedic
0
votes
One question: is the 3rd party that's sending the request passing a user cookie? If not, then WP will treat the request like any other guest! If it is, have you inspected $_COOKIE when send_response( …
answered Jul 26 '12 by TheDeadMedic

15 30 50 per page