當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SwpmUtils::get_account_state_options方法代碼示例

本文整理匯總了PHP中SwpmUtils::get_account_state_options方法的典型用法代碼示例。如果您正苦於以下問題:PHP SwpmUtils::get_account_state_options方法的具體用法?PHP SwpmUtils::get_account_state_options怎麽用?PHP SwpmUtils::get_account_state_options使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SwpmUtils的用法示例。


在下文中一共展示了SwpmUtils::get_account_state_options方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: tab_1

 private function tab_1()
 {
     register_setting('swpm-settings-tab-1', 'swpm-settings', array(&$this, 'sanitize_tab_1'));
     //This settings section has no heading
     add_settings_section('swpm-general-post-submission-check', '', array(&$this, 'swpm_general_post_submit_check_callback'), 'simple_wp_membership_settings');
     add_settings_section('swpm-documentation', SwpmUtils::_('Plugin Documentation'), array(&$this, 'swpm_documentation_callback'), 'simple_wp_membership_settings');
     add_settings_section('general-settings', SwpmUtils::_('General Settings'), array(&$this, 'general_settings_callback'), 'simple_wp_membership_settings');
     add_settings_field('enable-free-membership', SwpmUtils::_('Enable Free Membership'), array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'general-settings', array('item' => 'enable-free-membership', 'message' => SwpmUtils::_('Enable/disable registration for free membership level. When you enable this option, make sure to specify a free membership level ID in the field below.')));
     add_settings_field('free-membership-id', SwpmUtils::_('Free Membership Level ID'), array(&$this, 'textfield_small_callback'), 'simple_wp_membership_settings', 'general-settings', array('item' => 'free-membership-id', 'message' => SwpmUtils::_('Assign free membership level ID')));
     add_settings_field('enable-moretag', SwpmUtils::_('Enable More Tag Protection'), array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'general-settings', array('item' => 'enable-moretag', 'message' => SwpmUtils::_('Enables or disables "more" tag protection in the posts and pages. Anything after the More tag is protected. Anything before the more tag is teaser content.')));
     add_settings_field('hide-adminbar', SwpmUtils::_('Hide Adminbar'), array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'general-settings', array('item' => 'hide-adminbar', 'message' => SwpmUtils::_('WordPress shows an admin toolbar to the logged in users of the site. Check this box if you want to hide that admin toolbar in the fronend of your site.')));
     add_settings_field('default-account-status', SwpmUtils::_('Default Account Status'), array(&$this, 'selectbox_callback'), 'simple_wp_membership_settings', 'general-settings', array('item' => 'default-account-status', 'options' => SwpmUtils::get_account_state_options(), 'default' => 'active', 'message' => SwpmUtils::_('Select the default account status for newly registered users. If you want to manually approve the members then you can set the status to "Pending".')));
     add_settings_field('allow-account-deletion', SwpmUtils::_('Allow Account Deletion'), array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'general-settings', array('item' => 'allow-account-deletion', 'options' => SwpmUtils::get_account_state_options(), 'message' => SwpmUtils::_('Allow users to delete their accounts.')));
     add_settings_field('delete-pending-account', SwpmUtils::_('Auto Delete Pending Account'), array(&$this, 'selectbox_callback'), 'simple_wp_membership_settings', 'general-settings', array('item' => 'delete-pending-account', 'options' => array(0 => 'Do not delete', 1 => 'Older than 1 month', 2 => 'Older than 2 months'), 'default' => '0', 'message' => SwpmUtils::_('Select how long you want to keep "pending" account.')));
     /* 
     add_settings_field('protect-everything',  SwpmUtils::_('Protect Everything'),
         array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'general-settings',
         array('item' => 'protect-everything',
         'message'=>SwpmUtils::_('Check this box if you want to protect all posts/pages by default.'))); 
     */
     add_settings_section('pages-settings', SwpmUtils::_('Pages Settings'), array(&$this, 'pages_settings_callback'), 'simple_wp_membership_settings');
     add_settings_field('login-page-url', SwpmUtils::_('Login Page URL'), array(&$this, 'textfield_long_callback'), 'simple_wp_membership_settings', 'pages-settings', array('item' => 'login-page-url', 'message' => ''));
     add_settings_field('registration-page-url', SwpmUtils::_('Registration Page URL'), array(&$this, 'textfield_long_callback'), 'simple_wp_membership_settings', 'pages-settings', array('item' => 'registration-page-url', 'message' => ''));
     add_settings_field('join-us-page-url', SwpmUtils::_('Join Us Page URL'), array(&$this, 'textfield_long_callback'), 'simple_wp_membership_settings', 'pages-settings', array('item' => 'join-us-page-url', 'message' => ''));
     add_settings_field('profile-page-url', SwpmUtils::_('Edit Profile Page URL'), array(&$this, 'textfield_long_callback'), 'simple_wp_membership_settings', 'pages-settings', array('item' => 'profile-page-url', 'message' => ''));
     add_settings_field('reset-page-url', SwpmUtils::_('Password Reset Page URL'), array(&$this, 'textfield_long_callback'), 'simple_wp_membership_settings', 'pages-settings', array('item' => 'reset-page-url', 'message' => ''));
     add_settings_section('debug-settings', SwpmUtils::_('Test & Debug Settings'), array(&$this, 'testndebug_settings_callback'), 'simple_wp_membership_settings');
     $debug_field_help_text = SwpmUtils::_('Check this option to enable debug logging.');
     $debug_field_help_text .= '<br />- View debug log file by clicking <a href="' . SIMPLE_WP_MEMBERSHIP_URL . '/log.txt" target="_blank">here</a>.';
     $debug_field_help_text .= '<br />- Reset debug log file by clicking <a href="admin.php?page=simple_wp_membership_settings&swmp_reset_log=1" target="_blank">here</a>.';
     add_settings_field('enable-debug', 'Enable Debug', array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'debug-settings', array('item' => 'enable-debug', 'message' => $debug_field_help_text));
     add_settings_field('enable-sandbox-testing', SwpmUtils::_('Enable Sandbox Testing'), array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'debug-settings', array('item' => 'enable-sandbox-testing', 'message' => SwpmUtils::_('Enable this option if you want to do sandbox payment testing.')));
 }
開發者ID:kevinotsuka,項目名稱:coffeecircle,代碼行數:33,代碼來源:class.swpm-settings.php


注:本文中的SwpmUtils::get_account_state_options方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。