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 |
For questions about the server-side programming language that the WordPress core, plugins and themes are written in. Questions about using PHP outside a WordPress context are off-topic but might be asked on Stack Overflow.
2
votes
Accepted
Pass PHP variable to JavaScript without inline JS
this is the function (via wp_ajax_ hook) that will be triggered
},
success: function( data ){
var returned_data = JSON.parse(data);
}
}); // jQuery.ajax
});
php … Another reckless cowboy way to get php variables into the DOM is to echo the JSON encoded string to a hidden <div>, then use js to go pull the content out of that div. …
2
votes
Using PHP in a Stylesheet (possibly a ".htaccess" problem?)
Suggest you move your desired functionality to javascript; you are so badly attempting to overload the purpose of these constructs...even if you get it to work you are going to have a very fragile and …
1
vote
post_content is stripping HTML when adding a new post?
When WP inserts a post one of the things it does is check both the current user's capabilities, and which html tags are allowed to be used. There are two ways to modify this:
Method 1: wp_kses_allo …
0
votes
Page Reloads Before AJAX Request Finishes
I can't comment on the validity of the AJAX call; it's a different style than I have used -- but inside the click(function(e) { code, you might try trapping the default page action to prevent it from …
0
votes
Accepted
Edit Post custom options not working
You need the $post_id passed in to the function you are calling from the hook. Try making your function declaration like this:
function slider_data( $post_id )
0
votes
Accepted
What is the best practice for restricting a section to logged in users?
I think the answer is "it depends" -- on how flexible and/or "slick" you want the solution to be. The quickest/easiest thing to do would be to create a custom post type (there are tried/true plugins …
0
votes
1
answer
269
views
wp_insert_post: array only. wp_update_post: array|object (?)
be somewhat of a pain to refactor my code to use an array for every call to wp_insert_post, and furthermore the mismatch doesn't seem to cause any issues -- I suppose it is being automatically cast by PHP … I guess this might be more of a PHP concern than WP.
It did seem odd to me that two closely related functions like this have different argument type specifications. …