get_nonauthor_user_ids

Gets all users who are not authors.

Description

get_nonauthor_user_ids(); 

Usage

  1. if ( !function_exists( 'get_nonauthor_user_ids' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/deprecated.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_nonauthor_user_ids(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/deprecated.php  
  1. function get_nonauthor_user_ids() { 
  2. _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' ); 
  3.  
  4. global $wpdb; 
  5.  
  6. if ( !is_multisite() ) 
  7. $level_key = $wpdb->get_blog_prefix() . 'user_level'; 
  8. else 
  9. $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels 
  10.  
  11. return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key) );