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

PHP userpro_get_option函数代码示例

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

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



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

示例1: userpro_fields_validation

function userpro_fields_validation($errors, $form)
{
    global $userpro;
    $phonefields = userpro_get_option('phonefields');
    if (!$phonefields) {
        $phonefields = array('');
    } else {
        $phonefields = explode(',', $phonefields);
    }
    if (userpro_get_option('max_field_length_active')) {
        $max_field_length_include = userpro_get_option('max_field_length_include');
        if ($max_field_length_include != '') {
            $max_field_length_include = explode(',', $max_field_length_include);
        } else {
            $max_field_length_include = array('');
        }
    }
    // validate form
    foreach ($form as $k => $v) {
        if ($userpro->field_exists($k) && in_array($k, $phonefields) && $v != '' && !preg_match(userpro_get_option('phonefields_regex'), $v)) {
            $errors[$k] = __('Please enter a correct phone number', 'userpro');
        }
        if (isset($max_field_length_include)) {
            if ($userpro->field_exists($k) && $userpro->field_type($k) == 'text' && $v != '' && strlen($v) > userpro_get_option('max_field_length') && $userpro->field_label($k) && in_array($k, $max_field_length_include)) {
                $errors[$k] = sprintf(__('%s must not exceed %s characters', 'userpro'), $userpro->field_label($k), userpro_get_option('max_field_length'));
            }
        }
    }
    return $errors;
}
开发者ID:Darciro,项目名称:PPM,代码行数:30,代码来源:fields-filters.php


示例2: userpro_before_form_submit

function userpro_before_form_submit($args)
{
    global $userpro;
    extract($args);
    if ($args['template'] == 'register' && userpro_get_option('terms_agree') == 1) {
        ?>
			
			<div class="userpro-column">
				<div class="userpro-field userpro-maxwidth" data-required="1" data-required_msg="<?php 
        _e('You must accept our terms and conditions', 'userpro');
        ?>
">
					<div class="userpro-input">
					
						<div class='userpro-checkbox-wrap'>
							<label class='userpro-checkbox full'>
								<span></span>
								<input type='checkbox' name='terms' id="terms" /><?php 
        echo html_entity_decode(userpro_get_option('terms_agree_text'));
        ?>
							</label>
						</div>
						
					</div>
				</div>
			</div><div class="userpro-clear"></div>
			
			<?php 
    }
}
开发者ID:fritzdenim,项目名称:pangMoves,代码行数:30,代码来源:terms-agreement.php


示例3: userpro_get_avatar

function userpro_get_avatar($avatar, $id_or_email, $size, $default, $alt = '')
{
    global $userpro;
    if (isset($id_or_email->user_id)) {
        $id_or_email = $id_or_email->user_id;
    } elseif (is_email($id_or_email)) {
        $user = get_user_by('email', $id_or_email);
        $id_or_email = $user->ID;
    }
    if ($id_or_email && userpro_profile_data('profilepicture', $id_or_email)) {
        $url = $userpro->file_uri(userpro_profile_data('profilepicture', $id_or_email));
        $crop = userpro_url . "lib/timthumb.php?src=" . $url . "&amp;w={$size}&amp;h={$size}&amp;a=t&amp;q=100";
        $return = '<img src="' . $crop . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="modified avatar" />';
    } else {
        if ($id_or_email && userpro_profile_data('gender', $id_or_email)) {
            $gender = strtolower(userpro_profile_data('gender', $id_or_email));
        } else {
            $gender = 'male';
            // default gender
        }
        $userpro_default = userpro_url . 'img/default_avatar_' . $gender . '.jpg';
        $return = '<img src="' . $userpro_default . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="default avatar" />';
    }
    if (userpro_profile_data('profilepicture', $id_or_email) != '') {
        return $return;
    } else {
        if (userpro_get_option('use_default_avatars') == 1) {
            return $avatar;
        } else {
            return $return;
        }
    }
}
开发者ID:ingridlima,项目名称:userpro-custom,代码行数:33,代码来源:hooks-filters.php


示例4: userpro_get_avatar

function userpro_get_avatar($avatar, $id_or_email, $size, $default, $alt = '')
{
    global $userpro;
    require_once userpro_path . 'lib/BFI_Thumb.php';
    if (isset($id_or_email->user_id)) {
        $id_or_email = $id_or_email->user_id;
    } elseif (is_email($id_or_email)) {
        $user = get_user_by('email', $id_or_email);
        $id_or_email = $user->ID;
    }
    if ($id_or_email && userpro_profile_data('profilepicture', $id_or_email)) {
        $url = $userpro->file_uri(userpro_profile_data('profilepicture', $id_or_email), $id_or_email);
        $params = array('width' => $size, 'height' => $size, 'quality' => 100);
        $crop = bfi_thumb(get_site_url() . (strpos($url, "http") !== false ? urlencode($url) : $url), $params);
        $return = '<img src="' . $crop . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="modified avatar" />';
    } else {
        if ($id_or_email && userpro_profile_data('gender', $id_or_email)) {
            $gender = strtolower(userpro_profile_data('gender', $id_or_email));
        } else {
            $gender = 'male';
            // default gender
        }
        $userpro_default = userpro_url . 'img/default_avatar_' . $gender . '.jpg';
        $return = '<img src="' . $userpro_default . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="default avatar" />';
    }
    if (userpro_profile_data('profilepicture', $id_or_email) != '') {
        return $return;
    } else {
        if (userpro_get_option('use_default_avatars') == 1) {
            return $avatar;
        } else {
            return $return;
        }
    }
}
开发者ID:fritzdenim,项目名称:pangMoves,代码行数:35,代码来源:hooks-filters.php


示例5: userpro_remove_admin_bar

function userpro_remove_admin_bar()
{
    if (!current_user_can('manage_options') && !is_admin()) {
        if (userpro_get_option('hide_admin_bar')) {
            show_admin_bar(false);
        }
    }
}
开发者ID:ingridlima,项目名称:userpro-custom,代码行数:8,代码来源:hooks-actions.php


示例6: userpro_admin_users_badges

function userpro_admin_users_badges($value, $column_name, $user_id)
{
    global $userpro;
    $user = get_userdata($user_id);
    if (userpro_get_option('backend_users_change')) {
        if ('userpro_username' == $column_name) {
            $res = '<div class="upadmin-avatar">' . get_avatar($user_id, 40) . '</div>';
            $res .= '<strong><a href="' . $userpro->permalink($user_id) . '" target="_blank" title="' . __('View Profile', 'userpro') . '">' . $user->user_login . '</a></strong><br />';
            $res .= '<span class="upadmin-small-name">(' . userpro_profile_data('display_name', $user_id) . ')</span>';
            $res .= '<div class="row-actions"><span class="edit"><a href="' . $userpro->permalink($user_id, 'edit') . '" target="_blank">' . __('Edit Profile', 'userpro') . '</a></span></div>';
            return $res;
        }
    }
    if ('userpro_admin_badges' == $column_name) {
        $res = userpro_show_badges($user_id, true);
        return $res;
    }
    if ('userpro_verify' == $column_name) {
        $res = '<div class="upadmin-verify-v2">';
        if ($userpro->get_verified_status($user_id) == 0) {
            $res .= '<a href="#" class="button upadmin-verify-u" data-user="' . $user_id . '">' . userpro_get_badge('unverified') . '</a>';
        } else {
            if (userpro_is_admin($user_id)) {
                $res .= '<a href="#" class="button button-primary upadmin-unverify-u" data-user="' . $user_id . '">' . userpro_get_badge('verified') . '</a>';
            } else {
                $res .= '<a href="#" class="button button-primary upadmin-unverify-u" data-user="' . $user_id . '">' . userpro_get_badge('verified') . '</a>';
            }
        }
        if ($userpro->get_verified_status($user_id) == 0) {
            if ($userpro->invited_to_verify($user_id)) {
                $res .= '&nbsp;&nbsp;' . __('Invitation sent!', 'userpro');
            } else {
                $res .= '<a href="#" class="button upadmin-invite-u" data-user="' . $user_id . '">' . __('Verified Invite', 'userpro') . '</a>';
            }
        }
        $res .= '</div>';
        return $res;
    }
    if ('block_users' == $column_name) {
        $res = '<div class="upadmin-block-v2">';
        if ($userpro->get_account_status($user_id) == 0) {
            $res .= '<a href="#" class="button upadmin-block-u" data-user="' . $user_id . '">' . userpro_get_badge('unblocked') . '</a>';
        } else {
            if (userpro_is_admin($user_id)) {
                $res .= '<a href="#" class="button upadmin-unblock-u" data-user="' . $user_id . '">' . userpro_get_badge('blocked') . '</a>';
            } else {
                $res .= '<a href="#" class="button upadmin-unblock-u" data-user="' . $user_id . '">' . userpro_get_badge('blocked') . '</a>';
            }
        }
        if ($userpro->get_account_status($user_id) == 1) {
            $res .= '<span class="button" data-user="' . $user_id . '">' . __('Account Blocked', 'userpro') . '</span>';
        }
        $res .= '</div>';
        $res .= '</div>';
        return $res;
    }
    return $value;
}
开发者ID:Darciro,项目名称:PPM,代码行数:58,代码来源:admin-users.php


示例7: userpro_register_redirect_uri

function userpro_register_redirect_uri()
{
    global $userpro;
    $possible = userpro_get_option('register_redirect_users');
    if ($possible == 1) {
        return $userpro->permalink(0, 'register');
    }
    if ($possible == 2) {
        return userpro_get_option('register_redirect_users_url');
    }
}
开发者ID:ingridlima,项目名称:userpro-custom,代码行数:11,代码来源:common-functions.php


示例8: userpro_remove_admin_bar

function userpro_remove_admin_bar()
{
    global $userpro;
    if (!current_user_can('manage_options') && !is_admin()) {
        if (userpro_get_option('hide_admin_bar')) {
            if (userpro_get_option('allow_dashboard_for_these_roles') && userpro_is_logged_in() && $userpro->user_role_in_array(get_current_user_id(), explode(',', userpro_get_option('allow_dashboard_for_these_roles')))) {
            } else {
                show_admin_bar(false);
            }
        }
    }
}
开发者ID:httvncoder,项目名称:151722441,代码行数:12,代码来源:hooks-actions.php


示例9: userpro_unverify_verified_account

function userpro_unverify_verified_account($form, $user_id)
{
    global $userpro;
    // validate display name change
    if (!userpro_is_admin($user_id) && userpro_get_option('unverify_on_namechange') && $userpro->get_verified_status($user_id) == 1 && !current_user_can('manage_options')) {
        if (isset($form['display_name'])) {
            $old_displayname = userpro_profile_data('display_name', $user_id);
            $new_displayname = $form['display_name'];
            if ($new_displayname != $old_displayname) {
                $userpro->unverify($user_id);
            }
        }
    }
}
开发者ID:httvncoder,项目名称:151722441,代码行数:14,代码来源:fields-hooks.php


示例10: widget

    public function widget($args, $instance)
    {
        if (userpro_get_option('userpro_invite_emails_enable') == 1 && is_user_logged_in()) {
            $text = empty($instance['text']) ? '' : apply_filters('widget_text', $instance['text']);
            echo $args['before_widget'];
            if (!empty($instance['title'])) {
                echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title'];
            }
            ?>
	
	<?php 
            include userpro_path . "templates/inviter_user_widgets.php";
            echo $args['after_widget'];
        }
    }
开发者ID:Darciro,项目名称:PPM,代码行数:15,代码来源:invite_users_widgets.php


示例11: userpro_update_1024

function userpro_update_1024()
{
    if (!userpro_update_installed('1024') && get_option('userpro_pages')) {
        $pages = get_option('userpro_pages');
        if (!isset($pages['logout_page'])) {
            $slug_logout = userpro_get_option('slug_logout');
            $logout_page = array('post_title' => __('Logout', 'userpro'), 'post_content' => '', 'post_name' => $slug_logout, 'comment_status' => 'closed', 'post_type' => 'page', 'post_status' => 'publish', 'post_author' => 1);
            $logout_page = wp_insert_post($logout_page);
            $pages['logout_page'] = $logout_page;
            $post = get_post($logout_page, ARRAY_A);
            userpro_set_option('slug_logout', $post['post_name']);
            update_option('userpro_pages', $pages);
            update_option("userpro_update_1024", 1);
        }
    }
}
开发者ID:Darciro,项目名称:PPM,代码行数:16,代码来源:userpro_1.0.24.php


示例12: new_notification

 function new_notification($to, $user_id = 0, $action)
 {
     global $userpro;
     $headers = 'From: ' . userpro_get_option('mail_from_name') . ' <' . userpro_get_option('mail_from') . '>' . "\r\n";
     switch ($action) {
         case 'new_follow':
             $subject = sprintf(__('%s is now following you!', 'userpro'), userpro_profile_data('display_name', $user_id));
             $message = __('Hi there,', 'userpro') . "\r\n\r\n";
             $message .= sprintf(__("%s is now following you on %s! You can click the following link to view his/her profile:", "userpro"), userpro_profile_data('display_name', $user_id), userpro_get_option('mail_from_name')) . "\r\n";
             $message .= $userpro->permalink($user_id) . "\r\n\r\n";
             $message .= __("Or view your profile at:", "userpro") . "\r\n";
             $message .= $userpro->permalink($to->ID) . "\r\n\r\n";
             $message .= __('This is an automated notification that was sent to you by UserPro. No further action is needed.', 'userpro');
             break;
     }
     wp_mail($to->user_email, $subject, $message, $headers);
 }
开发者ID:ingridlima,项目名称:userpro-custom,代码行数:17,代码来源:api.php


示例13: userpro_sc_bar

function userpro_sc_bar($args)
{
    global $userpro, $userpro_social;
    extract($args);
    if (!userpro_get_option('modstate_social')) {
        return false;
    }
    // where to add the hook
    if (in_array($args['template'], array('view', 'following', 'followers')) && !isset($args['no_style'])) {
        ?>
		
		<div class="userpro-sc-bar">
		
			<div class="userpro-sc-left">
				<a href="<?php 
        echo $userpro->permalink($user_id, 'following', 'userpro_sc_pages');
        ?>
" class="userpro-count-link"><?php 
        echo $userpro_social->following_count($user_id);
        ?>
</a>
				<a href="<?php 
        echo $userpro->permalink($user_id, 'followers', 'userpro_sc_pages');
        ?>
" class="userpro-count-link"><?php 
        echo $userpro_social->followers_count($user_id);
        ?>
</a>
			</div>
			
			<div class="userpro-sc-right">
				<?php 
        echo $userpro_social->follow_text($user_id, get_current_user_id());
        ?>
				<?php 
        do_action('userpro_social_buttons', $user_id);
        ?>
			</div>
			
			<div class="userpro-clear"></div>
		
		</div>
		
		<?php 
    }
}
开发者ID:fritzdenim,项目名称:pangMoves,代码行数:46,代码来源:hooks-actions.php


示例14: email_broadcaster

 function email_broadcaster($to, $msg)
 {
     global $userpro;
     if (userpro_msg_get_option('email_notifications') == 1) {
         $user = get_userdata($to);
         $display_name = userpro_profile_data('display_name', userpro_get_option('mail_from'));
         $subject = sprintf(__('Your Message has been Broadcast Successful!', 'userpro-msg'), $display_name);
         // message
         $msg = stripslashes($msg);
         $body = __('Hi there,', 'userpro-msg') . "<br>";
         $body .= sprintf(__('Your message has been broadcasted successfully', 'userpro-msg'), userpro_get_option('mail_from_name'), $display_name) . "<br>";
         $body .= sprintf(__('The message you have broadcasted is :', 'userpro-msg')) . "<br>";
         $body .= "===========================================" . "<br>";
         $body .= $msg . "<br>";
         $body .= "===========================================" . "<br>";
         $headers = 'From: ' . userpro_get_option('mail_from_name') . ' <' . userpro_get_option('mail_from') . '>' . "\r\n";
         $headers .= "MIME-Version: 1.0" . "\r\n";
         $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
         wp_mail($user->user_email, $subject, $body, $headers);
     }
 }
开发者ID:fritzdenim,项目名称:pangMoves,代码行数:21,代码来源:api.php


示例15: userpro_init

function userpro_init()
{
    if (!isset($_SESSION)) {
        session_start();
    }
    global $userpro;
    $result = get_option("userpro_invite_check");
    if (empty($result)) {
        $user_invite_template = userpro_get_option('userpro_invite_emails_template');
        $userpro_options = get_option('userpro');
        $userpro_options['userpro_invite_emails_template'] = str_replace("inivitelink", "invitelink", userpro_get_option('userpro_invite_emails_template'));
        update_option('userpro', $userpro_options);
        update_option("userpro_invite_check", "1");
    }
    $userpro->do_uploads_dir();
    load_plugin_textdomain('userpro', false, dirname(plugin_basename(__FILE__)) . '/languages');
    /* include libs */
    require_once userpro_path . '/lib/envato/Envato_marketplaces.php';
    if (!class_exists('UserProMailChimp')) {
        require_once userpro_path . '/lib/mailchimp/MailChimp.php';
    }
}
开发者ID:Darciro,项目名称:PPM,代码行数:22,代码来源:index.php


示例16: userpro_get_option

    if (userpro_get_option('facebook_publish_autopost_description')) {
        $description = userpro_get_option('facebook_publish_autopost_description');
        // full description
    } else {
        $description = '';
    }
    if (userpro_get_option('facebook_publish_autopost_link')) {
        $link = userpro_get_option('facebook_publish_autopost_link');
        // link
    } else {
        $link = '';
    }
    ?>

<div id="fb-post-data" data-fbappid="<?php 
    echo userpro_get_option('facebook_app_id');
    ?>
" data-message="<?php 
    echo $body;
    ?>
" data-caption="<?php 
    echo $caption;
    ?>
" data-link="<?php 
    echo $link;
    ?>
" data-name="<?php 
    echo $name;
    ?>
" data-description="<?php 
    echo $description;
开发者ID:fritzdenim,项目名称:pangMoves,代码行数:31,代码来源:publish.php


示例17: userpro_mail

/**
	Sends mail
	This function manage the Mail stuff sent by plugin
	to users
	**/
function userpro_mail($id, $template = null, $var1 = null, $form = null)
{
    global $userpro;
    $user = get_userdata($id);
    $builtin = array('{USERPRO_ADMIN_EMAIL}' => userpro_get_option('mail_from'), '{USERPRO_BLOGNAME}' => userpro_get_option('mail_from_name'), '{USERPRO_BLOG_URL}' => home_url(), '{USERPRO_BLOG_ADMIN}' => admin_url(), '{USERPRO_LOGIN_URL}' => $userpro->permalink(0, 'login'), '{USERPRO_USERNAME}' => $user->user_login, '{USERPRO_FIRST_NAME}' => userpro_profile_data('first_name', $user->ID), '{USERPRO_LAST_NAME}' => userpro_profile_data('last_name', $user->ID), '{USERPRO_NAME}' => userpro_profile_data('display_name', $user->ID), '{USERPRO_EMAIL}' => $user->user_email, '{USERPRO_PROFILE_LINK}' => $userpro->permalink($user->ID), '{USERPRO_VALIDATE_URL}' => $userpro->create_validate_url($user->ID), '{USERPRO_PENDING_REQUESTS_URL}' => admin_url() . '?page=userpro&tab=requests', '{USERPRO_ACCEPT_VERIFY_INVITE}' => $userpro->accept_invite_to_verify($user->ID));
    if (isset($var1) && !empty($var1)) {
        $builtin['{VAR1}'] = $var1;
    }
    if (isset($form) && $form != '') {
        $builtin['{USERPRO_PROFILE_FIELDS}'] = $userpro->extract_profile_for_mail($user->ID, $form);
    }
    $search = array_keys($builtin);
    $replace = array_values($builtin);
    $headers = 'From: ' . userpro_get_option('mail_from_name') . ' <' . userpro_get_option('mail_from') . '>' . "\r\n";
    /////////////////////////////////////////////////////////
    /* verify email/new registration */
    /////////////////////////////////////////////////////////
    if ($template == 'verifyemail') {
        $subject = userpro_get_option('mail_verifyemail_s');
        $message = userpro_get_option('mail_verifyemail');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* secret key request */
    /////////////////////////////////////////////////////////
    if ($template == 'secretkey') {
        $subject = userpro_get_option('mail_secretkey_s');
        $message = userpro_get_option('mail_secretkey');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* account being removed */
    /////////////////////////////////////////////////////////
    if ($template == 'accountdeleted') {
        $subject = userpro_get_option('mail_accountdeleted_s');
        $message = userpro_get_option('mail_accountdeleted');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* verification invite */
    /////////////////////////////////////////////////////////
    if ($template == 'verifyinvite') {
        $subject = userpro_get_option('mail_verifyinvite_s');
        $message = userpro_get_option('mail_verifyinvite');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* account being verified */
    /////////////////////////////////////////////////////////
    if ($template == 'accountverified') {
        $subject = userpro_get_option('mail_accountverified_s');
        $message = userpro_get_option('mail_accountverified');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* account being unverified */
    /////////////////////////////////////////////////////////
    if ($template == 'accountunverified') {
        $subject = userpro_get_option('mail_accountunverified_s');
        $message = userpro_get_option('mail_accountunverified');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* new user's account */
    /////////////////////////////////////////////////////////
    if ($template == 'newaccount' && !$userpro->is_pending($user->ID)) {
        $subject = userpro_get_option('mail_newaccount_s');
        $message = userpro_get_option('mail_newaccount');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* email user except: profileupdate */
    /////////////////////////////////////////////////////////
    if ($template != 'profileupdate' && $template != 'pendingapprove') {
        wp_mail($user->user_email, $subject, $message, $headers);
    }
    /////////////////////////////////////////////////////////
    /* admin emails notifications */
    /////////////////////////////////////////////////////////
    if ($template == 'pendingapprove') {
        $subject = userpro_get_option('mail_admin_pendingapprove_s');
        $message = userpro_get_option('mail_admin_pendingapprove');
        $message = str_replace($search, $replace, $message);
        wp_mail(userpro_get_option('mail_from'), $subject, $message, $headers);
    }
    if ($template == 'newaccount') {
        $subject = userpro_get_option('mail_admin_newaccount_s');
        $message = userpro_get_option('mail_admin_newaccount');
        $message = str_replace($search, $replace, $message);
        wp_mail(userpro_get_option('mail_from'), $subject, $message, $headers);
    }
    if ($template == 'accountdeleted' && userpro_get_option('notify_admin_profile_remove')) {
        $subject = userpro_get_option('mail_admin_accountdeleted_s');
        $message = userpro_get_option('mail_admin_accountdeleted');
        $message = str_replace($search, $replace, $message);
//.........这里部分代码省略.........
开发者ID:fritzdenim,项目名称:pangMoves,代码行数:101,代码来源:mail-functions.php


示例18: userpro_edit_field


//.........这里部分代码省略.........
                                    }
                                    foreach ($options as $k => $v) {
                                        $v = stripslashes($v);
                                        $res .= '<option value="' . $v . '" ' . selected($v, $value, 0) . '>' . $v . '</option>';
                                    }
                                }
                                $res .= "</select>";
                            }
                        }
                    } elseif ($key == 'billing_country') {
                        foreach ($country as $country_code => $country_name) {
                            if ($country_code == $value || $country_name == $value) {
                                $value = $country_name;
                                if (!isset($value)) {
                                    $value = 0;
                                }
                                if (isset($array['default']) && !$value) {
                                    $value = $array['default'];
                                }
                                $res .= "<select name='{$key}-{$i}' id='{$key}-{$i}' class='chosen-select' data-placeholder='" . $array['placeholder'] . "' {$data} >";
                                if (is_array($options)) {
                                    if (isset($array['placeholder']) && !empty($array['placeholder'])) {
                                        $res .= '<option value="" ' . selected(0, $value, 0) . '></option>';
                                    }
                                    foreach ($options as $k => $v) {
                                        $v = stripslashes($v);
                                        $res .= '<option value="' . $v . '" ' . selected($v, $value, 0) . '>' . $v . '</option>';
                                    }
                                }
                                $res .= "</select>";
                            }
                        }
                    } elseif ($key == 'role') {
                        $options = userpro_get_roles(userpro_get_option('allowed_roles'));
                        if (!isset($value)) {
                            $value = 0;
                        }
                        $res .= "<select name='{$key}-{$i}' id='{$key}-{$i}' class='chosen-select' data-placeholder='" . $array['placeholder'] . "' {$data} >";
                        if (is_array($options)) {
                            if (isset($array['placeholder']) && !empty($array['placeholder'])) {
                                $res .= '<option value="" ' . selected(0, $value, 0) . '></option>';
                            }
                            foreach ($options as $k => $v) {
                                $v = stripslashes($v);
                                $res .= '<option value="' . $k . '" ' . selected($k, $value, 0) . '>' . $v . '</option>';
                            }
                        }
                        $res .= "</select>";
                    } else {
                        if (!isset($value)) {
                            $value = 0;
                        }
                        if (isset($array['default']) && !$value) {
                            $value = $array['default'];
                        }
                        $res .= "<select name='{$key}-{$i}' id='{$key}-{$i}' class='chosen-select' data-placeholder='" . $array['placeholder'] . "' {$data} >";
                        if (is_array($options)) {
                            if (isset($array['placeholder']) && !empty($array['placeholder'])) {
                                $res .= '<option value="" ' . selected(0, $value, 0) . '></option>';
                            }
                            foreach ($options as $k => $v) {
                                $v = stripslashes($v);
                                $res .= '<option value="' . $v . '" ' . selected($v, $value, 0) . '>' . $v . '</option>';
                            }
                        }
                        $res .= "</select>";
开发者ID:fritzdenim,项目名称:pangMoves,代码行数:67,代码来源:fields-functions.php


示例19: _e

_e('Subject', 'userpro');
?>
</label></th>
		<td><input type="text" name="mail_verifyinvite_s" id="mail_verifyinvite_s" value="<?php 
echo userpro_get_option('mail_verifyinvite_s');
?>
" class="regular-text" /></td>
	</tr>
	
	<tr valign="top">
		<th scope="row"><label for="mail_verifyinvite"><?php 
_e('Email Content', 'userpro');
?>
</label></th>
		<td><textarea name="mail_verifyinvite" id="mail_verifyinvite" class="large-text code" rows="10"><?php 
echo userpro_get_option('mail_verifyinvite');
?>
</textarea></td>
	</tr>
	
</table>

<p class="submit">
	<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php 
_e('Save Changes', 'userpro');
?>
"  />
	<input type="submit" name="reset-options" id="reset-options" class="button" value="<?php 
_e('Reset Options', 'userpro');
?>
"  />
开发者ID:fritzdenim,项目名称:pangMoves,代码行数:31,代码来源:mail.php


示例20: userpro_get_option

		<td>
			<input type="text" name="envato_api" id="envato_api" value="<?php 
echo userpro_get_option('envato_api');
?>
" class="regular-text" />
		</td>
	</tr>
	
	<tr valign="top">
		<th scope="row"><label for="envato_username"><?php 
_e('Envato Username', 'userpro');
?>
</label></th>
		<td>
			<input type="text" name="envato_username" id="envato_username" value="<?php 
echo userpro_get_option('envato_username');
?>
" class="regular-text" />
		</td>
	</tr>

</table>

<!--Globla hook for adding extra setting fields   Added by Rahul-->
<?php 
do_action("userpro_add_setting_fields");
?>
<p class="submit">
	<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php 
_e('Save Changes', 'userpro');
?>
开发者ID:fritzdenim,项目名称:pangMoves,代码行数:31,代码来源:settings.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP userpro_is_logged_in函数代码示例发布时间:2022-05-23
下一篇:
PHP username_load_fields_from_object函数代码示例发布时间: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