• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ot_option_types_array函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ot_type_creating_options

 function ot_type_creating_options()
 {
     /* format setting outer wrapper */
     echo '<div class="format-setting type-textblock wide-desc">';
     /* description */
     echo '<div class="description">';
     echo '<h4>' . __('Label', 'option-tree') . ':</h4>';
     echo '<p>' . __('The Label field should be a short but descriptive block of text 100 characters or less with no HTML.', 'option-tree') . '</p>';
     echo '<h4>' . __('ID', 'option-tree') . ':</h4>';
     echo '<p>' . __('The ID field is a unique alphanumeric key used to differentiate each theme option (underscores are acceptable). Also, the plugin will change all text you write in this field to lowercase and replace spaces and special characters with an underscore automatically.', 'option-tree') . '</p>';
     echo '<h4>' . __('Type', 'option-tree') . ':</h4>';
     echo '<p>' . __('You are required to choose one of the supported option types when creating a new option. Here is a list of the available option types. For more information about each type click the <code>Option Types</code> tab to the left.', 'option-tree') . '</p>';
     echo '<ul class="docs-ul">';
     foreach (ot_option_types_array() as $key => $value) {
         echo '<li>' . $value . '</li>';
     }
     echo '</ul>';
     echo '<h4>' . __('Description', 'option-tree') . ':</h4>';
     echo '<p>' . __('Enter a detailed description for the users to read on the Theme Options page, HTML is allowed. This is also where you enter content for both the Textblock & Textblock Titled option types.', 'option-tree') . '</p>';
     echo '<h4>' . __('Choices', 'option-tree') . ':</h4>';
     echo '<p>' . __('Click the "Add Choice" button to add an item to the choices array. This will only affect the following option types: Checkbox, Radio, Select & Select Image.', 'option-tree') . '</p>';
     echo '<h4>' . __('Settings', 'option-tree') . ':</h4>';
     echo '<p>' . __('Click the "Add Setting" button found inside a newly created setting to add an item to the settings array. This will only affect the List Item type.', 'option-tree') . '</p>';
     echo '<h4>' . __('Standard', 'option-tree') . ':</h4>';
     echo '<p>' . __('Setting the standard value for your option only works for some option types. Those types are one that have a single string value saved to them and not an array of values.', 'option-tree') . '</p>';
     echo '<h4>' . __('Rows', 'option-tree') . ':</h4>';
     echo '<p>' . __('Enter a numeric value for the number of rows in your textarea. This will only affect the following option types: CSS, Textarea, & Textarea Simple.', 'option-tree') . '</p>';
     echo '<h4>' . __('Post Type', 'option-tree') . ':</h4>';
     echo '<p>' . __('Add a comma separated list of post type like <code>post,page</code>. This will only affect the following option types: Custom Post Type Checkbox, & Custom Post Type Select. Below are the default post types available with WordPress and that are also compatible with OptionTree. You can also add your own custom <code>post_type</code>. At this time <code>any</code> does not seem to return results properly and is something I plan on looking into.', 'option-tree') . '</p>';
     echo '<ul class="docs-ul">';
     echo '<li><code>post</code></li>';
     echo '<li><code>page</code></li>';
     echo '<li><code>attachment</code></li>';
     echo '</ul>';
     echo '<h4>' . __('Taxonomy', 'option-tree') . ':</h4>';
     echo '<p>' . __('Add a comma separated list of any registered taxonomy like <code>category,post_tag</code>. This will only affect the following option types: Taxonomy Checkbox, & Taxonomy Select.', 'option-tree') . '</p>';
     echo '<h4>' . __('Min, Max, & Step', 'option-tree') . ':</h4>';
     echo '<p>' . __('Add a comma separated list of options in the following format <code>0,100,1</code> (slide from <code>0-100</code> in intervals of <code>1</code>). The three values represent the minimum, maximum, and step options and will only affect the Numeric Slider option type.', 'option-tree') . '</p>';
     echo '<h4>' . __('CSS Class', 'option-tree') . ':</h4>';
     echo '<p>' . __('Add and optional class to any option type.', 'option-tree') . '</p>';
     echo '<h4>' . __('Condition', 'option-tree') . ':</h4>';
     echo '<p>' . sprintf(__('Add a comma separated list (no spaces) of conditions in which the field will be visible, leave this setting empty to always show the field. In these examples, %s is a placeholder for your condition, which can be in the form of %s.', 'option-tree'), '<code>value</code>', '<code>field_id:is(value)</code>, <code>field_id:not(value)</code>, <code>field_id:contains(value)</code>, <code>field_id:less_than(value)</code>, <code>field_id:less_than_or_equal_to(value)</code>, <code>field_id:greater_than(value)</code>, or <code>field_id:greater_than_or_equal_to(value)</code>') . '</p>';
     echo '<h4>' . __('Operator', 'option-tree') . ':</h4>';
     echo '<p>' . sprintf(__('Choose the logical operator to compute the result of the conditions. Your options are %s and %s.', 'option-tree'), '<code>and</code>', '<code>or</code>') . '</p>';
     echo '</div>';
     echo '</div>';
 }
开发者ID:sumeetbajra,项目名称:jewelleryshop,代码行数:47,代码来源:ot-functions-docs-page.php


示例2: ot_type_creating_options

 function ot_type_creating_options()
 {
     /* format setting outer wrapper */
     echo '<div class="format-setting type-textblock wide-desc">';
     /* description */
     echo '<div class="description">';
     echo '<h4>' . __('Label', 'option-tree') . ':</h4>';
     echo '<p>' . __('The Label field should be a short but descriptive block of text 100 characters or less with no HTML.', 'option-tree') . '</p>';
     echo '<h4>' . __('ID', 'option-tree') . ':</h4>';
     echo '<p>' . __('The ID field is a unique alphanumeric key used to differentiate each theme option (underscores are acceptable). Also, the plugin will change all text you write in this field to lowercase and replace spaces and special characters with an underscore automatically.', 'option-tree') . '</p>';
     echo '<h4>' . __('Type', 'option-tree') . ':</h4>';
     echo '<p>' . __('You are required to choose one of the supported option types when creating a new option. Here is a list of the available option types. For more information about each type click the <code>Option Types</code> tab to the left.', 'option-tree') . '</p>';
     echo '<ul class="docs-ul">';
     foreach (ot_option_types_array() as $key => $value) {
         echo '<li>' . $value . '</li>';
     }
     echo '</ul>';
     echo '<h4>' . __('Description', 'option-tree') . ':</h4>';
     echo '<p>' . __('Enter a detailed description for the users to read on the Theme Options page, HTML is allowed. This is also where you enter content for both the Textblock & Textblock Titled option types.', 'option-tree') . '</p>';
     echo '<h4>' . __('Choices', 'option-tree') . ':</h4>';
     echo '<p>' . __('Click the "Add Choice" button to add an item to the choices array. This will only affect the following option types: Checkbox, Radio, Select & Select Image.', 'option-tree') . '</p>';
     echo '<h4>' . __('Settings', 'option-tree') . ':</h4>';
     echo '<p>' . __('Click the "Add Setting" button found inside a newly created setting to add an item to the settings array. This will only affect the List Item type.', 'option-tree') . '</p>';
     echo '<h4>' . __('Standard', 'option-tree') . ':</h4>';
     echo '<p>' . __('Setting the standard value for your option only works for some option types. Those types are one that have a single string value saved to them and not an array of values.', 'option-tree') . '</p>';
     echo '<h4>' . __('Rows', 'option-tree') . ':</h4>';
     echo '<p>' . __('Enter a numeric value for the number of rows in your textarea. This will only affect the following option types: CSS, Textarea, & Textarea Simple.', 'option-tree') . '</p>';
     echo '<h4>' . __('Post Type', 'option-tree') . ':</h4>';
     echo '<p>' . __('Add a comma separated list of post type like <code>post,page</code>. This will only affect the following option types: Custom Post Type Checkbox, & Custom Post Type Select. Below are the default post types available with WordPress and that are also compatible with OptionTree. You can also add your own custom <code>post_type</code>. At this time <code>any</code> does not seem to return results properly and is something I plan on looking into.', 'option-tree') . '</p>';
     echo '<ul class="docs-ul">';
     echo '<li><code>post</code></li>';
     echo '<li><code>page</code></li>';
     echo '<li><code>attachment</code></li>';
     echo '</ul>';
     echo '<h4>' . __('Taxonomy', 'option-tree') . ':</h4>';
     echo '<p>' . __('Add a comma separated list of any registered taxonomy like <code>category,post_tag</code>. This will only affect the following option types: Taxonomy Checkbox, & Taxonomy Select.', 'option-tree') . '</p>';
     echo '</div>';
     echo '</div>';
 }
开发者ID:ilke-zilci,项目名称:newcomers-wp,代码行数:39,代码来源:ot-functions-docs-page.php


示例3: ot_loop_through_option_types

 function ot_loop_through_option_types($type = '', $child = false)
 {
     $content = '';
     $types = ot_option_types_array();
     if ($child) {
         unset($types['list-item']);
     }
     foreach ($types as $key => $value) {
         $content .= '<option value="' . $key . '" ' . selected($type, $key, false) . '>' . $value . '</option>';
     }
     return $content;
 }
开发者ID:ElectricEasel,项目名称:reflection,代码行数:12,代码来源:ot-functions-admin.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ot_options_id函数代码示例发布时间:2022-05-15
下一篇:
PHP ot_normalize_css函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap