9 Feb 21:31
9 Feb 21:19
Category & Tag Function to update count
James Laws <jamielaws <at> gmail.com>
2012-02-09 20:19:40 GMT
2012-02-09 20:19:40 GMT
Hey everyone, I know there is a function that I believe the category and tag ID are passed through when ever ones is added or removed from a post. I've looked through the core and can't for the life of me find the function. Does anyone know the function I speak of and/or where I might locate it. Thanks in advance. James
9 Feb 16:35
Problems with reference to $wp_roles->roles
David F. Carr <david <at> carrcommunications.com>
2012-02-09 15:35:51 GMT
2012-02-09 15:35:51 GMT
I've run into problems with some code that uses a foreach loop on $wp_roles->roles - the array of roles in the $wp_roles global. Worked fine in my testing but caused all sorts of problems for some other users of my Facebook Tab Manager plugin. The code I originally released failed to check for the existence of the array, and people got PHP errors from iterating on a non-existent array. I figured it was a global, so it's got to be there, right? Apparently not. I've semi-fixed this with an update, which tests to make sure the variable is set first. To fix it right, I probably need to understand what's going on. Is the $wp_roles->roles variable only set under certain circumstances, like when a user is logged in? I tried to test that by logging out and browsing my test site, but I still didn't see the errors other people are seeing. Context: This is related to a function that sets the roles and capabilities for my custom post type to parallel those of regular posts. Depending on an options setting, editing rights may or may not be assigned to authors and contributors. -- -- David F. Carr Writer, Editor, Web Consultant david <at> carrcommunications.com http://www.carrcommunications.com/ Editor, The BrainYard http://www.informationweek.com/thebrainyard LinkedIn - http://www.linkedin.com/in/davidfcarr(Continue reading)
9 Feb 15:57
How to familiarize with Code Base ?
VijeenroshPW VijeenroshPW <vijeenroshpw <at> gmail.com>
2012-02-09 14:57:02 GMT
2012-02-09 14:57:02 GMT
Greetings to all , (My Apology, if this is not to be asked here ) I have been learning php for an while and is in an good position in it. I have choosen WordPress as my first real world php project( To familiarize with php standards and be part of an leading blog engine) for study. I have by this time knowledge in plugin writting ,but I would like to get familiarised with the code base of WordPress . So Where should I begin , could any body suggest an source tree ? /* Apology if this is not supposed to be published here */ ------------------------------------------------------ www.BlackJackVijeen.blogspot.com Vijeenrosh P.W
9 Feb 12:57
Expensive meta query - Is there a better way?
Robert Lusby <nanogwp <at> gmail.com>
2012-02-09 11:57:33 GMT
2012-02-09 11:57:33 GMT
Hello,
We're running a multiple meta query lookup in WordPress - however the DB
query most be expensive as it's result in very slow (20/30 second)
response times in PHP with only 300 posts (total) in the DB. Query below.
Is there a better way of doing the below? Essentially if $value is equal
to key1 or key2 or key3 or key4 or key5 (the keys are numbered
consecutively).
'post_type' => 'custom_post_type',
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'key1',
'value' => $value,
'compare' => '=',
),
array(
'key' => 'key2',
'value' => $value,
'compare' => '=',
),
array(
'key' => 'key3',
'value' => $value,
'compare' => '=',
),
array(
'key' => 'key4',
(Continue reading)
9 Feb 06:02
8 Feb 20:12
Getting Media all media uploads by author
Muhammad Ali <mjsafoxy <at> gmail.com>
2012-02-08 19:12:36 GMT
2012-02-08 19:12:36 GMT
Hi; I was wondering how I could get all media uploads by author with the URL (w/ thumbnail), title, and perhaps the caption and description. I'm sure this is possible, just can't find out how to do it. :p I would like to use this on the authors.php page. Any help would be appreciated. Regards
8 Feb 02:02
Upload avatar in the "New user" page
Pasquale Puzio <pasquale.puzio <at> gmail.com>
2012-02-08 01:02:01 GMT
2012-02-08 01:02:01 GMT
Hi all, I would like to upload the avatar of a new user directly in the "New user" page, so avoiding to go back to "Edit profile" page and use the plugin User Avatar http://wordpress.org/extend/plugins/user-avatar/ Did anyone already implement this feature? Thanks -- -- Dott. Pasquale Puzio http://www.pasqualepuzio.it info <at> pasqualepuzio.it 340 5026359
7 Feb 19:41
Changing term IDs
William P. Davis <will.davis <at> gmail.com>
2012-02-07 18:41:53 GMT
2012-02-07 18:41:53 GMT
We have a few different taxonomies that share terms — for example, Maine as a category and as a region. However, when we created the regions we didn't name a few of them exactly as they should have been, so the slugs got messed up (State of Maine as a category with the slug maine, Maine as a region, so the category slug is maine and the region slug is maine-2). I'd like to make the slugs line up, and I'm wondering if there would be any adverse effects if I simply went into _term_taxonomy and change the term ID of the region to the term ID of the category so the slugs line up. Will
7 Feb 05:02
Ajax requests, admin-ajax.php and the WP_ADMIN constant
24/7 <24-7 <at> gmx.net>
2012-02-07 04:02:20 GMT
2012-02-07 04:02:20 GMT
I'm currently developing an app that needs some ajax requests. Suddenly I found myself in a weird position: I couldn't make any requests from my ajax callback function. Everything loaded fine, the request was sent via jQuery.post() and the response was `0`. As I made the request from inside a class, I tested if I could hook the callback from outside and it worked. After a lot of debugging [1] I found the *"error"*: is_admin() returns true as admin-ajax.php defines WP_ADMIN as true on top of the file. This is a bit weird behavior, as we got the wp_ajax_* (admin/logged-in) and the wp_ajax_nopriv_* (public/guest) hook. If I want to, like in my case, built the front-end stuff completely separated from the back end extensions, then I have the problem that I simply can't divide stuff. This brings me in a strange situation for organizing my files: I can't stick stuff together that belongs together. Is there some work-around, some ideas, some concepts? Or does the ticket from Denis-de-Bernard [2] will receive some attention for 3.4? Thanks! [1] I found the note about the is_admin() in the Ajax Codex article a little too late: http://codex.wordpress.org/AJAX_in_Plugins [2] http://core.trac.wordpress.org/ticket/12400
_______________________________________________ wp-hackers mailing list wp-hackers <at> lists.automattic.com http://lists.automattic.com/mailman/listinfo/wp-hackers(Continue reading)
6 Feb 19:58
Getting the entire HTML page generated from WordPress
Mario Peshev <mario <at> peshev.net>
2012-02-06 18:58:59 GMT
2012-02-06 18:58:59 GMT
Hello everyone, I'm trying to intercept the entire HTML page generated on a page load in WordPress. the_content() is not enough as I need some filtering in the meta tags, footer, sidebar etc. I've been looking for some filters and the HTTP API, but nothing seems to work on a page basis, i.e. post-filtering of every element in the entire DOM tree. Any tips on this? Mario Peshev Training and Consulting Services @ DevriX http://www.linkedin.com/in/mpeshev http://devrix.com http://peshev.net/blog
RSS Feed