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


PHP ot_contextual_help_view函数代码示例

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


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

示例1: ot_type_theme_options_ui

 function ot_type_theme_options_ui()
 {
     global $blog_id;
     echo '<form method="post" id="option-tree-settings-form">';
     /* form nonce */
     wp_nonce_field('option_tree_settings_form', 'option_tree_settings_nonce');
     /* format setting outer wrapper */
     echo '<div class="format-setting type-textblock has-desc">';
     /* description */
     echo '<div class="description">';
     echo '<h4>' . __('Warning!', 'option-tree') . '</h4>';
     echo '<p class="warning">' . sprintf(__('Go to the %s page if you want to save data, this page is for adding settings.', 'option-tree'), '<a href="' . get_admin_url($blog_id, 'themes.php?page=ot-theme-options') . '"><code>Appearance->Theme Options</code></a>') . '</p>';
     echo '<p class="warning">' . sprintf(__('If you\'re unsure or not completely positive that you should be editing these settings, you should read the %s first.', 'option-tree'), '<a href="' . get_admin_url($blog_id, 'admin.php?page=ot-documentation') . '"><code>OptionTree->Documentation</code></a>') . '</p>';
     echo '<h4>' . __('Things could break or be improperly displayed to the end-user if you do one of the following:', 'option-tree') . '</h4>';
     echo '<p class="warning">' . __('Give two sections the same ID, give two settings the same ID, give two contextual help content areas the same ID, don\'t create any settings, or have a section at the end of the settings list.', 'option-tree') . '</p>';
     echo '<p>' . __('You can create as many settings as your project requires and use them how you see fit. When you add a setting here, it will be available on the Theme Options page for use in your theme. To separate your settings into sections, click the "Add Section" button, fill in the input fields, and a new navigation menu item will be created.', 'option-tree') . '</p>';
     echo '<p>' . __('All of the settings can be sorted and rearranged to your liking with Drag & Drop. Don\'t worry about the order in which you create your settings, you can always reorder them.', 'option-tree') . '</p>';
     echo '</div>';
     /* get the saved settings */
     $settings = get_option(ot_settings_id());
     /* wrap settings array */
     echo '<div class="format-setting-inner">';
     /* set count to zero */
     $count = 0;
     /* loop through each section and its settings */
     echo '<ul class="option-tree-setting-wrap option-tree-sortable" id="option_tree_settings_list" data-name="' . ot_settings_id() . '[settings]">';
     if (isset($settings['sections'])) {
         foreach ($settings['sections'] as $section) {
             /* section */
             echo '<li class="' . ($count == 0 ? 'ui-state-disabled' : 'ui-state-default') . ' list-section">' . ot_sections_view(ot_settings_id() . '[sections]', $count, $section) . '</li>';
             /* increment item count */
             $count++;
             /* settings in this section */
             if (isset($settings['settings'])) {
                 foreach ($settings['settings'] as $setting) {
                     if (isset($setting['section']) && $setting['section'] == $section['id']) {
                         echo '<li class="ui-state-default list-setting">' . ot_settings_view(ot_settings_id() . '[settings]', $count, $setting) . '</li>';
                         /* increment item count */
                         $count++;
                     }
                 }
             }
         }
     }
     echo '</ul>';
     /* buttons */
     echo '<a href="javascript:void(0);" class="option-tree-section-add option-tree-ui-button button hug-left">' . __('Add Section', 'option-tree') . '</a>';
     echo '<a href="javascript:void(0);" class="option-tree-setting-add option-tree-ui-button button">' . __('Add Setting', 'option-tree') . '</a>';
     echo '<button class="option-tree-ui-button button button-primary right hug-right">' . __('Save Changes', 'option-tree') . '</button>';
     /* sidebar textarea */
     echo '
       <div class="format-setting-label" id="contextual-help-label">
         <h3 class="label">' . __('Contextual Help', 'option-tree') . '</h3>
       </div>
       <div class="format-settings" id="contextual-help-setting">
         <div class="format-setting type-textarea no-desc">
           <div class="description"><strong>' . __('Contextual Help Sidebar', 'option-tree') . '</strong>: ' . __('If you decide to add contextual help to the Theme Option page, enter the optional "Sidebar" HTML here. This would be an extremely useful place to add links to your themes documentation or support forum. Only after you\'ve added some content below will this display to the user.', 'option-tree') . '</div>
           <div class="format-setting-inner">
             <textarea class="textarea" rows="10" cols="40" name="' . ot_settings_id() . '[contextual_help][sidebar]">' . (isset($settings['contextual_help']['sidebar']) ? esc_html($settings['contextual_help']['sidebar']) : '') . '</textarea>
           </div>
         </div>
       </div>';
     /* set count to zero */
     $count = 0;
     /* loop through each contextual_help content section */
     echo '<ul class="option-tree-setting-wrap option-tree-sortable" id="option_tree_settings_help" data-name="' . ot_settings_id() . '[contextual_help][content]">';
     if (isset($settings['contextual_help']['content'])) {
         foreach ($settings['contextual_help']['content'] as $content) {
             /* content */
             echo '<li class="ui-state-default list-contextual-help">' . ot_contextual_help_view(ot_settings_id() . '[contextual_help][content]', $count, $content) . '</li>';
             /* increment content count */
             $count++;
         }
     }
     echo '</ul>';
     echo '<a href="javascript:void(0);" class="option-tree-help-add option-tree-ui-button button hug-left">' . __('Add Contextual Help Content', 'option-tree') . '</a>';
     echo '<button class="option-tree-ui-button button button-primary right hug-right">' . __('Save Changes', 'option-tree') . '</button>';
     echo '</div>';
     echo '</div>';
     echo '</form>';
 }
开发者ID:damiansu,项目名称:wordpress-es,代码行数:81,代码来源:ot-functions-settings-page.php

示例2: add_the_contextual_help

 /**
  * AJAX utility function for adding new contextual help content.
  */
 public function add_the_contextual_help()
 {
     echo ot_contextual_help_view($_REQUEST['name'], $_REQUEST['count']);
     die;
 }
开发者ID:venamax,项目名称:trixandtrax-cl,代码行数:8,代码来源:ot-loader.php

示例3: rj_taxonomy_ot_metabox_callback

    function rj_taxonomy_ot_metabox_callback()
    {
        global $blog_id;
        echo '

	<h2>Taxonomy Custom Fields UI</h2>

	<form method="post" id="option-tree-settings-form">';
        /* form nonce */
        wp_nonce_field('rj_option_tree_settings_form', 'option_tree_settings_nonce');
        /* format setting outer wrapper */
        echo '<div class="format-setting type-textblock has-desc">';
        /* get the saved settings */
        $settings = get_option('rj_taxonomy_' . ot_settings_id());
        /* wrap settings array */
        echo '<div class="format-setting-inner">';
        /* set count to zero */
        $count = 0;
        /* loop through each section and its settings */
        echo '<ul class="option-tree-setting-wrap option-tree-sortable" id="option_tree_settings_list" data-name="' . ot_settings_id() . '[settings]">';
        if (isset($settings['sections'])) {
            foreach ($settings['sections'] as $section) {
                /* section */
                echo '<li class="' . ($count == 0 ? 'ui-state-disabled' : 'ui-state-default') . ' list-section">' . ot_taxonomy_sections_view(ot_settings_id() . '[sections]', $count, $section) . '

			  </li>';
                /* increment item count */
                $count++;
                /* settings in this section */
                if (isset($settings['settings'])) {
                    foreach ($settings['settings'] as $setting) {
                        if (isset($setting['section']) && $setting['section'] == $section['id']) {
                            echo '<li class="ui-state-default list-setting">' . ot_settings_view(ot_settings_id() . '[settings]', $count, $setting) . '</li>';
                            /* increment item count */
                            $count++;
                        }
                    }
                }
            }
        }
        echo '</ul>';
        /* buttons */
        echo '<a href="javascript:void(0);" class="option-tree-section-add option-tree-ui-button button hug-left">' . __('Add Section', 'option-tree') . '</a>';
        echo '<a href="javascript:void(0);" class="option-tree-setting-add option-tree-ui-button button">' . __('Add Setting', 'option-tree') . '</a>';
        echo '<button class="option-tree-ui-button button button-primary right hug-right">' . __('Save Changes', 'option-tree') . '</button>';
        /* sidebar textarea */
        echo '

          <div class="format-setting-label" id="contextual-help-label">

            <h3 class="label">' . __('Contextual Help', 'option-tree') . '</h3>

          </div>

          <div class="format-settings" id="contextual-help-setting">

            <div class="format-setting type-textarea no-desc">

              <div class="description"><strong>' . __('Contextual Help Sidebar', 'option-tree') . '</strong>: ' . __('If you decide to add contextual help to the Theme Option page, enter the optional "Sidebar" HTML here. This would be an extremely useful place to add links to your themes documentation or support forum. Only after you\'ve added some content below will this display to the user.', 'option-tree') . '</div>

              <div class="format-setting-inner">

                <textarea class="textarea" rows="10" cols="40" name="' . ot_settings_id() . '[contextual_help][sidebar]">' . (isset($settings['contextual_help']['sidebar']) ? esc_html($settings['contextual_help']['sidebar']) : '') . '</textarea>

              </div>

            </div>

          </div>';
        /* set count to zero */
        $count = 0;
        /* loop through each contextual_help content section */
        echo '<ul class="option-tree-setting-wrap option-tree-sortable" id="option_tree_settings_help" data-name="' . ot_settings_id() . '[contextual_help][content]">';
        if (isset($settings['contextual_help']['content'])) {
            foreach ($settings['contextual_help']['content'] as $content) {
                /* content */
                echo '<li class="ui-state-default list-contextual-help">' . ot_contextual_help_view(ot_settings_id() . '[contextual_help][content]', $count, $content) . '</li>';
                /* increment content count */
                $count++;
            }
        }
        echo '</ul>';
        echo '<a href="javascript:void(0);" class="option-tree-help-add option-tree-ui-button button hug-left">' . __('Add Contextual Help Content', 'option-tree') . '</a>';
        echo '<button class="option-tree-ui-button button button-primary right hug-right">' . __('Save Changes', 'option-tree') . '</button>';
        echo '</div>';
        echo '</div>';
        echo '</form>';
        ?>
	
     <form name="seamless-donations-form" action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <div class="seamless-donations-forms-error-message" style="display:none"></div>
  <div id="dgx-donate-container">
    <div id="dgx-donate-form-donation-section" class="dgx-donate-form-section">
      <div id="donation_header">
        <div id="donation_header-error-message" style="display:none" class="seamless-donations-error-message-field"></div>
        <h2>Donation Information</h2>
      </div>
      <div id="header_desc">
        <div id="header_desc-error-message" style="display:none" class="seamless-donations-error-message-field"></div>
        <p>I would like to make a donation in the amount of:</p>
//.........这里部分代码省略.........
开发者ID:rajilesh,项目名称:optiontree-metabox-ui,代码行数:101,代码来源:taxonomy_meta_box.php


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