• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wp_dropdown_users函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wp_dropdown_users函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_dropdown_users函数的具体用法?PHP wp_dropdown_users怎么用?PHP wp_dropdown_users使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wp_dropdown_users函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: soj_manage_posts_by_author

function soj_manage_posts_by_author()
{
    global $user_ID;
    //echo('<label>Owners</label>');
    $editable_ids = get_editable_user_ids($user_ID);
    wp_dropdown_users(array('include' => $editable_ids, 'show_option_all' => __('View all Owners'), 'name' => 'author', 'selected' => isset($_GET['author']) ? $_GET['author'] : 0));
}
开发者ID:sudar,项目名称:rolopress-core,代码行数:7,代码来源:extend-admin-post-filter.php


示例2: widget_user_profile_control

    /**
     * Manage user profile widget.
     */
    function widget_user_profile_control()
    {
        $options = get_option('widget_user_profile');
        if (!is_array($options)) {
            $options = array('title' => 'User Profile', 'user' => false);
        }
        if ($_POST['profile_submit']) {
            $options['title'] = strip_tags(stripslashes($_POST['profile_title']));
            $options['user'] = strip_tags(stripslashes($_POST['profile_user']));
            update_option('widget_user_profile', $options);
        }
        $title = htmlspecialchars($options['title'], ENT_QUOTES);
        ?>

		<p style="text-align:right;">
			<label for="profile_title">Title:</label><br /> 
			<input style="width: 200px;" id="profile_title" name="profile_title" type="text" value="<?php 
        echo $title;
        ?>
" />
		</p>

		<p style="text-align:right;"><label for="profile_user">User:</label><br /> 
			<?php 
        wp_dropdown_users(array('selected' => $options['user'], 'name' => 'profile_user'));
        ?>
		</p>
		<style type="text/css"> #profile_user { width: 200px; } </style>

		<input type="hidden" id="profile_submit" name="profile_submit" value="1" />

		<?php 
    }
开发者ID:stulentsev,项目名称:mafiaoffline,代码行数:36,代码来源:widget.php


示例3: form

        /**
         * Back-end widget form.
         */
        public function form($instance)
        {
            $selected_user_id = isset($instance['selected_user_id']) ? $instance['selected_user_id'] : 1;
            ?>

			<p>
				<label for="<?php 
            echo esc_attr($this->get_field_id('selected_user_id'));
            ?>
"><?php 
            esc_html_e('Display author:', 'proteuswidgets');
            ?>
</label>
				<?php 
            wp_dropdown_users(array('name' => $this->get_field_name('selected_user_id'), 'id' => $this->get_field_id('selected_user_id'), 'selected' => $selected_user_id, 'class' => 'widefat'));
            ?>

			</p>

			<p><small><?php 
            printf(esc_html__('To add the social icons to this widget, please install the %sExtra User Details%s plugin and fill in the details in the &quot;Users&quot; section.', 'proteuswidgets'), '<a href="https://wordpress.org/plugins/extra-user-details/" target="_blank">', '</a>');
            ?>
</small></p>

			<?php 
        }
开发者ID:proteusthemes,项目名称:proteuswidgets,代码行数:29,代码来源:widget-author.php


示例4: display_order_customer_informations

 function display_order_customer_informations()
 {
     global $post_id;
     global $wpdb;
     $output = '';
     if (!empty($post_id)) {
         $order_postmeta = get_post_meta($post_id, '_order_postmeta', true);
         $order_info = get_post_meta($post_id, '_order_info', true);
         /** Check the order status **/
         if (!empty($order_postmeta)) {
             if (!empty($order_postmeta['order_status']) && $order_postmeta['order_status'] != 'awaiting_payment') {
                 $output = wps_address::display_an_address($order_info['billing']['address']);
                 $output .= wps_address::display_an_address($order_info['shipping']['address']);
             } else {
                 $output = wps_address::display_an_address($order_info['billing']['address']);
             }
         }
     } else {
         /** Display  "Choose customer or create one" Interface **/
         $tpl_component = array();
         $args = array('show_option_all' => __('Choose a customer', 'wpshop'), 'orderby' => 'display_name', 'order' => 'ASC', 'include' => null, 'exclude' => null, 'multi' => false, 'show' => 'display_name', 'echo' => false, 'selected' => false, 'include_selected' => false, 'name' => 'user', 'id' => null, 'class' => 'chosen_select', 'blog_id' => $GLOBALS['blog_id'], 'who' => null);
         $tpl_component['CUSTOMERS_LIST'] = wp_dropdown_users($args);
         $output = wpshop_display::display_template_element('wps_orders_choose_customer_interface', $tpl_component, array(), 'admin');
     }
     return $output;
 }
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:26,代码来源:wps_orders_ctr.php


示例5: author_filter

function author_filter()
{
    $args = array('name' => 'author', 'show_option_all' => 'View all authors');
    if (isset($_GET['user'])) {
        $args['selected'] = $_GET['user'];
    }
    wp_dropdown_users($args);
}
开发者ID:narendra-addweb,项目名称:MyImmoPix,代码行数:8,代码来源:admin-author-filter.php


示例6: render

 /**
  * Render Meta Box content.
  *
  * @param \WP_Post $post The post object.
  */
 function render($post)
 {
     // Add an nonce field so we can check for it later.
     wp_nonce_field($this->nonce_validator->get_action(), $this->nonce_validator->get_name());
     $contact_person_id = get_post_meta($post->ID, '_contact_person_id', true);
     echo '<label class="screen-reader-text" for="contact_person_id">' . esc_html__('Contact Person', 'contact-person-meta-box') . '</label>';
     wp_dropdown_users(array('name' => 'contact_person_id', 'selected' => $contact_person_id, 'include_selected' => true, 'show_option_none' => __('&mdash; Select &mdash;')));
 }
开发者ID:2ndkauboy,项目名称:contact-person-meta-box,代码行数:13,代码来源:class-contact-person-meta-box.php


示例7: output

 /**
  * Output the metabox
  */
 public static function output($post)
 {
     global $post, $wpdb, $thepostid;
     $parent_post = false;
     if (isset($_GET['post_parent']) && $_GET['post_parent'] != '') {
         $parent_post = $_GET['post_parent'];
     }
     echo '<div class="propertyhive_meta_box">';
     echo '<div class="options_group">';
     // Negotiator
     $negotiator_id = get_post_meta($post->ID, '_negotiator_id', TRUE);
     if ($parent_post !== FALSE) {
         $negotiator_id = get_post_meta($parent_post, '_negotiator_id', TRUE);
     }
     if ($negotiator_id == '') {
         // if neg isn't set then default to current user
         $negotiator_id = get_current_user_id();
     }
     echo '<p class="form-field negotiator_field">
     
         <label for="_negotiator_id">' . __('Negotiator', 'propertyhive') . '</label>';
     $args = array('name' => '_negotiator_id', 'id' => '_negotiator_id', 'class' => 'select short', 'selected' => $negotiator_id);
     wp_dropdown_users($args);
     echo '
     </p>';
     $office_id = get_post_meta($post->ID, '_office_id', TRUE);
     if ($parent_post !== FALSE) {
         $office_id = get_post_meta($parent_post, '_office_id', TRUE);
     }
     if ($office_id == '') {
         // TO DO: Get primary office
     }
     echo '<p class="form-field negotiator_field">
     
         <label for="_office_id">' . __('Office', 'propertyhive') . '</label>
         
         <select id="_office_id" name="_office_id" class="select short">';
     $args = array('post_type' => 'office', 'nopaging' => true, 'orderby' => 'title', 'order' => 'ASC');
     $office_query = new WP_Query($args);
     if ($office_query->have_posts()) {
         while ($office_query->have_posts()) {
             $office_query->the_post();
             echo '<option value="' . $post->ID . '"';
             if ($post->ID == $office_id) {
                 echo ' selected';
             }
             echo '>' . get_the_title() . '</option>';
         }
     }
     $office_query->reset_postdata();
     echo '</select>
         
     </p>';
     do_action('propertyhive_property_record_details_fields');
     echo '</div>';
     echo '</div>';
 }
开发者ID:propertyhive,项目名称:WP-Property-Hive,代码行数:60,代码来源:class-ph-meta-box-property-record-details.php


示例8: _output

 function _output($value)
 {
     $this->args['name'] = 'cuztom' . $this->pre . '[' . $this->id . ']' . $this->after . ($this->repeatable ? '[]' : '');
     $this->args['id'] = $this->id . $this->after_id;
     $this->args['selected'] = !empty($value) ? $value : $this->default_value;
     $this->dropdown = wp_dropdown_users($this->args);
     $output = $this->dropdown;
     $output .= $this->output_explanation();
     return $output;
 }
开发者ID:gizburdt,项目名称:cuztom,代码行数:10,代码来源:user_select.class.php


示例9: _replyToAddAuthorTableFilter

 public function _replyToAddAuthorTableFilter()
 {
     if (!$this->oProp->bEnableAuthorTableFileter) {
         return;
     }
     if (!(isset($_GET['post_type']) && post_type_exists($_GET['post_type']) && in_array(strtolower($_GET['post_type']), array($this->oProp->sPostType)))) {
         return;
     }
     wp_dropdown_users(array('show_option_all' => $this->oMsg->get('show_all_authors'), 'show_option_none' => false, 'name' => 'author', 'selected' => !empty($_GET['author']) ? $_GET['author'] : 0, 'include_selected' => false));
 }
开发者ID:jaime5x5,项目名称:seamless-donations,代码行数:10,代码来源:AdminPageFramework_PostType_View.php


示例10: output

 /**
  * Output the metabox
  */
 public static function output($post)
 {
     global $post, $wpdb, $thepostid;
     $enquiry_post = $post;
     wp_nonce_field('propertyhive_save_data', 'propertyhive_meta_nonce');
     echo '<div class="propertyhive_meta_box">';
     echo '<div class="options_group">';
     $args = array('id' => '_status', 'label' => __('Status', 'propertyhive'), 'desc_tip' => false, 'options' => array('open' => __('Open', 'propertyhive'), 'closed' => __('Closed', 'propertyhive')));
     propertyhive_wp_select($args);
     // Negotiator
     $negotiator_id = get_post_meta($post->ID, '_negotiator_id', TRUE);
     echo '<p class="form-field negotiator_id_field">
     
         <label for="_negotiator_id">' . __('Negotiator', 'propertyhive') . '</label>';
     $args = array('show_option_none' => '-- ' . __('Unassigned', 'propertyhive') . ' --', 'name' => '_negotiator_id', 'id' => '_negotiator_id', 'class' => 'select short', 'selected' => $negotiator_id);
     wp_dropdown_users($args);
     echo '
     </p>';
     $office_id = get_post_meta($post->ID, '_office_id', TRUE);
     if ($office_id == '') {
         // if neg isn't set then default to current users offices
         //$negotiator_id = get_current_user_id();
     }
     echo '<p class="form-field office_id_field">
     
         <label for="office_id">' . __('Office', 'propertyhive') . '</label>
         
         <select id="_office_id" name="_office_id" class="select short">';
     $args = array('post_type' => 'office', 'nopaging' => true, 'orderby' => 'title', 'order' => 'ASC');
     $office_query = new WP_Query($args);
     if ($office_query->have_posts()) {
         while ($office_query->have_posts()) {
             $office_query->the_post();
             echo '<option value="' . $post->ID . '"';
             if ($post->ID == $office_id) {
                 echo ' selected';
             }
             echo '>' . get_the_title() . '</option>';
         }
     }
     wp_reset_postdata();
     $post = $enquiry_post;
     echo '</select>
         
     </p>';
     $args = array('id' => '_source', 'label' => __('Source', 'propertyhive'), 'desc_tip' => false, 'options' => array('office' => __('Office', 'propertyhive'), 'website' => __('Website', 'propertyhive')));
     propertyhive_wp_select($args);
     do_action('propertyhive_enquiry_record_details_fields');
     echo '</div>';
     echo '</div>';
 }
开发者ID:propertyhive,项目名称:WP-Property-Hive,代码行数:54,代码来源:class-ph-meta-box-enquiry-record-details.php


示例11: wp_dropdown_users

 /**
  * filter wp dropdown users function
  */
 public function wp_dropdown_users($output)
 {
     global $user_ID;
     $post = false;
     if (isset($_REQUEST['post'])) {
         $post_id = $_REQUEST['post'];
         $post = get_post($post_id);
     }
     /**
      * remove filter to prevent loop
      */
     remove_filter('wp_dropdown_users', array($this, 'wp_dropdown_users'));
     $output = wp_dropdown_users(array('who' => '', 'name' => 'post_author_override', 'selected' => $post && isset($post->ID) ? $post->post_author : $user_ID, 'include_selected' => true, 'echo' => false));
     return $output;
 }
开发者ID:maratdev,项目名称:alllancer,代码行数:18,代码来源:post-meta-box.php


示例12: add_author_filter_to_posts_administration

function add_author_filter_to_posts_administration()
{
    //execute only on the 'post' content type
    global $post_type;
    if ($post_type == 'meal') {
        //get a listing of all users that are 'author' or above
        $user_args = array('show_option_all' => 'All Users', 'orderby' => 'display_name', 'order' => 'ASC', 'name' => 'aurthor_admin_filter', 'who' => 'authors', 'include_selected' => true);
        //determine if we have selected a user to be filtered by already
        if (isset($_GET['aurthor_admin_filter'])) {
            //set the selected value to the value of the author
            $user_args['selected'] = (int) sanitize_text_field($_GET['aurthor_admin_filter']);
        }
        //display the users as a drop down
        wp_dropdown_users($user_args);
    }
}
开发者ID:adnandot,项目名称:intenseburn,代码行数:16,代码来源:all_functions.php


示例13: theme_post_author_override

function theme_post_author_override($output)
{
    global $post;
    // return if this isn't the theme author override dropdown
    if (!preg_match('/post_author_override/', $output)) {
        return $output;
    }
    // return if we've already replaced the list (end recursion)
    if (preg_match('/post_author_override_replaced/', $output)) {
        return $output;
    }
    // replacement call to wp_dropdown_users
    $output = wp_dropdown_users(array('echo' => 0, 'name' => 'post_author_override_replaced', 'selected' => empty($post->ID) ? $user_ID : $post->post_author, 'include_selected' => true));
    // put the original name back
    $output = preg_replace('/post_author_override_replaced/', 'post_author_override', $output);
    return $output;
}
开发者ID:annguyenit,项目名称:getdeal,代码行数:17,代码来源:functions.php


示例14: epl_custom_restrict_manage_posts

function epl_custom_restrict_manage_posts()
{
    global $post_type;
    if ($post_type == 'property' || $post_type == 'rental' || $post_type == 'land' || $post_type == 'commercial' || $post_type == 'rural' || $post_type == 'business' || $post_type == 'holiday_rental' || $post_type == 'commercial_land') {
        //Filter by property_status
        $fields = array('current' => __('Current', 'epl'), 'withdrawn' => __('Withdrawn', 'epl'), 'offmarket' => __('Off Market', 'epl'));
        if ($post_type != 'rental' && $post_type != 'holiday_rental') {
            $fields['sold'] = apply_filters('epl_sold_label_status_filter', __('Sold', 'epl'));
        }
        if ($post_type == 'rental' || $post_type == 'holiday_rental' || $post_type == 'commercial' || $post_type == 'business' || $post_type == 'commercial_land') {
            $fields['leased'] = apply_filters('epl_leased_label_status_filter', __('Leased', 'epl'));
        }
        if (!empty($fields)) {
            $_GET['property_status'] = isset($_GET['property_status']) ? sanitize_text_field($_GET['property_status']) : '';
            echo '<select name="property_status">';
            echo '<option value="">' . __('Filter By Type', 'epl') . '</option>';
            foreach ($fields as $k => $v) {
                $selected = $_GET['property_status'] == $k ? 'selected="selected"' : '';
                echo '<option value="' . $k . '" ' . $selected . '>' . __($v, 'epl') . '</option>';
            }
            echo '</select>';
        }
        $property_author = isset($_GET['property_author']) ? intval($_GET['property_author']) : '';
        // filter by authors
        wp_dropdown_users(array('name' => 'property_author', 'selected' => $property_author, 'show_option_all' => __('All Users', 'epl')));
        $custom_search_fields = array('property_address_suburb' => epl_labels('label_suburb'), 'property_office_id' => __('Office ID', 'epl'), 'property_agent' => __('Listing Agent', 'epl'), 'property_second_agent' => __('Second Listing Agent', 'epl'));
        $custom_search_fields = apply_filters('epl_admin_search_fields', $custom_search_fields);
        if (!empty($custom_search_fields)) {
            $_GET['property_custom_fields'] = isset($_GET['property_custom_fields']) ? sanitize_text_field($_GET['property_custom_fields']) : '';
            echo '<select name="property_custom_fields">';
            echo '<option value="">' . __('Search For :', 'epl') . '</option>';
            foreach ($custom_search_fields as $k => $v) {
                $selected = $_GET['property_custom_fields'] == $k ? 'selected="selected"' : '';
                echo '<option value="' . $k . '" ' . $selected . '>' . __($v, 'epl') . '</option>';
            }
            echo '</select>';
        }
        //Filter by Suburb
        if (isset($_GET['property_custom_value'])) {
            $val = stripslashes($_GET['property_custom_value']);
        } else {
            $val = '';
        }
        echo '<input type="text" name="property_custom_value" placeholder="' . __('Search Value.', 'epl') . '" value="' . $val . '" />';
    }
}
开发者ID:ksan5835,项目名称:rankproperties,代码行数:46,代码来源:post-types.php


示例15: view

    function view()
    {
        global $wpdb;
        echo '<h2>' . __("User Files", "sp-cdm") . '</h2>' . sp_client_upload_nav_menu() . '' . __("Choose a user below to view their files", "sp-cdm") . '<p>
	<div style="margin-top:20px;margin-bottom:20px">
	<script type="text/javascript">
	jQuery(document).ready(function() {
	
	jQuery("#user_uid").change(function() {
		jQuery.cookie("pid", 0, { expires: 7 , path:"/" });
	window.location = "admin.php?page=sp-client-document-manager-fileview&id=" + jQuery("#user_uid").val();
	
	
	})
	});
	</script>
	<form>';
        wp_dropdown_users(array('name' => 'user_uid', 'show_option_none' => 'Choose a user', 'selected' => $_GET['id']));
        echo '</form></div>';
        if ($_GET['id'] != '') {
            echo do_shortcode('[sp-client-document-manager uid="' . $_GET['id'] . '"]');
        }
    }
开发者ID:beafus,项目名称:Living-Meki-Platform,代码行数:23,代码来源:fileview.php


示例16: inline_edit


//.........这里部分代码省略.........
				<span class="input-text-wrap"><input type="text" name="post_name" value="" /></span>
			</label>

	<?php 
                }
                // $bulk
            }
            // post_type_supports title
            ?>

	<?php 
            if (!$bulk) {
                ?>
			<fieldset class="inline-edit-date">
			<legend><span class="title"><?php 
                _e('Date');
                ?>
</span></legend>
				<?php 
                touch_time(1, 1, 0, 1);
                ?>
			</fieldset>
			<br class="clear" />
	<?php 
            }
            // $bulk
            if (post_type_supports($screen->post_type, 'author')) {
                $authors_dropdown = '';
                if (is_super_admin() || current_user_can($post_type_object->cap->edit_others_posts)) {
                    $users_opt = array('hide_if_only_one_author' => false, 'who' => 'authors', 'name' => 'post_author', 'class' => 'authors', 'multi' => 1, 'echo' => 0);
                    if ($bulk) {
                        $users_opt['show_option_none'] = __('&mdash; No Change &mdash;');
                    }
                    if ($authors = wp_dropdown_users($users_opt)) {
                        $authors_dropdown = '<label class="inline-edit-author">';
                        $authors_dropdown .= '<span class="title">' . __('Author') . '</span>';
                        $authors_dropdown .= $authors;
                        $authors_dropdown .= '</label>';
                    }
                }
                // authors
                ?>

	<?php 
                if (!$bulk) {
                    echo $authors_dropdown;
                }
            }
            // post_type_supports author
            if (!$bulk && $can_publish) {
                ?>

			<div class="inline-edit-group">
				<label class="alignleft">
					<span class="title"><?php 
                _e('Password');
                ?>
</span>
					<span class="input-text-wrap"><input type="text" name="post_password" class="inline-edit-password-input" value="" /></span>
				</label>

				<em class="alignleft inline-edit-or">
					<?php 
                /* translators: Between password field and private checkbox on post quick edit interface */
                _e('&ndash;OR&ndash;');
                ?>
开发者ID:rlgod,项目名称:WordPress,代码行数:67,代码来源:class-wp-posts-list-table.php


示例17: wp_dropdown_users

      
     <div class="wrap">
        <div style="margin-top: 10px;"></div> 
        <div id="poststuff" >
            <div class="postbox " id="quick-notice-options">
            
                <div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><span>Author :</span></h3>
                 <div class="inside">
                        <div id="postcustomstuff">
                <div id="custom_box">
                
<?php 
if ($author) {
    wp_dropdown_users(array('selected' => $author, 'name' => 'wpmp_list[author]'));
} else {
    wp_dropdown_users(array('name' => 'wpmp_list[author]'));
}
?>
                </div>
                </div>
                </div>
                
            </div>  
        </div>
    </div>
     </li>
     
     <li>
      
     <div class="wrap">
        <div style="margin-top: 10px;"></div> 
开发者ID:qhuit,项目名称:UrbanPekor,代码行数:30,代码来源:post_form.php


示例18: author_select

 /**
  * Display import options for an individual author. That is, either create
  * a new user based on import info or map to an existing user
  *
  * @param int $n Index for each author in the form
  * @param array $author Author information, e.g. login, display name, email
  */
 function author_select($n, $author)
 {
     _e('Import author:', 'radium');
     echo ' <strong>' . esc_html($author['author_display_name']);
     if ($this->version != '1.0') {
         echo ' (' . esc_html($author['author_login']) . ')';
     }
     echo '</strong><br />';
     if ($this->version != '1.0') {
         echo '<div style="margin-left:18px">';
     }
     $create_users = $this->allow_create_users();
     if ($create_users) {
         if ($this->version != '1.0') {
             _e('or create new user with login name:', 'radium');
             $value = '';
         } else {
             _e('as a new user:', 'radium');
             $value = esc_attr(sanitize_user($author['author_login'], true));
         }
         echo ' <input type="text" name="user_new[' . $n . ']" value="' . $value . '" /><br />';
     }
     if (!$create_users && $this->version == '1.0') {
         _e('assign posts to an existing user:', 'radium');
     } else {
         _e('or assign posts to an existing user:', 'radium');
     }
     wp_dropdown_users(array('name' => "user_map[{$n}]", 'multi' => true, 'show_option_all' => __('- Select -', 'radium')));
     echo '<input type="hidden" name="imported_authors[' . $n . ']" value="' . esc_attr($author['author_login']) . '" />';
     if ($this->version != '1.0') {
         echo '</div>';
     }
 }
开发者ID:Inteleck,项目名称:hwc,代码行数:40,代码来源:wordpress-importer.php


示例19: inline_edit


//.........这里部分代码省略.........
				<span class="input-text-wrap"><input type="text" name="post_name" value="" /></span>
			</label>

	<?php 
                }
                // $bulk
            }
            // post_type_supports title
            ?>

	<?php 
            if (!$bulk) {
                ?>
			<label><span class="title"><?php 
                _e('Date');
                ?>
</span></label>
			<div class="inline-edit-date">
				<?php 
                touch_time(1, 1, 4, 1);
                ?>
			</div>
			<br class="clear" />
	<?php 
            }
            // $bulk
            if (post_type_supports($screen->post_type, 'author')) {
                $authors_dropdown = '';
                if (is_super_admin() || current_user_can($post_type_object->cap->edit_others_posts)) {
                    $users_opt = array('hide_if_only_one_author' => false, 'who' => 'authors', 'name' => 'post_author', 'class' => 'authors', 'multi' => 1, 'echo' => 0);
                    if ($bulk) {
                        $users_opt['show_option_none'] = __('&mdash; No Change &mdash;');
                    }
                    if ($authors = wp_dropdown_users($users_opt)) {
                        $authors_dropdown = '<label class="inline-edit-author">';
                        $authors_dropdown .= '<span class="title">' . __('Author') . '</span>';
                        $authors_dropdown .= $authors;
                        $authors_dropdown .= '</label>';
                    }
                }
                // authors
                ?>

	<?php 
                if (!$bulk) {
                    echo $authors_dropdown;
                }
            }
            // post_type_supports author
            if (!$bulk) {
                ?>

			<div class="inline-edit-group">
				<label class="alignleft">
					<span class="title"><?php 
                _e('Password');
                ?>
</span>
					<span class="input-text-wrap"><input type="text" name="post_password" class="inline-edit-password-input" value="" /></span>
				</label>

				<em style="margin:5px 10px 0 0" class="alignleft">
					<?php 
                /* translators: Between password field and private checkbox on post quick edit interface */
                echo __('&ndash;OR&ndash;');
                ?>
开发者ID:vivekkodira1,项目名称:wordpress,代码行数:67,代码来源:class-wp-posts-list-table.php


示例20: form

    /**
     * Echo the settings update form.
     *
     * @param array $instance Current settings.
     * @return void
     */
    function form($instance)
    {
        // Merge with defaults.
        $instance = wp_parse_args((array) $instance, $this->defaults);
        ?>
		<p>
			<label for="<?php 
        echo esc_attr($this->get_field_id('title'));
        ?>
"><?php 
        _e('Title', 'genesis');
        ?>
:</label>
			<input type="text" id="<?php 
        echo esc_attr($this->get_field_id('title'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('title'));
        ?>
" value="<?php 
        echo esc_attr($instance['title']);
        ?>
" class="widefat" />
		</p>

		<p>
			<label for="<?php 
        echo esc_attr($this->get_field_name('user'));
        ?>
"><?php 
        _e('Select a user. The email address for this account will be used to pull the Gravatar image.', 'genesis');
        ?>
</label><br />
			<?php 
        wp_dropdown_users(array('who' => 'authors', 'name' => $this->get_field_name('user'), 'selected' => $instance['user']));
        ?>
		</p>

		<p>
			<label for="<?php 
        echo esc_attr($this->get_field_id('size'));
        ?>
"><?php 
        _e('Gravatar Size', 'genesis');
        ?>
:</label>
			<select id="<?php 
        echo esc_attr($this->get_field_id('size'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('size'));
        ?>
">
				<?php 
        $sizes = array(__('Small', 'genesis') => 45, __('Medium', 'genesis') => 65, __('Large', 'genesis') => 85, __('Extra Large', 'genesis') => 125);
        $sizes = apply_filters('genesis_gravatar_sizes', $sizes);
        foreach ((array) $sizes as $label => $size) {
            ?>
					<option value="<?php 
            echo absint($size);
            ?>
" <?php 
            selected($size, $instance['size']);
            ?>
><?php 
            printf('%s (%spx)', $label, $size);
            ?>
</option>
				<?php 
        }
        ?>
			</select>
		</p>

		<p>
			<label for="<?php 
        echo esc_attr($this->get_field_id('alignment'));
        ?>
"><?php 
        _e('Gravatar Alignment', 'genesis');
        ?>
:</label>
			<select id="<?php 
        echo esc_attr($this->get_field_id('alignment'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('alignment'));
        ?>
">
				<option value="">- <?php 
        _e('None', 'genesis');
        ?>
 -</option>
				<option value="left" <?php 
//.........这里部分代码省略.........
开发者ID:netmagik,项目名称:netmagik,代码行数:101,代码来源:user-profile-widget.php



注:本文中的wp_dropdown_users函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wp_edit_attachments_query函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_dropdown_roles函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap