Muhammad Ali | 9 Feb 21:31
Picon
Gravatar

How to show comments on posts by a user.

How can I show comments on the posts of a specific user in order of the
comment date?
Any help would be appreciated.
Regards
James Laws | 9 Feb 21:19
Picon
Gravatar

Category & Tag Function to update count

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
David F. Carr | 9 Feb 16:35
Gravatar

Problems with reference to $wp_roles->roles

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)

Picon
Gravatar

How to familiarize with Code Base ?

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
Robert Lusby | 9 Feb 12:57
Picon

Expensive meta query - Is there a better way?

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)

QI.VOLMAR QI | 9 Feb 06:02
Picon

register_post_type

how I can filter the register_post_type results by post_author?

 like this:
   if(curent_user_can('author')){
         add_filter or samething like a callback function that aggregate
   a WHERE post_author=n
   }
Muhammad Ali | 8 Feb 20:12
Picon
Gravatar

Getting Media all media uploads by author

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
Pasquale Puzio | 8 Feb 02:02
Picon
Gravatar

Upload avatar in the "New user" page

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
William P. Davis | 7 Feb 19:41
Picon
Gravatar

Changing term IDs

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
24/7 | 7 Feb 05:02
Picon
Gravatar

Ajax requests, admin-ajax.php and the WP_ADMIN constant

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)

Mario Peshev | 6 Feb 19:58
Gravatar

Getting the entire HTML page generated from WordPress

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

Gmane