当前位置: 首页>>代码示例>>PHP>>正文


PHP wpmem_inc_regmessage函数代码示例

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


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

示例1: ajax_registration_override

 public function ajax_registration_override()
 {
     global $wpmem_regchk, $wpmem_themsg;
     if (version_compare(WPMEM_VERSION, '3', '>=')) {
         require_once WPMEM_PATH . 'inc/dialogs.php';
     } else {
         require_once WPMEM_PATH . 'wp-members-dialogs.php';
     }
     $message = wpmem_inc_regmessage($wpmem_regchk, $wpmem_themsg);
     $response = array('success' => false, 'message' => $message);
     if ($wpmem_regchk != 'success') {
         $field = str_ireplace(array('Sorry', 'is a required field', '.', ','), '', $message);
         $field = str_ireplace(array('<br />', ' '), '_', trim(strtolower($field)));
         switch ($field) {
             case 'username':
             case 'that_username_is_taken_please_try_another':
                 $field = 'log';
                 break;
             case 'you_must_enter_a_valid_email_address':
             case 'that_email_address_already_has_an_account_please_try_another':
                 $field = 'user_email';
                 break;
             case 'address_1':
                 $field = 'addr1';
                 break;
             case 'state':
                 $field = 'thestate';
                 break;
             case 'day_phone':
                 $field = 'phone1';
                 break;
         }
         $field = apply_filters('popmake_wpmembers_ajax_registration_error_field', $field, $message);
         $response['field'] = $field;
     } else {
         $response['success'] = true;
     }
     echo json_encode($response);
     die;
 }
开发者ID:eugene-gromky-co,项目名称:mindfulnesssummit,代码行数:40,代码来源:wp-members.php

示例2: wpmem_do_sc_pages

 /**
  * Builds the shortcode pages (login, register, user-profile, user-edit, password)
  *
  * Some of the logic here is similar to the wpmem_securify() function. But whereas that function handles general
  * content, this function handles building specific pages generated by shortcodes.
  *
  * @since 2.6
  *
  * @param  string $page
  * @global string $wpmem_regchk
  * @global string $wpmem_themsg
  * @global string $wpmem_a
  * @return string $content 
  */
 function wpmem_do_sc_pages($page)
 {
     global $wpmem_regchk, $wpmem_themsg, $wpmem_a;
     include_once WPMEM_PATH . 'wp-members-dialogs.php';
     $content = '';
     // deprecating members-area parameter to be replaced by user-profile
     $page = $page == 'user-profile' ? 'members-area' : $page;
     if ($page == 'members-area' || $page == 'register') {
         if ($wpmem_regchk == "captcha") {
             global $wpmem_captcha_err;
             $wpmem_themsg = __('There was an error with the CAPTCHA form.') . '<br /><br />' . $wpmem_captcha_err;
         }
         if ($wpmem_regchk == "loginfailed") {
             return wpmem_inc_loginfailed();
         }
         if (!is_user_logged_in()) {
             if ($wpmem_a == 'register') {
                 switch ($wpmem_regchk) {
                     case "success":
                         $content = wpmem_inc_regmessage($wpmem_regchk, $wpmem_themsg);
                         $content = $content . wpmem_inc_login();
                         break;
                     default:
                         $content = wpmem_inc_regmessage($wpmem_regchk, $wpmem_themsg);
                         $content = $content . wpmem_inc_registration();
                         break;
                 }
             } elseif ($wpmem_a == 'pwdreset') {
                 $content = wpmem_page_pwd_reset($wpmem_regchk, $content);
             } else {
                 $content = $page == 'members-area' ? $content . wpmem_inc_login('members') : $content;
                 $content = $page == 'register' || WPMEM_NO_REG != 1 ? $content . wpmem_inc_registration() : $content;
             }
         } elseif (is_user_logged_in() && $page == 'members-area') {
             /**
              * Filter the default heading in User Profile edit mode.
              *
              * @since 2.7.5
              *
              * @param string The default edit mode heading.
              */
             $heading = apply_filters('wpmem_user_edit_heading', __('Edit Your Information', 'wp-members'));
             switch ($wpmem_a) {
                 case "edit":
                     $content = $content . wpmem_inc_registration('edit', $heading);
                     break;
                 case "update":
                     // determine if there are any errors/empty fields
                     if ($wpmem_regchk == "updaterr" || $wpmem_regchk == "email") {
                         $content = $content . wpmem_inc_regmessage($wpmem_regchk, $wpmem_themsg);
                         $content = $content . wpmem_inc_registration('edit', $heading);
                     } else {
                         //case "editsuccess":
                         $content = $content . wpmem_inc_regmessage($wpmem_regchk, $wpmem_themsg);
                         $content = $content . wpmem_inc_memberlinks();
                     }
                     break;
                 case "pwdchange":
                     $content = wpmem_page_pwd_reset($wpmem_regchk, $content);
                     break;
                 case "renew":
                     $content = wpmem_renew();
                     break;
                 default:
                     $content = wpmem_inc_memberlinks();
                     break;
             }
         } elseif (is_user_logged_in() && $page == 'register') {
             //return wpmem_inc_memberlinks( 'register' );
             $content = $content . wpmem_inc_memberlinks('register');
         }
     }
     if ($page == 'login') {
         $content = $wpmem_regchk == "loginfailed" ? wpmem_inc_loginfailed() : $content;
         $content = !is_user_logged_in() ? $content . wpmem_inc_login('login') : wpmem_inc_memberlinks('login');
     }
     if ($page == 'password') {
         $content = wpmem_page_pwd_reset($wpmem_regchk, $content);
     }
     if ($page == 'user-edit') {
         $content = wpmem_page_user_edit($wpmem_regchk, $content);
     }
     return $content;
 }
开发者ID:Kylemurray25,项目名称:wmlmusicguide,代码行数:98,代码来源:wp-members-core.php

示例3: wpmem_page_forgot_username

/**
 * Forgot username form.
 *
 * This function creates a form for retrieving a forgotten username.
 *
 * @since 3.0.8
 *
 * @param  string $wpmem_regchk
 * @param  string $content
 * @return string $content
 */
function wpmem_page_forgot_username($wpmem_regchk, $content)
{
    if (!is_user_logged_in()) {
        global $wpmem;
        switch ($wpmem->regchk) {
            case "usernamefailed":
                $msg = __('Sorry, that email address was not found.', 'wp-members');
                $content = $content . wpmem_inc_regmessage('usernamefailed', $msg) . wpmem_inc_forgotusername();
                $wpmem->regchk = '';
                // Clear regchk.
                break;
            case "usernamesuccess":
                $email = isset($_POST['user_email']) ? $_POST['user_email'] : '';
                $msg = sprintf(__('An email was sent to %s with your username.', 'wp-members'), $email);
                $content = $content . wpmem_inc_regmessage('usernamesuccess', $msg);
                $wpmem->regchk = '';
                // Clear regchk.
                break;
            default:
                $content = $content . wpmem_inc_forgotusername();
                break;
        }
    }
    return $content;
}
开发者ID:Geragamer,项目名称:hatalmas-project,代码行数:36,代码来源:dialogs.php

示例4: do_securify

 /**
  * The Securify Content Filter.
  *
  * This is the primary function that picks up where get_action() leaves off.
  * Determines whether content is shown or hidden for both post and pages.
  *
  * @since 3.0
  *
  * @global string $wpmem_themsg      Contains messages to be output.
  * @global string $wpmem_captcha_err Contains error message for reCAPTCHA.
  * @global object $post              The post object.
  * @param  string $content
  * @return string $content
  */
 function do_securify($content = null)
 {
     global $wpmem_themsg, $post;
     $content = is_single() || is_page() ? $content : wpmem_do_excerpt($content);
     if (!wpmem_test_shortcode($content, 'wp-members')) {
         if ($this->regchk == "captcha") {
             global $wpmem_captcha_err;
             $wpmem_themsg = __('There was an error with the CAPTCHA form.') . '<br /><br />' . $wpmem_captcha_err;
         }
         // Block/unblock Posts.
         if (!is_user_logged_in() && $this->is_blocked() == true) {
             include_once WPMEM_PATH . 'inc/dialogs.php';
             //Show the login and registration forms.
             if ($this->regchk) {
                 // Empty content in any of these scenarios.
                 $content = '';
                 switch ($this->regchk) {
                     case "loginfailed":
                         $content = wpmem_inc_loginfailed();
                         break;
                     case "success":
                         $content = wpmem_inc_regmessage($this->regchk, $wpmem_themsg);
                         $content = $content . wpmem_inc_login();
                         break;
                     default:
                         $content = wpmem_inc_regmessage($this->regchk, $wpmem_themsg);
                         $content = $content . wpmem_inc_registration();
                         break;
                 }
             } else {
                 // Toggle shows excerpt above login/reg on posts/pages.
                 global $wp_query;
                 if (isset($wp_query->query_vars['page']) && $wp_query->query_vars['page'] > 1) {
                     // Shuts down excerpts on multipage posts if not on first page.
                     $content = '';
                 } elseif ($this->show_excerpt[$post->post_type] == 1) {
                     if (!stristr($content, '<span id="more')) {
                         $content = wpmem_do_excerpt($content);
                     } else {
                         $len = strpos($content, '<span id="more');
                         $content = substr($content, 0, $len);
                     }
                 } else {
                     // Empty all content.
                     $content = '';
                 }
                 $content = $this->show_login[$post->post_type] == 1 ? $content . wpmem_inc_login() : $content . wpmem_inc_login('page', '', 'hide');
                 $content = $this->show_reg[$post->post_type] == 1 ? $content . wpmem_inc_registration() : $content;
             }
             // Protects comments if expiration module is used and user is expired.
         } elseif (is_user_logged_in() && $this->is_blocked() == true) {
             $content = $this->use_exp == 1 && function_exists('wpmem_do_expmessage') ? wpmem_do_expmessage($content) : $content;
         }
     }
     /**
      * Filter the value of $content after wpmem_securify has run.
      *
      * @since 2.7.7
      *
      * @param string $content The content after securify has run.
      */
     $content = apply_filters('wpmem_securify', $content);
     if (strstr($content, '[wpmem_txt]')) {
         // Fix the wptexturize.
         remove_filter('the_content', 'wpautop');
         remove_filter('the_content', 'wptexturize');
         add_filter('the_content', 'wpmem_texturize', 99);
     }
     return $content;
 }
开发者ID:artsmorgan,项目名称:roiWP,代码行数:84,代码来源:class-wp-members.php

示例5: wpmem_page_forgot_username

/**
 * Forgot username form.
 *
 * This function creates a form for retrieving a forgotten username.
 *
 * @since 3.0.8
 *
 * @param  string $wpmem_regchk
 * @param  string $content
 * @return string $content
 */
function wpmem_page_forgot_username($wpmem_regchk, $content)
{
    if (!is_user_logged_in()) {
        global $wpmem;
        switch ($wpmem->regchk) {
            case "usernamefailed":
                $msg = $wpmem->get_text('usernamefailed');
                $content = $content . wpmem_inc_regmessage('usernamefailed', $msg) . wpmem_inc_forgotusername();
                $wpmem->regchk = '';
                // Clear regchk.
                break;
            case "usernamesuccess":
                $email = isset($_POST['user_email']) ? $_POST['user_email'] : '';
                $msg = sprintf($wpmem->get_text('usernamesuccess'), $email);
                $content = $content . wpmem_inc_regmessage('usernamesuccess', $msg);
                $wpmem->regchk = '';
                // Clear regchk.
                break;
            default:
                $content = $content . wpmem_inc_forgotusername();
                break;
        }
    }
    return $content;
}
开发者ID:pab44,项目名称:pab44,代码行数:36,代码来源:dialogs.php

示例6: wpmem_page_user_edit

/**
 * Creates a user edit page.
 *
 * @since 2.7.6
 *
 * @param  string $wpmem_regchk
 * @param  string $content
 * @return string $content
 */
function wpmem_page_user_edit( $wpmem_regchk, $content ) {

	global $wpmem_a, $wpmem_themsg;
	/**
	 * Filter the default User Edit heading for shortcode.
	 *
	 * @since 2.7.6
	 *
	 * @param string The default edit mode heading.
	 */	
	$heading = apply_filters( 'wpmem_user_edit_heading', __( 'Edit Your Information', 'wp-members' ) );
	
	if ( $wpmem_a == "update") { $content.= wpmem_inc_regmessage( $wpmem_regchk, $wpmem_themsg ); }
	$content = $content . wpmem_inc_registration( 'edit', $heading );
	
	return $content;
}
开发者ID:verbazend,项目名称:AWFA,代码行数:26,代码来源:dialogs.php

示例7: wpmem_page_user_edit

 /**
  * Creates a user edit page
  *
  * @since 2.7.6
  *
  * @param  string $wpmem_regchk
  * @param  string $content
  * @return string $content
  */
 function wpmem_page_user_edit($wpmem_regchk, $content)
 {
     global $wpmem_a, $wpmem_themsg;
     $heading = apply_filters('wpmem_user_edit_heading', __('Edit Your Information', 'wp-members'));
     if ($wpmem_a == "update") {
         $content .= wpmem_inc_regmessage($wpmem_regchk, $wpmem_themsg);
     }
     $content = $content . wpmem_inc_registration('edit', $heading);
     return $content;
 }
开发者ID:googlecode-mirror,项目名称:wpmu-demo,代码行数:19,代码来源:wp-members-dialogs.php

示例8: wpmem_do_sc_pages

 /**
  * Builds the shortcode pages (login, register, user-profile, user-edit, password).
  *
  * Some of the logic here is similar to the wpmem_securify() function. 
  * But where that function handles general content, this function 
  * handles building specific pages generated by shortcodes.
  *
  * @since 2.6.0
  *
  * @global object $wpmem        The WP_Members object.
  * @global string $wpmem_themsg The WP-Members message container.
  * @global object $post         The WordPress post object.
  *
  * @param  string $page
  * @param  string $redirect_to
  * @param  string $tag
  * @return string $content
  */
 function wpmem_do_sc_pages($atts, $content, $tag)
 {
     $page = isset($atts['page']) ? $atts['page'] : $tag;
     $redirect_to = isset($atts['redirect_to']) ? $atts['redirect_to'] : null;
     $hide_register = isset($atts['register']) && 'hide' == $atts['register'] ? true : false;
     global $wpmem, $wpmem_themsg, $post;
     include_once WPMEM_PATH . 'inc/dialogs.php';
     $content = '';
     // Deprecating members-area parameter to be replaced by user-profile.
     $page = $page == 'user-profile' ? 'members-area' : $page;
     if ($page == 'members-area' || $page == 'register') {
         if ($wpmem->regchk == "captcha") {
             global $wpmem_captcha_err;
             $wpmem_themsg = __('There was an error with the CAPTCHA form.') . '<br /><br />' . $wpmem_captcha_err;
         }
         if ($wpmem->regchk == "loginfailed") {
             return wpmem_inc_loginfailed();
         }
         if (!is_user_logged_in()) {
             if ($wpmem->action == 'register' && !$hide_register) {
                 switch ($wpmem->regchk) {
                     case "success":
                         $content = wpmem_inc_regmessage($wpmem->regchk, $wpmem_themsg);
                         $content = $content . wpmem_inc_login();
                         break;
                     default:
                         $content = wpmem_inc_regmessage($wpmem->regchk, $wpmem_themsg);
                         $content = $content . wpmem_inc_registration();
                         break;
                 }
             } elseif ($wpmem->action == 'pwdreset') {
                 $content = wpmem_page_pwd_reset($wpmem->regchk, $content);
             } elseif ($wpmem->action == 'getusername') {
                 $content = wpmem_page_forgot_username($wpmem->regchk, $content);
             } else {
                 $content = $page == 'members-area' ? $content . wpmem_inc_login('members') : $content;
                 $content = ($page == 'register' || $wpmem->show_reg[$post->post_type] != 0) && !$hide_register ? $content . wpmem_inc_registration() : $content;
             }
         } elseif (is_user_logged_in() && $page == 'members-area') {
             /**
              * Filter the default heading in User Profile edit mode.
              *
              * @since 2.7.5
              *
              * @param string The default edit mode heading.
              */
             $heading = apply_filters('wpmem_user_edit_heading', __('Edit Your Information', 'wp-members'));
             switch ($wpmem->action) {
                 case "edit":
                     $content = $content . wpmem_inc_registration('edit', $heading);
                     break;
                 case "update":
                     // Determine if there are any errors/empty fields.
                     if ($wpmem->regchk == "updaterr" || $wpmem->regchk == "email") {
                         $content = $content . wpmem_inc_regmessage($wpmem->regchk, $wpmem_themsg);
                         $content = $content . wpmem_inc_registration('edit', $heading);
                     } else {
                         //Case "editsuccess".
                         $content = $content . wpmem_inc_regmessage($wpmem->regchk, $wpmem_themsg);
                         $content = $content . wpmem_inc_memberlinks();
                     }
                     break;
                 case "pwdchange":
                     $content = wpmem_page_pwd_reset($wpmem->regchk, $content);
                     break;
                 case "renew":
                     $content = wpmem_renew();
                     break;
                 default:
                     $content = wpmem_inc_memberlinks();
                     break;
             }
         } elseif (is_user_logged_in() && $page == 'register') {
             $content = $content . wpmem_inc_memberlinks('register');
         }
     }
     if ($page == 'login') {
         $content = $wpmem->regchk == "loginfailed" ? wpmem_inc_loginfailed() : $content;
         $content = !is_user_logged_in() ? $content . wpmem_inc_login('login', $redirect_to) : wpmem_inc_memberlinks('login');
     }
     if ($page == 'password') {
         $content = wpmem_page_pwd_reset($wpmem->regchk, $content);
//.........这里部分代码省略.........
开发者ID:pab44,项目名称:pab44,代码行数:101,代码来源:shortcodes.php


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