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


PHP ThemexCore::checkOption方法代码示例

本文整理汇总了PHP中ThemexCore::checkOption方法的典型用法代码示例。如果您正苦于以下问题:PHP ThemexCore::checkOption方法的具体用法?PHP ThemexCore::checkOption怎么用?PHP ThemexCore::checkOption使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ThemexCore的用法示例。


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

示例1:

toggle-<?php 
    echo $GLOBALS['lesson']->post_parent;
    ?>
 lesson-child<?php 
}
?>
 <?php 
if (ThemexCourse::isMember() && ThemexLesson::$data['progress'] != 0) {
    ?>
completed<?php 
}
?>
">
	<div class="lesson-title">
		<?php 
if (ThemexCore::checkOption('lesson_collapse') && ($GLOBALS['lesson']->post_parent != 0 || isset(ThemexCourse::$data['lessons'][$GLOBALS['index'] + 1]) && ThemexCourse::$data['lessons'][$GLOBALS['index'] + 1]->post_parent !== 0)) {
    ?>
		<div class="lesson-toggle toggle-element" data-class="toggle-<?php 
    echo $GLOBALS['lesson']->ID;
    ?>
"></div>
		<?php 
}
?>
		<?php 
if (ThemexLesson::$data['status'] == 'free') {
    ?>
		<div class="course-status"><?php 
    _e('Free', 'academy');
    ?>
</div>
开发者ID:rinodung,项目名称:wordpress-demo,代码行数:31,代码来源:content-lesson.php

示例2: _e

    _e('Password', 'academy');
    ?>
" />
			</div>
		</div>
		<div class="sixcol column last">
			<div class="field-wrapper">
				<input type="password" name="user_password_repeat" placeholder="<?php 
    _e('Repeat Password', 'academy');
    ?>
" />
			</div>
		</div>
		<div class="clear"></div>			
		<?php 
    if (ThemexCore::checkOption('user_captcha')) {
        ?>
		<div class="form-captcha">
			<img src="<?php 
        echo THEMEX_URI;
        ?>
assets/images/captcha/captcha.php" alt="" />
			<input type="text" name="captcha" id="captcha" size="6" value="" />
		</div>
		<div class="clear"></div>
		<?php 
    }
    ?>
		<a href="#" class="element-button submit-button left"><span class="button-icon register"></span><?php 
    _e('Register', 'academy');
    ?>
开发者ID:rinodung,项目名称:wordpress-demo,代码行数:31,代码来源:form-login.php

示例3: uncompleteCourse

 /**
  * Uncompletes course
  *
  * @access public
  * @return void
  */
 public static function uncompleteCourse()
 {
     if (self::isMember() && !ThemexCore::checkOption('course_retake')) {
         ThemexCore::removeUserRelation(get_current_user_id(), self::$data['ID'], 'certificate');
     }
 }
开发者ID:rinodung,项目名称:wordpress-demo,代码行数:12,代码来源:themex.course.php

示例4: get_header

*/
get_header();
get_sidebar('profile-left');
?>
<div class="column fivecol">
	<div class="element-title indented">
		<h1><?php 
_e('My Address', 'makery');
?>
</h1>
	</div>
	<?php 
ThemexInterface::renderTemplateContent('profile-address');
?>
	<?php 
if (!ThemexWoo::isActive() || ThemexCore::checkOption('profile_address')) {
    ?>
	<span class="secondary"><?php 
    _e('There are no fields in this form.', 'makery');
    ?>
</span>
	<?php 
} else {
    ?>
	<form action="" method="POST" class="site-form">
		<div class="message">
			<?php 
    ThemexInterface::renderMessages(themex_value('success', $_POST, false));
    ?>
		</div>
		<table class="profile-fields">
开发者ID:qhuit,项目名称:UrbanPekor,代码行数:31,代码来源:template-profile-address.php

示例5:

            }
            ?>
		</a>
		<input type="hidden" name="course_action" value="add_user" />
		<input type="hidden" name="user_redirect" value="<?php 
            echo ThemexCourse::$data['ID'];
            ?>
" />
		<?php 
        }
        ?>
	<?php 
    } else {
        ?>
		<?php 
        if (!ThemexCore::checkOption('course_retake')) {
            ?>
		<a href="#" class="element-button secondary medium submit-button left"><?php 
            _e('Unsubscribe Now', 'academy');
            ?>
</a>
		<input type="hidden" name="course_action" value="remove_user" />
		<?php 
        }
        ?>
		<?php 
        if (ThemexCourse::hasCertificate()) {
            ?>
		<a href="<?php 
            echo ThemexCore::getURL('certificate', themex_encode(ThemexCourse::$data['ID'], ThemexUser::$data['user']['ID']));
            ?>
开发者ID:haythameyd,项目名称:powrly,代码行数:31,代码来源:module-form.php

示例6:

					<?php 
                    }
                }
                ?>
			</tbody>
		</table>
		<div class="profile-description">
			<?php 
                ThemexInterface::renderEditor('content', ThemexWoo::$data['product']['content']);
                ?>
		</div>
		<?php 
                if (ThemexWoo::$data['product']['status'] == 'draft') {
                    ?>
			<?php 
                    if (ThemexCore::checkOption('shop_approve')) {
                        ?>
			<a href="#" class="element-button element-submit primary"><?php 
                        _e('Save Changes', 'makery');
                        ?>
</a>
			<?php 
                    } else {
                        ?>
			<a href="#" class="element-button element-submit primary"><?php 
                        _e('Submit for Review', 'makery');
                        ?>
</a>
			<?php 
                    }
                    ?>
开发者ID:qhuit,项目名称:UrbanPekor,代码行数:31,代码来源:template-shop-product.php

示例7: apply_filters

*/
if (!defined('ABSPATH')) {
    exit;
}
global $product;
?>
<div class="item-options right">
	<form class="element-form" method="POST" action="<?php 
echo AJAX_URL;
?>
">
		<?php 
echo apply_filters('woocommerce_loop_add_to_cart_link', sprintf('<a href="%s" title="%s" rel="nofollow" data-product_id="%s" data-product_sku="%s" data-quantity="%s" class="%s product_type_%s"><span class="fa fa-shopping-cart large"></span></a>', esc_url($product->add_to_cart_url()), esc_html($product->add_to_cart_text()), esc_attr($product->id), esc_attr($product->get_sku()), esc_attr(isset($quantity) ? $quantity : 1), $product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : 'hidden', esc_attr($product->product_type)), $product);
?>
		<?php 
if (!ThemexCore::checkOption('product_favorites')) {
    ?>
		<?php 
    if (is_user_logged_in()) {
        ?>
			<?php 
        if (in_array($product->id, ThemexUser::$data['current']['favorites'])) {
            ?>
			<a href="#" title="<?php 
            _e('Remove from Favorites', 'makery');
            ?>
" class="element-submit primary active" data-title="<?php 
            _e('Add to Favorites', 'makery');
            ?>
"><span class="fa fa-heart small"></span></a>
			<input type="hidden" name="user_action" class="toggle" value="remove_relation" data-value="add_relation" />
开发者ID:TheTypoMaster,项目名称:wp_marketplace,代码行数:31,代码来源:add-to-cart.php

示例8: get_header

*/
get_header();
get_sidebar('profile-left');
?>
<div class="column fivecol">
	<div class="element-title indented">
		<h1><?php 
_e('Shop Orders', 'makery');
?>
</h1>
	</div>
	<?php 
ThemexInterface::renderTemplateContent('shop-orders');
?>
	<?php 
if (ThemexCore::checkOption('shop_multiple')) {
    ?>
	<span class="secondary"><?php 
    _e('This shop does not exist.', 'makery');
    ?>
</span>
	<?php 
} else {
    if (ThemexShop::$data['status'] != 'publish') {
        ?>
	<span class="secondary"><?php 
        _e('This shop is currently being reviewed.', 'makery');
        ?>
</span>
	<?php 
    } else {
开发者ID:qhuit,项目名称:UrbanPekor,代码行数:31,代码来源:template-shop-orders.php

示例9: registerUser

 /**
  * Registers user
  *
  * @access public
  * @param array $data
  * @return void
  */
 public static function registerUser($data)
 {
     if (ThemexCore::checkOption('user_captcha')) {
         session_start();
         if (isset($data['captcha']) && isset($_SESSION['captcha'])) {
             $posted_code = md5($data['captcha']);
             $session_code = $_SESSION['captcha'];
             if ($session_code != $posted_code) {
                 ThemexInterface::$messages[] = __('Verification code is incorrect', 'makery');
             }
         } else {
             ThemexInterface::$messages[] = __('Verification code is empty', 'makery');
         }
     }
     if (empty($data['user_email']) || empty($data['user_login']) || empty($data['user_password']) || empty($data['user_password_repeat'])) {
         ThemexInterface::$messages[] = __('Please fill in all fields', 'makery');
     } else {
         if (!is_email($data['user_email'])) {
             ThemexInterface::$messages[] = __('Invalid email address', 'makery');
         } else {
             if (email_exists($data['user_email'])) {
                 ThemexInterface::$messages[] = __('This email is already in use', 'makery');
             }
         }
         if (!validate_username($data['user_login']) || is_email($data['user_login']) || preg_match('/\\s/', $data['user_login'])) {
             ThemexInterface::$messages[] = __('Invalid character used in username', 'makery');
         } else {
             if (username_exists($data['user_login'])) {
                 ThemexInterface::$messages[] = __('This username is already taken', 'makery');
             }
         }
         if (strlen($data['user_password']) < 4) {
             ThemexInterface::$messages[] = __('Password must be at least 4 characters long', 'makery');
         } else {
             if (strlen($data['user_password']) > 16) {
                 ThemexInterface::$messages[] = __('Password must be not more than 16 characters long', 'makery');
             } else {
                 if (preg_match("/^([a-zA-Z0-9@#-_\$%^&+=!?]{1,20})\$/", $data['user_password']) == 0) {
                     ThemexInterface::$messages[] = __('Password contains invalid characters', 'makery');
                 } else {
                     if ($data['user_password'] != $data['user_password_repeat']) {
                         ThemexInterface::$messages[] = __('Passwords do not match', 'makery');
                     }
                 }
             }
         }
     }
     if (empty(ThemexInterface::$messages)) {
         $user = wp_create_user($data['user_login'], $data['user_password'], $data['user_email']);
         $content = ThemexCore::getOption('email_registration', 'Hi, %username%! Welcome to ' . get_bloginfo('name') . '.');
         wp_new_user_notification($user);
         $keywords = array('username' => $data['user_login'], 'password' => $data['user_password']);
         if (ThemexCore::checkOption('user_activation')) {
             ThemexInterface::$messages[] = __('Registration complete! Check your mailbox to activate the account', 'makery');
             $subject = __('Account Confirmation', 'makery');
             $activation_key = md5(uniqid(rand(), 1));
             $user = new WP_User($user);
             $user->remove_role(get_option('default_role'));
             $user->add_role('inactive');
             ThemexCore::updateUserMeta($user->ID, 'activation_key', $activation_key);
             if (strpos($content, '%link%') === false) {
                 $content .= ' Click this link to activate your account %link%';
             }
             $link = ThemexCore::getURL('register');
             if (intval(substr($link, -1)) == 1) {
                 $link .= '&';
             } else {
                 $link .= '?';
             }
             $keywords['link'] = $link . 'activate=' . urlencode($activation_key) . '&user=' . $user->ID;
         } else {
             $object = new WP_User($user);
             $object->remove_role(get_option('default_role'));
             $object->add_role('contributor');
             wp_signon($data, false);
             $subject = __('Registration Complete', 'makery');
             ThemexInterface::$messages[] = '<a href="' . get_author_posts_url($user) . '" class="redirect"></a>';
         }
         $content = themex_keywords($content, $keywords);
         themex_mail($data['user_email'], $subject, $content);
         ThemexInterface::renderMessages(true);
     } else {
         ThemexInterface::renderMessages();
     }
     die;
 }
开发者ID:qhuit,项目名称:UrbanPekor,代码行数:93,代码来源:themex.user.php

示例10: getShipping

 /**
  * Gets shipping settings
  *
  * @access public
  * @param int $ID
  * @return array
  */
 public static function getShipping($ID)
 {
     $shipping = ThemexCore::getPostMeta($ID, 'shipping');
     if (ThemexCore::checkOption('shop_shipping') || empty($shipping) || !is_array($shipping)) {
         $shipping = array('free_shipping' => array(), 'flat_rate' => array(), 'international_delivery' => array(), 'local_delivery' => array());
     }
     return $shipping;
 }
开发者ID:TheTypoMaster,项目名称:wp_marketplace,代码行数:15,代码来源:themex.shop.php

示例11: setAffiliate

 /**
  * Sets affiliate
  *
  * @access public
  * @param string $login
  * @return void
  */
 public static function setAffiliate($login)
 {
     $login = sanitize_user($login);
     if (!empty($login) && !ThemexCore::checkOption('shop_referrals')) {
         $user = get_user_by('login', $login);
         $affiliate = intval(themex_value(THEMEX_PREFIX . 'affiliate', $_COOKIE));
         if ($user !== false && (empty($affiliate) || $user->ID != $affiliate)) {
             $expire = time() + 86400 * 10;
             setcookie(THEMEX_PREFIX . 'affiliate', $user->ID, $expire, COOKIEPATH, COOKIE_DOMAIN, false);
             $clicks = intval(ThemexCore::getUserMeta($user->ID, 'clicks'));
             ThemexCore::updateUserMeta($user->ID, 'clicks', $clicks + 1);
         }
     }
 }
开发者ID:qhuit,项目名称:UrbanPekor,代码行数:21,代码来源:themex.woo.php

示例12: array

</div>
		<?php 
    if (ThemexForm::isActive('profile')) {
        ?>
		<table class="user-fields">
			<?php 
        ThemexForm::renderData('profile', array('edit' => false, 'before_title' => '<tr><th>', 'after_title' => '</th>', 'before_content' => '<td>', 'after_content' => '</td></tr>'), ThemexUser::$data['active_user']['profile']);
        ?>
		</table>
		<?php 
    }
    ?>
		<?php 
    echo ThemexUser::$data['active_user']['profile']['description'];
    ?>
	</div>
	<?php 
}
?>
	<?php 
if (!ThemexCore::checkOption('profile_courses') || ThemexUser::isProfile()) {
    ?>
	<?php 
    get_sidebar('profile-right');
    ?>
	<?php 
}
?>
</div>
<?php 
get_footer();
开发者ID:haythameyd,项目名称:powrly,代码行数:31,代码来源:author.php

示例13: _e

		<ul>
			<li <?php 
    if (get_query_var('author')) {
        ?>
class="current"<?php 
    }
    ?>
><a href="<?php 
    echo ThemexUser::$data['user']['profile_url'];
    ?>
"><?php 
    _e('My Profile', 'academy');
    ?>
</a></li>
			<?php 
    if (!ThemexCore::checkOption('profile_links')) {
        ?>
			<li <?php 
        if (get_query_var('profile-links')) {
            ?>
class="current"<?php 
        }
        ?>
><a href="<?php 
        echo ThemexCore::getURL('profile-links');
        ?>
"><?php 
        _e('My Links', 'academy');
        ?>
</a></li>
			<?php 
开发者ID:haythameyd,项目名称:powrly,代码行数:31,代码来源:sidebar-profile-left.php

示例14: sprintf

				<ul>
					<?php 
    if (!ThemexCore::checkOption('shop_sales')) {
        ?>
					<li>
						<span class="fa fa-tags"></span>
						<span><?php 
        echo sprintf(_n('%d Sale', '%d Sales', ThemexShop::$data['sales'], 'makery'), ThemexShop::$data['sales']);
        ?>
</span>
					</li>
					<?php 
    }
    ?>
					<?php 
    if (!ThemexCore::checkOption('shop_favorites')) {
        ?>
					<li>
						<span class="fa fa-heart"></span>
						<span><?php 
        echo sprintf(_n('%d Admirer', '%d Admirers', ThemexShop::$data['admirers'], 'makery'), ThemexShop::$data['admirers']);
        ?>
</span>
					</li>
					<?php 
    }
    ?>
				</ul>										
			</div>
		</div>
	</div>
开发者ID:qhuit,项目名称:UrbanPekor,代码行数:31,代码来源:module-shop.php

示例15: sprintf

            ?>
							<span class="fa fa-tags"></span>
							<span><?php 
            echo sprintf(_n('%d Sale', '%d Sales', ThemexShop::$data['sales'], 'makery'), ThemexShop::$data['sales']);
            ?>
</span>
							<?php 
        }
    }
}
?>
						</li>						
					</ul>
				</div>
				<?php 
if (!ThemexCore::checkOption('shop_rating')) {
    ?>
				<div class="shop-rating" title="<?php 
    echo sprintf(_n('%d Rating', '%d Ratings', ThemexShop::$data['ratings'], 'makery'), ThemexShop::$data['ratings']);
    ?>
">
					<div class="element-rating" data-score="<?php 
    echo ThemexShop::$data['rating'];
    ?>
"></div>
				</div>
				<?php 
}
?>
			</div>
		</div>
开发者ID:qhuit,项目名称:UrbanPekor,代码行数:31,代码来源:content-shop.php


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