Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: get_others_drafts

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
16      $editable = get_editable_user_ids( $user_id );
17
18      if( !$editable ) {
19           $other_drafts = '';
20      } else {
21           $editable = join(',', $editable);
22           $other_drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft' AND post_author IN ($editable) AND post_author != '$user_id' ");
23      }
24
25      return apply_filters('get_others_drafts', $other_drafts);
26 }
27
28 function get_editable_authors( $user_id ) {
29      global $wpdb;
30
31      $editable = get_editable_user_ids( $user_id );
32
33      if( !$editable ) {
34           return false;