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


PHP ThemeHelper::esc_html方法代码示例

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


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

示例1: getPost

 function getPost()
 {
     $data = new stdClass();
     $categoryId = (int) get_query_var('cat');
     if (is_tag()) {
         $data->post = get_post(ThemeOption::getOption('blog_search_post_id'));
         $tagQuery = get_query_var('tag');
         $tagData = get_tags(array('slug' => $tagQuery));
         $data->post->post_title = esc_html($tagData[0]->name);
     } elseif (is_category($categoryId)) {
         $category = get_category($categoryId);
         $data->post = get_post(ThemeOption::getOption('blog_category_post_id'));
         $data->post->post_title = ThemeHelper::esc_html($category->name);
     } elseif (is_day()) {
         $data->post = get_post(ThemeOption::getOption('blog_archive_post_id'));
         $data->post->post_title = get_the_date();
     } elseif (is_archive()) {
         $data->post = get_post(ThemeOption::getOption('blog_archive_post_id'));
         $data->post->post_title = single_month_title(' ', false);
     } elseif (is_search()) {
         $data->post = get_post(ThemeOption::getOption('blog_search_post_id'));
         $data->post->post_title = sprintf(__('Search result for phrase <i>%s</i>', THEME_DOMAIN), esc_html(get_query_var('s')));
     } elseif (is_404()) {
         $data->post = get_post(ThemeOption::getOption('page_404_page_id'));
         $data->post->post_title = $data->post->post_title;
     } else {
         return false;
     }
     return $data;
 }
开发者ID:annguyenit,项目名称:HawaiiEducation,代码行数:30,代码来源:Theme.Post.class.php

示例2: import

 function import()
 {
     $response = array('global' => array('error' => 1));
     $Notice = new ThemeNotice();
     $result = $this->download();
     if ($result) {
         $response['global']['error'] = 0;
     } else {
         $Notice->addError(ThemeHelper::getFormName('import_google_font', false), ThemeHelper::esc_html('Cannot import list of fonts'));
         $response['local'] = $Notice->getError();
     }
     $response['global']['notice'] = $Notice->createHTML(THEME_PATH_TEMPLATE . 'notice.php');
     echo json_encode($response);
     exit;
 }
开发者ID:annguyenit,项目名称:fable.local,代码行数:15,代码来源:Theme.GoogleFont.class.php

示例3: getPost

 function getPost()
 {
     $data = new stdClass();
     global $post, $wp_query;
     $categoryId = (int) get_query_var('cat');
     if (function_exists('is_woocommerce') && is_woocommerce()) {
         $data->post = get_post(get_option('woocommerce_shop_page_id'));
         if (is_product()) {
             $data->post = $post;
         } elseif (is_product_category() || is_product_tag()) {
             $data->post->post_title = ThemeHelper::esc_html($wp_query->queried_object->name);
         } elseif (is_search()) {
             $data->post->post_title = sprintf(__('Search products for phrase <i>%s</i>', THEME_DOMAIN), esc_html(get_query_var('s')));
         }
         setup_postdata($data->post);
     } else {
         if (is_tag()) {
             $data->post = get_post(ThemeOption::getOption('blog_search_post_id'));
             $tagQuery = get_query_var('tag');
             $tagData = get_tags(array('slug' => $tagQuery));
             $data->post->post_title = esc_html($tagData[0]->name);
         } elseif (is_author()) {
             $author = get_userdata(get_query_var('author'));
             $data->post = get_post(ThemeOption::getOption('blog_author_post_id'));
             $data->post->post_title = sprintf(__('All posts from %s', THEME_DOMAIN), get_the_author_meta('display_name', $author->data->ID));
         } elseif (is_category($categoryId)) {
             $category = get_category($categoryId);
             $data->post = get_post(ThemeOption::getOption('blog_category_post_id'));
             $data->post->post_title = ThemeHelper::esc_html($category->name);
         } elseif (is_day()) {
             $data->post = get_post(ThemeOption::getOption('blog_archive_post_id'));
             $data->post->post_title = get_the_date();
         } elseif (is_archive()) {
             $data->post = get_post(ThemeOption::getOption('blog_archive_post_id'));
             $data->post->post_title = single_month_title(' ', false);
         } elseif (is_search()) {
             $data->post = get_post(ThemeOption::getOption('blog_search_post_id'));
             $data->post->post_title = sprintf(__('Kết quả tìm kiếm: <i>%s</i>', THEME_DOMAIN), esc_html(get_query_var('s')));
         } elseif (is_404()) {
             $data->post = get_post(ThemeOption::getOption('page_404_page_id'));
             $data->post->post_title = $data->post->post_title;
         } else {
             return false;
         }
     }
     return $data;
 }
开发者ID:phanhoanglong2610,项目名称:anc_gvn,代码行数:47,代码来源:Theme.Post.class.php

示例4: esc_html_e

		<ul class="to-form-field-list">
			<li>
				<h5><?php 
esc_html_e('Custom javascript code', THEME_DOMAIN);
?>
</h5>
				<span class="to-legend"><?php 
esc_html_e('Don\'t enter <script> tags. These tags will be added automatically.', THEME_DOMAIN);
?>
</span>
				<div>
					<textarea id="<?php 
ThemeHelper::getFormName('custom_js_code');
?>
" name="<?php 
ThemeHelper::getFormName('custom_js_code');
?>
" rows="1" cols="1"><?php 
echo ThemeHelper::esc_html($this->data['option']['custom_js_code']);
?>
</textarea>
				</div>						
			</li>
		</ul>
开发者ID:slavai,项目名称:sadick,代码行数:24,代码来源:general_custom_js_code.php

示例5: foreach

foreach ($this->data['dictionary']['responsiveMedia'] as $index => $value) {
    if ($index == 1) {
        continue;
    }
    ?>
			<li>
				<h5><?php 
    echo sprintf(esc_html__('CSS styles for page width between %s px and %s px.', THEME_DOMAIN), $value['min-width'], $value['max-width']);
    ?>
</h5>
				<span class="to-legend"><?php 
    echo sprintf(esc_html__('CSS styles for page width between %s px and %s px.', THEME_DOMAIN), $value['min-width'], $value['max-width']);
    ?>
</span>
				<div>
					<textarea id="<?php 
    ThemeHelper::getFormName('custom_css_responsive_' . $index);
    ?>
" name="<?php 
    ThemeHelper::getFormName('custom_css_responsive_' . $index);
    ?>
" rows="1" cols="1" class="css-editor"><?php 
    echo ThemeHelper::esc_html($this->data['option']['custom_css_responsive_' . $index]);
    ?>
</textarea>
				</div>						
			</li>			
<?php 
}
?>
		</ul>
开发者ID:slavai,项目名称:sadick,代码行数:31,代码来源:custom_css.php

示例6: esc_html_e

</h5>
					<span class="to-legend"><?php 
esc_html_e('Select one of the available posts types and enter additional details about it (if needed).', THEME_DOMAIN);
?>
</span>
					<div class="to-clear-fix">
						<select name="<?php 
ThemeHelper::getFormName('post_type');
?>
" id="<?php 
ThemeHelper::getFormName('post_type');
?>
">
<?php 
foreach ($this->data['dictionary']['postType'] as $index => $value) {
    echo '<option value="' . ThemeHelper::esc_attr($index) . '" ' . ThemeHelper::selectedIf($this->data['option']['post_type'], $index, false) . '>' . ThemeHelper::esc_html($value[0]) . '</option>';
}
?>
						</select>
					</div>
				</li>
				<li>
					<h5><?php 
esc_html_e('Preambule', THEME_DOMAIN);
?>
</h5>
					<span class="to-legend"><?php 
esc_html_e('Enter preambule (the top part of the post, e.g: video, audio, image slider etc.) of the post. You can use shortcodes in this field.', THEME_DOMAIN);
?>
</span>
					<div class="to-clear-fix">
开发者ID:phanhoanglong2610,项目名称:anc_gvn,代码行数:31,代码来源:meta_box_post.php

示例7: esc_html_e

		<ul class="to-form-field-list">
			<li>
				<h5><?php 
esc_html_e('404 error page', THEME_DOMAIN);
?>
</h5>
				<span class="to-legend"><?php 
esc_html_e('Get settings for 404 page from selected page.', THEME_DOMAIN);
?>
</span>
				<div class="to-clear-fix">
					<select name="<?php 
ThemeHelper::getFormName('page_404_page_id');
?>
" id="<?php 
ThemeHelper::getFormName('page_404_page_id');
?>
">
<?php 
foreach ($this->data['dictionary']['page'] as $value) {
    echo '<option value="' . ThemeHelper::esc_attr($value->ID) . '" ' . ThemeHelper::selectedIf($this->data['option']['page_404_page_id'], $value->ID, false) . '>' . ThemeHelper::esc_html($value->post_title) . '</option>';
}
?>
					</select>
				</div>
			</li>
		</ul>
开发者ID:slavai,项目名称:sadick,代码行数:27,代码来源:general_page.php

示例8: esc_html_e

esc_html_e('Footer layout', THEME_DOMAIN);
?>
</h5>
					<span class="to-legend"><?php 
esc_html_e('Select layout of widgets in footer. This option works only if this widget area is selected as sidebar in footer.', THEME_DOMAIN);
?>
</span>
					<div class="to-clear-fix">
						<select name="<?php 
ThemeHelper::getFormName('widget_area_footer_layout');
?>
" id="<?php 
ThemeHelper::getFormName('widget_area_footer_layout');
?>
">
<?php 
foreach ($this->data['dictionary']['layout'] as $index => $value) {
    echo '<option value="' . ThemeHelper::esc_attr($index) . '" ' . ThemeHelper::selectedIf($this->data['option']['widget_area_footer_layout'], $index, false) . '>' . ThemeHelper::esc_html($index) . '</option>';
}
?>
						</select>
					</div>
				</li>
			</ul>
		</div>
		<script type="text/javascript">
			jQuery(document).ready(function($)
			{	
				$('.to').themeOptionElement({init:true});
			});
		</script>
开发者ID:slavai,项目名称:sadick,代码行数:31,代码来源:meta_box_widget_area.php

示例9: esc_html_e

				</div>
				<div class="to-clear-fix">
					<span class="to-legend-field"><?php 
esc_html_e('Previous:', THEME_DOMAIN);
?>
</span>
					<select name="<?php 
ThemeHelper::getFormName('fancybox_image_easing_previous');
?>
" id="<?php 
ThemeHelper::getFormName('fancybox_image_easing_previous');
?>
">
<?php 
foreach ($this->data['dictionary']['easingType'] as $index => $value) {
    echo '<option value="' . ThemeHelper::esc_attr($index) . '" ' . ThemeHelper::selectedIf($this->data['option']['fancybox_image_easing_previous'], $index, false) . '>' . ThemeHelper::esc_html($value[0]) . '</option>';
}
?>
					</select>
				</div>
			</li>
			<li>
				<h5><?php 
esc_html_e('Speed', THEME_DOMAIN);
?>
</h5>
				<span class="to-legend"><?php 
esc_html_e('The time it takes (in ms) to complete transition.', THEME_DOMAIN);
?>
</span>
				<div>
开发者ID:phanhoanglong2610,项目名称:anc_gvn,代码行数:31,代码来源:plugin_fancybox_image.php

示例10: esc_html_e

					<?php 
esc_html_e('Specify the image size. For options "Length" and "Percentage" you have to specify these values in next field.', THEME_DOMAIN);
?>
<br/>
				</span>
				<div class="to-clear-fix">
					<select name="<?php 
ThemeHelper::getFormName('header_background_image_size_1');
?>
" id="<?php 
ThemeHelper::getFormName('header_background_image_size_1');
?>
">
<?php 
foreach ($this->data['dictionary']['backgroundSize'] as $index => $value) {
    echo '<option value="' . ThemeHelper::esc_attr($index) . '" ' . ThemeHelper::selectedIf($this->data['option']['header_background_image_size_1'], $index, false) . '>' . ThemeHelper::esc_html($value[0]) . '</option>';
}
?>
					</select>
				</div>
			</li>				
			<li>
				<h5><?php 
esc_html_e('Background image size', THEME_DOMAIN);
?>
</h5>
				<span class="to-legend">
					<?php 
esc_html_e('Sets the width and height of the background image.', THEME_DOMAIN);
?>
<br/>
开发者ID:slavai,项目名称:sadick,代码行数:31,代码来源:general_main.php

示例11: foreach

$i = 0;
foreach ($this->data['dictionary']['postCategory'] as $index => $value) {
    $i++;
    ?>
						<input type="checkbox" name="<?php 
    ThemeHelper::getFormName('post_category[]');
    ?>
" id="<?php 
    ThemeHelper::getFormName('post_category_' . $i);
    ?>
" value="<?php 
    echo ThemeHelper::esc_attr($index);
    ?>
" <?php 
    ThemeHelper::checkedIf($this->data['option']['post_category'], $index);
    ?>
/>
						<label for="<?php 
    ThemeHelper::getFormName('post_category_' . $i);
    ?>
"><?php 
    echo ThemeHelper::esc_html($value);
    ?>
</label>
<?php 
}
?>
					</div>
				</li>				
			</ul>
		</div>
开发者ID:phanhoanglong2610,项目名称:anc_gvn,代码行数:31,代码来源:meta_box_page.php

示例12: esc_html_e

</h5>
				<span class="to-legend"><?php 
esc_html_e('Select top menu.', THEME_DOMAIN);
?>
</span>
				<div class="to-clear-fix">
					<select name="<?php 
ThemeHelper::getFormName('menu_top_woocommerce');
?>
" id="<?php 
ThemeHelper::getFormName('menu_top_woocommerce');
?>
">
<?php 
foreach ($this->data['dictionary']['menu-1'] as $index => $value) {
    echo '<option value="' . ThemeHelper::esc_attr($index) . '" ' . ThemeHelper::selectedIf($this->data['option']['menu_top_woocommerce'], $index, false) . '>' . ThemeHelper::esc_html($value[0]) . '</option>';
}
?>
					</select>
				</div>
			</li>				
		</ul>
		<script type="text/javascript">
			jQuery(document).ready(function($) 
			{
				var element=$('.to').themeOptionElement();;
				element.bindBrowseMedia('#<?php 
ThemeHelper::getFormName('header_background_image_src_woocommerce_browse');
?>
');
			});
开发者ID:phanhoanglong2610,项目名称:anc_gvn,代码行数:31,代码来源:plugin_woocommerce.php

示例13: esc_html_e

echo ThemeHelper::esc_attr($this->data['option']['go_to_page_top_animation_duration']);
?>
" maxlength="5"/>
				</div>
			</li>
			<li>
				<h5><?php 
esc_html_e('Easing', THEME_DOMAIN);
?>
</h5>
				<span class="to-legend"><?php 
esc_html_e('Easing method of animation.', THEME_DOMAIN);
?>
</span>
				<div class="to-clear-fix">
					<select name="<?php 
ThemeHelper::getFormName('go_to_page_top_animation_easing');
?>
" id="<?php 
ThemeHelper::getFormName('go_to_page_top_animation_easing');
?>
">
<?php 
foreach ($this->data['dictionary']['easingType'] as $index => $value) {
    echo '<option value="' . ThemeHelper::esc_attr($index) . '" ' . ThemeHelper::selectedIf($this->data['option']['go_to_page_top_animation_easing'], $index, false) . '>' . ThemeHelper::esc_html($value[0]) . '</option>';
}
?>
					</select>
				</div>
			</li>
		</ul>
开发者ID:slavai,项目名称:sadick,代码行数:31,代码来源:general_go_top_top.php

示例14: esc_html_e

    echo ThemeHelper::esc_html($value->data->display_name);
    ?>
</label>
<?php 
}
?>
				</div>
			</li>				
			<li>
				<h5><?php 
esc_html_e('Disable maintenance mode for IP addreses', THEME_DOMAIN);
?>
</h5>
				<span class="to-legend"><?php 
esc_html_e('Allow to visit page (in normal mode) visitors from selected (seperated by line break) IP addresses:', THEME_DOMAIN);
?>
</span>
				<div>
					<textarea id="<?php 
ThemeHelper::getFormName('maintenance_mode_ip_address');
?>
" name="<?php 
ThemeHelper::getFormName('maintenance_mode_ip_address');
?>
" rows="1" cols="1"><?php 
echo ThemeHelper::esc_html($this->data['option']['maintenance_mode_ip_address']);
?>
</textarea>
				</div>						
			</li>
		</ul>
开发者ID:slavai,项目名称:sadick,代码行数:31,代码来源:plugin_maintenance_mode.php


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