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


PHP membership_dir函数代码示例

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


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

示例1: set_global_sidebar_content

 function set_global_sidebar_content()
 {
     ob_start();
     include_once membership_dir('membershipincludes/help/help.sidebar.php');
     $help = ob_get_clean();
     $this->screen->set_help_sidebar($help);
 }
开发者ID:Bhabrooo,项目名称:aiesec-website-wordpress,代码行数:7,代码来源:class.help.php

示例2: handle_repair_panel

    function handle_repair_panel()
    {
        global $action, $page, $M_options;
        wp_reset_vars(array('action', 'page'));
        ?>
		<div class='wrap nosubsub'>
			<div class="icon32" id="icon-tools"><br></div>
			<h2><?php 
        _e('Repair Membership', 'membership');
        ?>
</h2>

			<?php 
        if (isset($_GET['msg'])) {
            echo '<div id="message" class="updated fade"><p>' . $messages[(int) $_GET['msg']] . '</p></div>';
            $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
        }
        ?>

			<p><?php 
        _e('If you are having problems with your membership site, or have recently upgraded and are seeing strange behaviour then try the membership check below to see if there are any issues with your table structure. Click on the repair button if you want to repair any issues found (back up your database first).', 'membership');
        ?>
</p>
			<p>
			<?php 
        echo "<a href='" . wp_nonce_url("?page=" . $page . "&amp;tab=advanced&amp;verify=yes", 'verify-membership') . "' class='button'>" . __('Verify Membership Tables', 'membership') . "</a>&nbsp;&nbsp;";
        ?>
			<?php 
        echo "<a href='" . wp_nonce_url("?page=" . $page . "&amp;tab=advanced&amp;repair=yes", 'repair-membership') . "' class='button'>" . __('Repair Membership Tables', 'membership') . "</a>";
        ?>
			</p>

			<?php 
        if (isset($_GET['verify'])) {
            check_admin_referer('verify-membership');
            include_once membership_dir('membershipincludes/classes/upgrade.php');
            ?>
					<p><strong><?php 
            _e('Verifying', 'membership');
            ?>
</strong></p>
					<?php 
            M_verify_tables();
        }
        if (isset($_GET['repair'])) {
            check_admin_referer('repair-membership');
            include_once membership_dir('membershipincludes/classes/upgrade.php');
            ?>
					<p><strong><?php 
            _e('Verifying and Repairing', 'membership');
            ?>
</strong></p>
					<?php 
            M_repair_tables();
        }
        ?>
		</div> <!-- wrap -->
		<?php 
    }
开发者ID:shimion,项目名称:member-BMH-,代码行数:59,代码来源:repairmembership.php

示例3: __construct

 function __construct()
 {
     if (!class_exists('Pointer_Tutorial')) {
         require_once membership_dir('membershipincludes/includes/new-pointer-tutorials.php');
     }
     $this->_membership_tutorial = new Pointer_Tutorial('membership', __('Membership tutorial', 'membership'), false, false);
     $this->_membership_tutorial->add_icon(membership_url('membershipincludes/images/pointer-icon.png'));
     $this->_wizard_tutorial = new Pointer_Tutorial('membershipwizard', __('Membership tutorial', 'membership'), false, false);
     $this->_wizard_tutorial->add_icon(membership_url('membershipincludes/images/pointer-icon.png'));
 }
开发者ID:vilmark,项目名称:vilmark_main,代码行数:10,代码来源:class.tutorial.php

示例4: new_user_notification_mail

function new_user_notification_mail($userid, $userpassword)
{
    global $M_options;
    $users = get_userdata($userid);
    $template = '';
    include_once membership_dir('membershipincludes/templates/email.php');
    $emailoptions = array('from_email' => $M_options['sendername'], 'from_name' => $M_options['senderemail'], 'template' => $template);
    $to_replace = array('content' => wpautop(wptexturize($M_options['messagemail'])), 'username' => $users->user_login, 'password' => $userpassword, 'blog_url' => get_option('siteurl'), 'home_url' => get_option('home'), 'login_url' => wp_login_url(), 'blog_name' => get_option('blogname'), 'blog_description' => get_option('blogdescription'), 'admin_email' => get_option('admin_email'), 'date' => date_i18n(get_option('date_format')), 'time' => date_i18n(get_option('time_format')));
    $to_replace = apply_filters('membership_email_tags', $to_replace);
    foreach ($to_replace as $tag => $var) {
        $emailoptions['template'] = str_replace('%' . $tag . '%', $var, $emailoptions['template']);
    }
    add_filter('wp_mail_content_type', create_function('', 'return "text/html"; '));
    $headers = apply_filters('memebership_email_headers', "From: " . $emailoptions['from_name'] . " <" . $emailoptions['from_email'] . ">  \r\n");
    wp_mail($users->user_email, 'New User Registration Login Details', $emailoptions['template'], $headers);
}
开发者ID:shimion,项目名称:member-BMH-,代码行数:16,代码来源:membership.email.php

示例5: membership_newsstreamcreatetables

function membership_newsstreamcreatetables($installed = false)
{
    global $wpdb;
    require_once membership_dir('membershipincludes/classes/upgrade.php');
    $charset_collate = M_get_charset_collate();
    $table = 'membership_news';
    $row = $wpdb->get_results($wpdb->prepare("SELECT * FROM INFORMATION_SCHEMA.COLUMNS\n\t\tWHERE table_name = %s and column_name='id' LIMIT 1", membership_db_prefix($wpdb, $table, false)));
    if (!empty($row)) {
        $sql = $wpdb->prepare("RENAME TABLE %s TO %s;", membership_db_prefix($wpdb, $table, false), membership_db_prefix($wpdb, $table));
        $sql = str_replace("'", '`', $sql);
        $wpdb->query($sql);
    } else {
        // Added for RC
        $sql = "CREATE TABLE IF NOT EXISTS `" . membership_db_prefix($wpdb, 'membership_news') . "` (\n\t\t\t  `id` bigint(11) NOT NULL auto_increment,\n\t\t\t  `newsitem` text,\n\t\t\t  `newsdate` datetime default NULL,\n\t\t\t  PRIMARY KEY  (`id`)\n\t\t\t) {$charset_collate};";
        $wpdb->query($sql);
    }
}
开发者ID:vilmark,项目名称:vilmark_main,代码行数:17,代码来源:newsstream.php

示例6: load_membership_plugins

function load_membership_plugins()
{
    if (is_dir(membership_dir('membershipincludes/plugins'))) {
        if ($dh = opendir(membership_dir('membershipincludes/plugins'))) {
            $mem_plugins = array();
            while (($plugin = readdir($dh)) !== false) {
                if (substr($plugin, -4) == '.php') {
                    $mem_plugins[] = $plugin;
                }
            }
            closedir($dh);
            sort($mem_plugins);
            foreach ($mem_plugins as $mem_plugin) {
                include_once membership_dir('membershipincludes/plugins/' . $mem_plugin);
            }
        }
    }
    do_action('membership_plugins_loaded');
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:19,代码来源:functions.php

示例7: set_membership_coupon_cookie

 function set_membership_coupon_cookie()
 {
     if (!defined('DOING_AJAX') || DOING_AJAX == FALSE) {
         die('NOT DOING AJAX?');
     }
     $this->start_membership_session();
     if (isset($_POST['coupon_code'])) {
         $_SESSION['m_coupon_code'] = esc_attr($_POST['coupon_code']);
         include membership_dir('membershipincludes/includes/coupon.form.php');
         die;
     } else {
         die(0);
     }
 }
开发者ID:shimion,项目名称:member-BMH-,代码行数:14,代码来源:membershipadmin_27012015.php

示例8: output_paymentpage

 function output_paymentpage($user_id = false)
 {
     global $wp_query, $M_options;
     $subscription = (int) $_REQUEST['subscription'];
     if (!$user_id) {
         $user = wp_get_current_user();
         if (!empty($user->ID) && is_numeric($user->ID)) {
             $member = new M_Membership($user->ID);
         } else {
             $member = current_member();
         }
     } else {
         $member = new M_Membership($user_id);
     }
     if (empty($error)) {
         $error = '';
     }
     $content = apply_filters('membership_subscription_form_payment_before_content', '', $error);
     ob_start();
     if (defined('MEMBERSHIP_PAYMENT_FORM') && file_exists(MEMBERSHIP_PAYMENT_FORM)) {
         include_once MEMBERSHIP_PAYMENT_FORM;
     } elseif (file_exists(apply_filters('membership_override_payment_form', membership_dir('membershipincludes/includes/payment.form.php'), $error))) {
         include_once apply_filters('membership_override_payment_form', membership_dir('membershipincludes/includes/payment.form.php'), $error);
     }
     $content .= ob_get_contents();
     ob_end_clean();
     $content = apply_filters('membership_subscription_form_payment_after_content', $content, $error);
     return $content;
 }
开发者ID:EdoMagen,项目名称:project-s-v2,代码行数:29,代码来源:membershippublic.php

示例9: membership_dir

                    }
                    ?>
					<input type="radio" id="subyearlypayment" name="paypalpayment" onclick="javascript:selectyearlypayment();">
					<label for="subyearlypayment"></label>					
					</div>
				</div>
			</div>
			<?php 
                }
                ?>
			</div>

			<?php 
                if (!defined('MEMBERSHIP_HIDE_COUPON_FORM')) {
                    if (!isset($M_options['show_coupons_form']) || $M_options['show_coupons_form'] == 'yes') {
                        include_once membership_dir('membershipincludes/includes/coupon.form.php');
                    }
                }
                ?>
			<span class='buynowcolumn'>
				<?php 
                if (!empty($pricing)) {
                    do_action('membership_purchase_button', $sub, $pricing, $member->ID);
                }
                ?>
			</span>
             
             
<div class="payment_note"><b>PLEASE NOTE:</b> Coupon codes should NOT have spaces.  If you received a coupon code with a space, simply remove it and it should work fine.  Thank you and sorry for any confusion or inconvenience.</div>
		</div>
	</div>
开发者ID:shimion,项目名称:member-BMH-,代码行数:31,代码来源:payment.form_27012015.php

示例10: do_action

    }
    // take care of new users
    Membership_Plugin::factory()->hook_new_user_registration();
    do_action('membership_loaded', $plugin);
}
// register autoloader function
spl_autoload_register('membership_autoloader');
// launch the plugin
membership_launch();
// Load secondary plugins
load_all_membership_addons();
load_membership_gateways();
// Use preset colors
// Remove the indicated lines below to override buttons with a preset color.
// This will override your theme colors and is here for legacy usage. It is not recommended.
/*  --- Remove this line ----

add_filter( 'membership_subscription_button_color', 'add_primary_button_color' );

function add_primary_button_color( $color ) {
	// Replace the color below with other color choices: black, white, gray, orange, red, green, rosy, pink, blue
	$color = 'blue';
	return $color;
}

--- And, remove this line */
// Cron processing moved to the end to ensure tables exist.
require_once membership_dir('membershipincludes/classes/membershipcron.php');
// Update assistant for M2 plugin
require_once membership_dir('membershipincludes/classes/class-m2-migration-handler.php');
开发者ID:vilmark,项目名称:vilmark_main,代码行数:30,代码来源:membershippremium.php

示例11: addons_help

 function addons_help()
 {
     ob_start();
     include_once membership_dir('membershipincludes/help/help.addons.php');
     $help = ob_get_clean();
     $this->screen->add_help_tab(array('id' => 'addons', 'title' => __('Add-ons', 'membership'), 'content' => $help));
 }
开发者ID:EdoMagen,项目名称:project-s-v2,代码行数:7,代码来源:class.help.php

示例12: show_dripped_wizard_step

        function show_dripped_wizard_step($nextsteplink = false)
        {
            global $page, $action, $step;
            $deactivateurl = wp_nonce_url("admin.php?page=" . $page . "&amp;action=deactivatewelcome", 'deactivate-welcome');
            ob_start();
            ?>
				<h3><?php 
            _e('Create your levels', 'membership');
            ?>
</h3>
				<p class="about-description">
					<?php 
            _e('A level controls what parts of your website a user has access to, so we will need to set some initial ones up. ', 'membership');
            _e('Select the number of levels you think you will need to get started (you can add or remove them later).', 'membership');
            ?>
				</p>
				<form action='<?php 
            echo $nextsteplink;
            ?>
' method='post' name='wizardform' id='wizardform'>
					<input type='hidden' name='action' value='processwizard' />
					<input type='hidden' name='from' value='steptwo' />
					<input type='hidden' name='nonce' value='<?php 
            echo wp_create_nonce('membership_wizard');
            ?>
' />
					<input type='hidden' name='wizardtype' value='dripped' />
					<p class="about-description createsteps">
					<?php 
            _e('Create ', 'membership');
            ?>
					<select name='numberoflevels' id='wizardnumberoflevels'>
					<?php 
            for ($n = 1; $n <= 2; $n++) {
                if ($n == 2) {
                    ?>
									<option value='<?php 
                    echo $n;
                    ?>
' selected='selected'><?php 
                    echo $n;
                    ?>
</option>
								<?php 
                } else {
                    ?>
									<option value='<?php 
                    echo $n;
                    ?>
'><?php 
                    echo $n;
                    ?>
</option>
								<?php 
                }
            }
            ?>
					</select>
					<?php 
            _e(' levels and give them the following names:', 'membership');
            ?>
					</p>
						<ul class='wizardlevelnames'>
							<li><input type='text' name='levelname[]' value='<?php 
            _e('Level 1', 'membership');
            ?>
' class='wizardlevelname' /></li>
							<li><input type='text' name='levelname[]' value='<?php 
            _e('Level 2', 'membership');
            ?>
' class='wizardlevelname' /></li>
						</ul>
					<p class="about-description createsteps">
					<input type='checkbox' name='creatavisitorlevel' value='yes' checked='checked' />&nbsp;<?php 
            _e('also create a level to control what non-members can see?', 'membership');
            ?>
					<br/><br/>
					<?php 
            _e('Finally, I would like to use the ', 'membership');
            ?>
					<select name='wizardgateway' >
						<option value=''><?php 
            _e('Select a gateway...', 'membership');
            ?>
</option>
						<?php 
            $gateways = get_membership_gateways();
            if (!empty($gateways)) {
                foreach ($gateways as $key => $gateway) {
                    $default_headers = array('Name' => 'Addon Name', 'Author' => 'Author', 'Description' => 'Description', 'AuthorURI' => 'Author URI', 'gateway_id' => 'Gateway ID');
                    $gateway_data = get_file_data(membership_dir('membershipincludes/gateways/' . $gateway), $default_headers, 'plugin');
                    if (empty($gateway_data['Name'])) {
                        continue;
                    }
                    ?>
										<option value='<?php 
                    echo $gateway_data['gateway_id'];
                    ?>
'><?php 
                    echo $gateway_data['Name'];
//.........这里部分代码省略.........
开发者ID:EdoMagen,项目名称:project-s-v2,代码行数:101,代码来源:class.wizard.php

示例13: dashboard_members

 function dashboard_members()
 {
     global $page, $action;
     $plugin = get_plugin_data(membership_dir('membership.php'));
     $membershipactive = get_option('membership_active', 'no');
     echo __('The membership plugin version ', 'membership') . "<strong>" . $plugin['Version'] . '</strong>';
     echo __(' is ', 'membership');
     // Membership active toggle
     if ($membershipactive == 'no') {
         echo '<strong>' . __('disabled', 'membership') . '</strong> <a href="' . nxt_nonce_url("?page=" . $page . "&amp;action=activate", 'toggle-plugin') . '" title="' . __('Click here to enable the plugin', 'membership') . '">' . __('[Enable it]', 'membership') . '</a>';
     } else {
         echo '<strong>' . __('enabled', 'membership') . '</strong> <a href="' . nxt_nonce_url("?page=" . $page . "&amp;action=deactivate", 'toggle-plugin') . '" title="' . __('Click here to enable the plugin', 'membership') . '">' . __('[Disable it]', 'membership') . '</a>';
     }
     echo '<br/><br/>';
     echo "<strong>" . __('Member counts', 'membership') . "</strong><br/>";
     $detail = $this->get_subscriptions_and_levels(array('sub_status' => 'active'));
     $subs = $this->get_subscriptions(array('sub_status' => 'active'));
     $levels = $this->get_membership_levels(array('level_id' => 'active'));
     echo "<table style='width: 100%;'>";
     echo "<tbody>";
     echo "<tr>";
     echo "<td style='width: 48%' valign='top'>";
     if ($levels) {
         $levelcount = 0;
         echo "<table style='width: 100%;'>";
         echo "<tbody>";
         echo "<tr>";
         echo "<td colspan='2'><strong>" . __('Levels', 'membership') . "</strong></td>";
         echo "</tr>";
         foreach ($levels as $key => $level) {
             echo "<tr>";
             echo "<td><a href='" . admin_url('admin.php?page=membershiplevels&action=edit&level_id=') . $level->id . "'>" . esc_html($level->level_title) . "</a></td>";
             // find out how many people are in this level
             $thiscount = $this->count_on_level($level->id);
             echo "<td style='text-align: right;'>" . (int) $thiscount . "</td>";
             $levelcount += (int) $thiscount;
             echo "</tr>";
         }
         echo "<tr>";
         echo "<td>" . __('Total', 'membership') . "</td>";
         echo "<td style='text-align: right;'><strong>" . (int) $levelcount . "</strong></td>";
         echo "</tr>";
         echo "</tbody>";
         echo "</table>";
     }
     echo "</td>";
     echo "<td style='width: 48%' valign='top'>";
     if ($subs) {
         $subcount = 0;
         echo "<table style='width: 100%;'>";
         echo "<tbody>";
         echo "<tr>";
         echo "<td colspan='2'><strong>" . __('Subscriptions', 'membership') . "</strong></td>";
         echo "</tr>";
         foreach ($subs as $key => $sub) {
             echo "<tr>";
             echo "<td><a href='" . admin_url('admin.php?page=membershipsubs&action=edit&sub_id=') . $sub->id . "'>" . $sub->sub_name . "</a></td>";
             // find out how many people are in this sub
             $thiscount = $this->count_on_sub($sub->id);
             echo "<td style='text-align: right;'>" . (int) $thiscount . "</td>";
             $subcount += (int) $thiscount;
             echo "</tr>";
         }
         echo "<tr>";
         echo "<td>" . __('Total', 'membership') . "</td>";
         echo "<td style='text-align: right;'><strong>" . (int) $subcount . "</strong></td>";
         echo "</tr>";
         echo "</tbody>";
         echo "</table>";
     }
     echo "</td>";
     echo "</tr>";
     echo "</tbody>";
     echo "</table>";
     echo "<br/><strong>" . __('User counts', 'membership') . "</strong><br/>";
     echo "<table style='width: 100%;'>";
     echo "<tbody>";
     echo "<tr>";
     echo "<td style='width: 48%' valign='top'>";
     echo "<table style='width: 100%;'>";
     echo "<tbody>";
     $usercount = $this->db->get_var($this->db->prepare("SELECT count(*) FROM {$this->db->users} INNER JOIN {$this->db->usermeta} ON {$this->db->users}.ID = {$this->db->usermeta}.user_id WHERE {$this->db->usermeta}.meta_key = '{$this->db->prefix}capabilities'"));
     echo "<tr>";
     echo "<td>" . __('Total Users', 'membership') . "</td>";
     echo "<td style='text-align: right;'>" . $usercount . "</td>";
     echo "</tr>";
     $deactivecount = $this->db->get_var($this->db->prepare("SELECT count(*) FROM {$this->db->usermeta} WHERE meta_key = %s AND meta_value = %s", $this->db->prefix . 'membership_active', 'no'));
     echo "<tr>";
     echo "<td>" . __('Deactivated Users', 'membership') . "</td>";
     echo "<td style='text-align: right;'>" . $deactivecount . "</td>";
     echo "</tr>";
     echo "</tbody>";
     echo "</table>";
     echo "</td>";
     echo "<td style='width: 48%' valign='top'></td>";
     echo "</tr>";
     echo "</tbody>";
     echo "</table>";
 }
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:99,代码来源:membershipadmin.php

示例14: load_all_membership_gateways

function load_all_membership_gateways()
{
    if (is_dir(membership_dir('membershipincludes/gateways'))) {
        if ($dh = opendir(membership_dir('membershipincludes/gateways'))) {
            $mem_gateways = array();
            while (($gateway = readdir($dh)) !== false) {
                if (substr($gateway, -4) == '.php') {
                    $mem_gateways[] = $gateway;
                }
            }
            closedir($dh);
            sort($mem_gateways);
            $mem_gateways = apply_filters('membership_available_gateways', $mem_gateways);
            foreach ($mem_gateways as $mem_gateway) {
                include_once membership_dir('membershipincludes/gateways/' . $mem_gateway);
            }
        }
    }
    do_action('membership_gateways_loaded');
}
开发者ID:hscale,项目名称:webento,代码行数:20,代码来源:functions.php

示例15: popover_extra_payment_form

 function popover_extra_payment_form($user_id = false)
 {
     $content = '';
     $content = apply_filters('membership_popover_extraform_before_content', $content);
     ob_start();
     if (defined('MEMBERSHIP_POPOVER_SENDPAYMENT_FORM') && file_exists(MEMBERSHIP_POPOVER_SENDPAYMENT_FORM)) {
         include_once MEMBERSHIP_POPOVER_SENDPAYMENT_FORM;
     } elseif (file_exists(apply_filters('membership_override_popover_sendpayment_form', membership_dir('membershipincludes/includes/popover_payment.form.php')))) {
         include_once apply_filters('membership_override_popover_sendpayment_form', membership_dir('membershipincludes/includes/popover_payment.form.php'));
     }
     $content .= ob_get_contents();
     ob_end_clean();
     $content = apply_filters('membership_popover_extraform_after_content', $content);
     echo $content;
     exit;
 }
开发者ID:EdoMagen,项目名称:project-s-v2,代码行数:16,代码来源:membershipadmin.php


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