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 35541

Method by which plugins and themes extend core WordPress functionality.

7
votes
PHP has a function, get_included_files(), that returns all the files that have been included during a request. However, if you use that function you obtain all the files required: WordPress core file …
answered Nov 12 '14 by gmazzap
1
vote
->post_type is, as you can guess, the post type. So the form "publish_post" is only one of possible hooks, fired when a post of standard post type has been published, to make an example same line in code will … also fire "trash_page" when you delete a page, and so on. As you can see in the source it is the last of status transition hooks being fired. For the others and also for additional info look at …
answered Oct 12 '14 by gmazzap
3
votes
first thing I said (set cookie fails if some output) is better se cookie as soon as possible, and in WordPress even if 'init' is quite early, there are hooks that are earlier, if you are writing a …
answered Mar 28 '14 by gmazzap
2
votes
Uing OOP for your plugin it's very easy. class MyPlugin { static $flag; static function function_a() { self::$flag = 'a value'; } static function function_b() { if ( ! …
answered Sep 11 '13 by gmazzap
1
vote
I think best hook should be 'template_redirect', when this hook is fired main query is already set, so you can look at queried object and if the user has no required capability you can redirect reques …
answered Aug 2 '14 by gmazzap
8
votes
This is more a comment to the very good Birgire's answer than a complete answer, but having to write code, comments don't fit. From the answer it may seems that the only reason why action is added on …
answered Nov 25 '15 by gmazzap
2
votes
I think that with event driven paradigm, who write article intends Observer Pattern. And that in WordPress is handled via the Plugins Api. I don't think there's much more to say.
answered Oct 10 '13 by gmazzap
1
vote
The accepted arguments value is used by WordPress as $length argument for array_slice when performing the action. It means that, yes, if you pass 0 no argument will be passed to your callback. Howev …
answered Nov 7 '14 by gmazzap
2
votes
If I understand well, you want to append to every post a meta value taken from another post, but the latter need to be dynamic, so not hardcoded in the function. In OP you say the post id is "user-de …
answered Sep 23 '14 by gmazzap
3
votes
create_term as you can see in inline docs in code Fires immediately after a new term is created, before the term cache is cleaned So you can't prevent an event after that event already happen. …
answered Jun 13 '14 by gmazzap
1
vote
Use the hook pre_get_post see codex
answered Aug 15 '13 by gmazzap
1
vote
add_action( 'pre_get_posts', 'mytheme_restrict_user_content' ); function mytheme_restrict_user_content( $query ){ $restricted_post_types = array('documentlibrary', 'events'); if ( is_main_query() …
answered Aug 19 '13 by gmazzap
6
votes
page, a good idea is look at 'load-post.php' hook (one of the 'load-{$page}' hooks), that is fired only on post edit page. In a function that runs on that hook, you can access to the post id being edited using $_GET['post'] variable. …
answered Sep 18 '13 by gmazzap
1
vote
Edited after OP insert edited question Once you are creating a new upload system, I thing that you want to add button/link to different part of WP admin: A submenu on "Media" menu A submenu on th …
answered Dec 18 '13 by gmazzap
0
votes
. Off course, when you print the_content() you don't want the shortcode is printed again. So, in the function that hooks print_gallery action you can insert something like this: add_action …
answered Sep 12 '13 by gmazzap

15 30 50 per page