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


PHP MS_Helper_Html::settings_box方法代码示例

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


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

示例1: to_html

 /**
  * Displays the import preview form.
  *
  * @since  1.0.0
  * @return string
  */
 public function to_html()
 {
     $data = apply_filters('ms_import_preview_data_before', $this->data['model']->source);
     $compact = !empty($this->data['compact']);
     if (!is_object($data)) {
         $data = (object) array('memberships' => array(), 'members' => array(), 'notes' => array(), 'settings' => array(), 'source' => '', 'export_time' => '');
     }
     // Converts object to array
     $data->memberships = (array) $data->memberships;
     $data->members = (array) $data->members;
     $fields = $this->prepare_fields($data);
     if ($compact) {
         $overview_box = array($fields['batchsize'], $fields['sep'], $fields['clear_all'], $fields['skip'], $fields['import']);
     } else {
         $overview_box = array($fields['details'], $fields['sep'], $fields['batchsize'], $fields['sep'], $fields['clear_all'], $fields['back'], $fields['import'], $fields['download']);
     }
     ob_start();
     MS_Helper_Html::settings_box($overview_box, __('Import Overview', 'membership2'));
     if (!$compact) {
         MS_Helper_Html::settings_box(array($fields['memberships']), __('List of all Memberships', 'membership2'), '', 'open');
         MS_Helper_Html::settings_box(array($fields['members']), __('List of all Members', 'membership2'), '', 'open');
         MS_Helper_Html::settings_box(array($fields['settings']), __('Imported Settings', 'membership2'), '', 'open');
     }
     echo '<script>window._ms_import_obj = ' . json_encode($data) . '</script>';
     $html = ob_get_clean();
     return apply_filters('ms_import_preview_object', $html, $data);
 }
开发者ID:EdoMagen,项目名称:project-s-v2,代码行数:33,代码来源:class-ms-view-settings-import.php

示例2: to_html

    /**
     * Create view output.
     *
     * @since  1.0.0
     *
     * @return string
     */
    public function to_html()
    {
        $this->check_simulation();
        $fields = $this->prepare_fields();
        $form_url = esc_url_raw(remove_query_arg(array('action', 'invoice_id')));
        if ($this->data['invoice']->is_valid()) {
            $title = __('Edit Billing', MS_TEXT_DOMAIN);
        } else {
            $title = __('Add Billing', MS_TEXT_DOMAIN);
        }
        ob_start();
        // Render tabbed interface.
        ?>
			<div class="ms-wrap ms-billing">
				<?php 
        MS_Helper_Html::settings_header(array('title' => $title, 'title_icon_class' => 'wpmui-fa wpmui-fa-pencil-square'));
        ?>
				<form action="<?php 
        echo $form_url;
        ?>
" method="post" class="ms-form">
					<?php 
        MS_Helper_Html::settings_box($fields, '', '', 'static', 'ms-small-form');
        ?>
				</form>
				<div class="clear"></div>
			</div>
		<?php 
        $html = ob_get_clean();
        return apply_filters('ms_view_billing_edit_to_html', $html, $this);
    }
开发者ID:klgrimley,项目名称:mzf,代码行数:38,代码来源:class-ms-view-billing-edit.php

示例3: to_html

    /**
     * Create view output.
     *
     * @since  1.0.0
     *
     * @return string
     */
    public function to_html()
    {
        $fields = $this->prepare_fields();
        $form_url = esc_url_raw(remove_query_arg(array('action', 'coupon_id')));
        if ($this->data['coupon']->is_valid()) {
            $title = __('Edit Coupon', 'membership2');
        } else {
            $title = __('Add Coupon', 'membership2');
        }
        ob_start();
        // Render tabbed interface.
        ?>
		<div class="ms-wrap">
			<?php 
        MS_Helper_Html::settings_header(array('title' => $title, 'title_icon_class' => 'wpmui-fa wpmui-fa-pencil-square'));
        ?>
			<form action="<?php 
        echo esc_url($form_url);
        ?>
" method="post" class="ms-form">
				<?php 
        MS_Helper_Html::settings_box($fields, '', '', 'static', 'ms-small-form');
        ?>
			</form>
			<div class="clear"></div>
		</div>
		<?php 
        $html = ob_get_clean();
        return apply_filters('ms_addon_coupon_view_edit_to_html', $html, $this);
    }
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:37,代码来源:class-ms-addon-coupon-view-edit.php

示例4: to_html

    public function to_html()
    {
        $export_action = MS_Controller_Import::ACTION_EXPORT;
        $import_action = MS_Controller_Import::ACTION_PREVIEW;
        $messages = $this->data['message'];
        $preview = false;
        if (isset($messages['preview'])) {
            $preview = $messages['preview'];
        }
        $export_fields = array('export' => array('id' => 'btn_export', 'type' => MS_Helper_Html::INPUT_TYPE_SUBMIT, 'value' => __('Generate Export', 'membership2'), 'desc' => __('Generate an export file with the current membership settings. ' . '<em>Note that this is not a full backup of the plugin settings.</em>', 'membership2')), 'action' => array('id' => 'action', 'type' => MS_Helper_Html::INPUT_TYPE_HIDDEN, 'value' => $export_action), 'nonce' => array('id' => '_wpnonce', 'type' => MS_Helper_Html::INPUT_TYPE_HIDDEN, 'value' => wp_create_nonce($export_action)));
        $file_field = array('id' => 'upload', 'type' => MS_Helper_Html::INPUT_TYPE_FILE, 'title' => __('From export file', 'membership2'));
        $import_options = array('file' => array('text' => MS_Helper_Html::html_element($file_field, true), 'disabled' => !MS_Model_Import_File::present()), 'membership' => array('text' => __('Membership (WPMU DEV)', 'membership2'), 'disabled' => !MS_Model_Import_Membership::present()));
        $sel_source = 'file';
        if (isset($_POST['import_source']) && isset($import_options[$_POST['import_source']])) {
            $sel_source = $_POST['import_source'];
        }
        $import_fields = array('source' => array('id' => 'import_source', 'type' => MS_Helper_Html::INPUT_TYPE_RADIO, 'title' => __('Choose an import source', 'membership2'), 'field_options' => $import_options, 'value' => $sel_source), 'import' => array('id' => 'btn_import', 'type' => MS_Helper_Html::INPUT_TYPE_SUBMIT, 'value' => __('Preview Import', 'membership2'), 'desc' => __('Import data into this installation.', 'membership2')), 'action' => array('id' => 'action', 'type' => MS_Helper_Html::INPUT_TYPE_HIDDEN, 'value' => $import_action), 'nonce' => array('id' => '_wpnonce', 'type' => MS_Helper_Html::INPUT_TYPE_HIDDEN, 'value' => wp_create_nonce($import_action)));
        ob_start();
        MS_Helper_Html::settings_tab_header(array('title' => __('Import Tool', 'membership2')));
        ?>

		<div>
			<?php 
        if ($preview) {
            ?>
				<form action="" method="post">
					<?php 
            echo '' . $preview;
            ?>
				</form>
			<?php 
        } else {
            ?>
				<form action="" method="post" enctype="multipart/form-data">
					<?php 
            MS_Helper_Html::settings_box($import_fields, __('Import data', 'membership2'));
            ?>
				</form>
				<form action="" method="post">
					<?php 
            MS_Helper_Html::settings_box($export_fields, __('Export data', 'membership2'));
            ?>
				</form>
			<?php 
        }
        ?>
		</div>
		<?php 
        return ob_get_clean();
    }
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:50,代码来源:class-ms-view-settings-page-import.php

示例5: to_html

    /**
     * Return the HTML form.
     *
     * @since  1.0.0
     * @return string
     */
    public function to_html()
    {
        $fields = $this->get_fields();
        // TODO: Fix that condition again.
        $has_more = true;
        $title = __('Protection Messages', MS_TEXT_DOMAIN);
        if (isset($this->data['membership'])) {
            $membership = $this->data['membership'];
        } else {
            $membership = false;
        }
        if ($membership instanceof MS_Model_Membership) {
            $settings_url = MS_Controller_Plugin::get_admin_url('settings', array('tab' => MS_Controller_Settings::TAB_MESSAGES));
            $desc = sprintf(__('Here you can override %sdefault settings%s for this membership.', MS_TEXT_DOMAIN), '<a href="' . $settings_url . '">', '</a>');
        } else {
            $desc = '';
        }
        ob_start();
        MS_Helper_Html::settings_tab_header(array('title' => $title, 'desc' => $desc));
        ?>
		<form class="ms-form" action="" method="post">
			<?php 
        $subtitle = apply_filters('ms_translation_flag', __('Content protection message', MS_TEXT_DOMAIN), 'message-protected');
        MS_Helper_Html::settings_box($fields['content'], $subtitle, '', 'open');
        $subtitle = apply_filters('ms_translation_flag', __('Shortcode protection message', MS_TEXT_DOMAIN), 'message-shortcode');
        MS_Helper_Html::settings_box($fields['shortcode'], $subtitle, '', 'open');
        if ($has_more) {
            $subtitle = apply_filters('ms_translation_flag', __('More tag protection message', MS_TEXT_DOMAIN), 'message-more_tag');
            MS_Helper_Html::settings_box($fields['more_tag'], $subtitle, '', 'open');
        }
        ?>
		</form>
		<?php 
        $html = ob_get_clean();
        return $html;
    }
开发者ID:jsandlin85,项目名称:SkylineSports,代码行数:42,代码来源:class-ms-view-settings-page-messages.php


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