Skip to content

Instantly share code, notes, and snippets.

Created January 18, 2013 12:43
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Example to use the User List Dropdown for Customizer, the classes are inside the project:
* @see:
add_action( 'customize_register', 'fb_customize_register' );
function fb_customize_register( $wp_customize ) {
require_once( 'class-user_select_custom_control.php' );
'my_theme_blog_featured_user_list', array(
'title' => __( 'Featured User List', 'textdomain' ),
'priority' => 36,
'description' => __( 'Manage User List', 'textdomain' ),
'featured_user_list_1', array(
'default' => __( 'Default User', 'textdomain' ),
new User_Select_Custom_Control(
$wp_customize, 'featured_user_list_1', array(
'label' => __( 'Featured User List 1', 'textdomain' ),
'section' => 'my_theme_blog_featured_user_list',
'settings' => 'featured_user_list_1',
'description' => __( 'Select a User from List', 'textdomain' ),
'query' => array( 'role' => 'author' ),
return $wp_customize;
Copy link


I currently use your excellent "Multisite Enhancements" plug-in, and found this project when looking to see what other helpful things you may have created. I've done a ton of web development over the years (pretty much HTML, CSS, and JavaScript/jQuery), but am just learning PHP and the wonderfully complex underside of WordPress.

I'm pretty familiar w/ adding PHP code sections to my WP installation (via functions.php, shortcodes, and per-page injection). I have recently added a function to populate a Gravity Forms dropdown w/ a list of WP registered usernames, but I would much rather use an established code-base from a seasoned developer. :)

Anyway... I hoping you would be willing to explain a bit more about how someone like myself could begin implementing your "Wordpress-Theme-Customizer-Custom-Controls".

Cheers, Dustin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment