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


PHP Format::apply方法代码示例

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


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

示例1: action_init_theme

 public function action_init_theme()
 {
     Format::apply('tag_and_list', 'post_tags_out', ', ', ', ');
     Format::apply_with_hook_params('more', 'post_content_out', 'More ›', null, 1);
     Stack::add('template_stylesheet', array(Site::get_url('theme') . '/css/screen.css', 'screen, projection'), 'screen');
     Stack::add('template_stylesheet', array(Site::get_url('theme') . '/css/style.css', 'screen, projection'), 'style');
 }
开发者ID:ahutchings,项目名称:habari-sparse,代码行数:7,代码来源:theme.php

示例2: test_format_priority

 public function test_format_priority()
 {
     Format::apply(function ($v) {
         return $v . '7';
     }, 'test_filter_7');
     Format::apply(function ($v) {
         return $v . '8';
     }, 'test_filter');
     $result = Plugins::filter('test_filter', 'test');
     $this->assert_equal('test78', $result);
     Format::apply(function ($v, $c) {
         return $v . '7' . $c;
     }, 'test_filter2_7', 'a');
     Format::apply(function ($v, $c) {
         return $v . '8' . $c;
     }, 'test_filter2', 'b');
     $result = Plugins::filter('test_filter2', 'test');
     $this->assert_equal('test7a8b', $result);
     Format::apply_with_hook_params(function ($v, $h, $c) {
         return $v . '7' . $h . $c;
     }, 'test_filter3_7', 'a');
     Format::apply_with_hook_params(function ($v, $h, $c) {
         return $v . '8' . $h . $c;
     }, 'test_filter3', 'b');
     $result = Plugins::filter('test_filter3', 'test', 'h');
     $this->assert_equal('test7ha8hb', $result);
 }
开发者ID:habari,项目名称:tests,代码行数:27,代码来源:test_format.php

示例3: action_init_theme

 public function action_init_theme()
 {
     // Apply Format::autop() to post content:
     Format::apply('autop', 'post_content_out');
     // Apply Format::autop() to comment content:
     Format::apply('autop', 'comment_content_out');
     /*DELETE ME
     		Format::apply( 'nice_date', 'post_updated_date', 'F j, Y' );
     		Format::apply( 'nice_date', 'post_updated_time', 'g:ia' );
     		Format::apply( 'nice_date', 'post_pubdate_wday', 'l' ); 
     		Format::apply( 'nice_date', 'post_pubdate_day', 'j' );
     		Format::apply( 'nice_date', 'post_pubdate_month', 'F' );
     		Format::apply( 'nice_date', 'post_pubdate_monthno', 'm' );
     		Format::apply( 'nice_date', 'post_pubdate_year', 'Y' );
     		Format::apply( 'nice_date', 'post_pubdate_time', 'g:ia' );
     		// Apply Format::nice_date() to comment date:
     		Format::apply( 'nice_date', 'comment_date', 'F j, Y' );
     		Format::apply( 'nice_date', 'comment_time', 'g:ia' );
     /DELETEME */
     // Apply Format::tag_and_list() to post tags...
     Format::apply('tag_and_list', 'post_tags_out');
     // Truncate content excerpt at "more" or 56 characters:
     //Format::apply_with_hook_params( 'more', 'post_content_excerpt','',600, 0 );
     //Initial options
     $configured = Options::get('darkautumn__configured') ? true : false;
     if (!$configured) {
         $this->set_default_options();
     }
 }
开发者ID:ringmaster,项目名称:dark-autumn,代码行数:29,代码来源:theme.php

示例4: action_init_theme

 /**
  * Execute on theme init to apply these filters to output
  */
 public function action_init_theme()
 {
     // Apply Format::autop() to comment content...
     Format::apply('autop', 'comment_content_out');
     // Truncate content excerpt at "more" or 56 characters...
     Format::apply('autop', 'post_content_excerpt');
     Format::apply_with_hook_params('more', 'post_content_excerpt', '', 56, 1);
 }
开发者ID:ringmaster,项目名称:system,代码行数:11,代码来源:theme.php

示例5: action_init_theme

 /**
  * Execute on theme init to apply these filters to output
  */
 public function action_init_theme()
 {
     // Apply Format::autop() to comment content...
     Format::apply('autop', 'comment_content_out');
     // Truncate content excerpt at "more" or 56 characters...
     Format::apply('autop', 'post_content_excerpt');
     Format::apply_with_hook_params('more', 'post_content_excerpt', '', 56, 1);
     // Add FormUI template placing the input before the label
     $this->add_template('charcoal_text', dirname(__FILE__) . '/formcontrol_text.php');
 }
开发者ID:wwxgitcat,项目名称:habari,代码行数:13,代码来源:theme.php

示例6: action_init_theme

 public function action_init_theme()
 {
     // Apply Format::autop() to post content...
     Format::apply('autop', 'post_content_out');
     // Apply Format::autop() to comment content...
     Format::apply('autop', 'comment_content_out');
     // Apply Format::tag_and_list() to post tags...
     Format::apply('tag_and_list', 'post_tags_out');
     // Apply Format::nice_date() to post date...
     Format::apply('nice_date', 'post_pubdate_out', 'F jS, Y');
 }
开发者ID:habari-extras,项目名称:georgia,代码行数:11,代码来源:theme.php

示例7: action_init_theme

 public function action_init_theme()
 {
     $this->load_text_domain('sp');
     // Apply Format::autop() to comment content.
     Format::apply('autop', 'comment_content_out');
     // Apply Format::tag_and_list() to post tags...
     Format::apply('tag_and_list', 'post_tags_out');
     // Only triggered by <!--more--> tag, not by length.
     Format::apply_with_hook_params('more', 'post_content_out', _t('--More--', 'sp'));
     // Excerpt output. echo $post->content_excerpt.
     Format::apply_with_hook_params('more', 'post_content_excerpt', _t('--More--', 'sp'), 60, 1);
 }
开发者ID:laiello,项目名称:sp-theme,代码行数:12,代码来源:theme.php

示例8: action_init_theme

 public function action_init_theme()
 {
     // Apply Format::autop() to comment content...
     Format::apply('autop', 'comment_content_out');
     // Apply Format::tag_and_list() to post tags...
     Format::apply('tag_and_list', 'post_tags_out');
     // Only uses the <!--more--> tag, with the 'more' as the link to full post
     Format::apply_with_hook_params('more', 'post_content_out', 'more');
     // Creates an excerpt option. echo $post->content_excerpt;
     Format::apply('autop', 'post_content_excerpt');
     Format::apply_with_hook_params('more', 'post_content_excerpt', 'more', 60, 1);
     $this->autoCompileLess(dirname(__FILE__) . "/less/bootstrap.less", dirname(__FILE__) . "/css/bootstrap.css");
     $this->autoCompileLess(dirname(__FILE__) . "/less/custom.less", dirname(__FILE__) . "/css/custom.css");
 }
开发者ID:ringmaster,项目名称:NSTheme,代码行数:14,代码来源:theme.php

示例9: action_init_theme

 /**
  * Execute on theme init to apply these filters to output
  */
 public function action_init_theme()
 {
     if (!Plugins::is_loaded('HabariMarkdown')) {
         // Apply Format::autop() to post content...
         Format::apply('autop', 'post_content_out');
     }
     // Truncate content excerpt at "<!--more-->"...
     Format::apply_with_hook_params('more', 'post_content_out');
     // Apply Format::autop() to comment content...
     Format::apply('autop', 'comment_content_out');
     // Apply Format::tag_and_list() to post tags...
     Format::apply('tag_and_list', 'post_tags_out');
     $this->load_text_domain('demorgan');
 }
开发者ID:habari-extras,项目名称:demorgan,代码行数:17,代码来源:theme.php

示例10: action_init_theme

	public function action_init_theme()
	{
		// Apply Format::autop() to comment content...
		Format::apply( 'autop', 'comment_content_out' );
		// Apply Format::tag_and_list() to post tags...
		Format::apply( 'tag_and_list', 'post_tags_out' );
		// Only uses the <!--more--> tag, with the 'more' as the link to full post
		Format::apply_with_hook_params( 'more', 'post_content_out', 'more' );
		// Creates an excerpt option. echo $post->content_excerpt;
		Format::apply( 'autop', 'post_content_excerpt' );
		Format::apply_with_hook_params( 'more', 'post_content_excerpt', 'more',60, 1 );
		// Format the calendar like date for home, entry.single and entry.multiple templates
		Format::apply( 'format_date', 'post_pubdate_out','<span class="calyear">{Y}</span><br><span class="calday">{j}</span><br><span  class="calmonth">{F}</span>' );
	}
开发者ID:rynodivino,项目名称:system,代码行数:14,代码来源:theme.php

示例11: action_init

 public function action_init()
 {
     if (!class_exists('MarkdownExtra')) {
         require_once 'php-markdown/Michelf/Markdown.php';
         require_once 'php-markdown/Michelf/MarkdownExtra.php';
     }
     if (!function_exists('SmartyPants') && Options::get('habarimarkdown__smarty', false)) {
         require_once 'php-smartypants/smartypants.php';
     }
     Format::apply('markdown', 'post_content_out_7');
     Format::apply('markdown', 'post_content_summary_7');
     Format::apply('markdown', 'post_content_more_7');
     Format::apply('markdown', 'post_content_excerpt_7');
     Format::apply('comment_safe_markdown', 'comment_content_out_7');
 }
开发者ID:habari-extras,项目名称:habarimarkdown,代码行数:15,代码来源:habarimarkdown.plugin.php

示例12: action_init_theme

 /**
  * Execute on theme init to apply these filters to output
  */
 public function action_init_theme()
 {
     // Apply Format::autop() to post content...
     Format::apply('autop', 'post_content_out');
     Format::apply('autop', 'post_content_excerpt');
     // Apply Format::autop() to comment content...
     Format::apply('autop', 'comment_content_out');
     // Apply Format::tag_and_list() to post tags...
     Format::apply('tag_and_list', 'post_tags_out');
     // Apply Format::nice_date() to post date...
     Format::apply('nice_date', 'post_pubdate_out', 'F j, Y g:ia');
     // Apply Format::nice_date() to comment date...
     Format::apply('nice_date', 'comment_date_out', 'F j, Y g:ia');
     // Truncate content excerpt at "more" or 75 characters...
     Format::apply_with_hook_params('more', 'post_content_excerpt', 'Read More', 75);
 }
开发者ID:habari-extras,项目名称:rino,代码行数:19,代码来源:theme.php

示例13: action_init_theme

 /**
  * Add default output filters
  **/
 public function action_init_theme()
 {
     // Apply Format::autop() to post content...
     Format::apply('autop', 'post_content_out');
     // Apply Format::autop() to comment content...
     Format::apply('autop', 'comment_content_out');
     // Apply Format::tag_and_list() to post tags...
     Format::apply('tag_and_list', 'post_tags_out');
     // Apply Format::nice_date() to post date...
     Format::apply('format_date', 'post_pubdate_out', '{F} {j}, {Y} {g}:{i}{a}');
     // Apply Format::more to post content...
     Plugins::register(array($this, 'more'), 'filter', 'post_content_out');
     // Apply Format::search_highlight to post content...
     Format::apply('search_highlight', 'post_content_out');
     //Session::error('Sample error', 'sample');
 }
开发者ID:habari-extras,项目名称:gray,代码行数:19,代码来源:theme.php

示例14: action_init_theme

 public function action_init_theme()
 {
     // Apply Format::autop() to post content...
     Format::apply('autop', 'post_content_out');
     // Only uses the <!--more--> tag, with the 'more' as the link to full post
     Format::apply_with_hook_params('more', 'post_content_out', 'more');
     // Creates an excerpt option. echo $post->content_excerpt;
     Format::apply_with_hook_params('more', 'post_content_excerpt', 'more', 60, 1);
     // Apply Format::autop() to comment content...
     Format::apply('autop', 'comment_content_out');
     // Apply Format::tag_and_list() to post tags...
     Format::apply('tag_and_list', 'post_tags_out');
     // Apply Format::nice_date() to comment date...
     Format::apply('nice_date', 'comment_date_out', 'F jS, Y');
     // Apply Format::nice_date() to post date...
     Format::apply('nice_date', 'post_pubdate_out', 'F jS, Y');
 }
开发者ID:habari-extras,项目名称:aligned,代码行数:17,代码来源:theme.php

示例15: action_init_theme

 /**
  * Execute on theme init to apply these filters to output
  */
 public function action_init_theme()
 {
     // Apply Format::autop() to post content
     Format::apply('autop', 'post_content_out');
     // Apply Format::autop() to comment content
     Format::apply('autop', 'comment_content_out');
     // Apply Format::nice_date() to post date...
     Format::apply('nice_date', 'post_pubdate_out', 'j-M-Y');
     // Apply Format::nice_date() to post date time...
     Format::apply('nice_date', 'post_pubdate_time', '\\a\\t g:ia');
     // Apply Format::nice_date() to post date excerpt...
     Format::apply('nice_date', 'post_pubdate_excerpt', 'l, F jS, Y');
     // Apply Format::nice_date() to comment date...
     //Format::apply( 'nice_date', 'comment_date', 'l, F jS, Y \a\t g:ia' );
     // Truncate content excerpt at "more" or 56 characters...
     Format::apply_with_hook_params('more', 'post_content_excerpt', '', 256, 1);
 }
开发者ID:anupom,项目名称:my-blog,代码行数:20,代码来源:theme.php


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