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


PHP Plugins::id_from_file方法代码示例

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


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

示例1: action_plugin_activation

 /**
  * action: plugin_activation
  *
  * @access public
  * @param string $file
  * @return void
  */
 public function action_plugin_activation($file)
 {
     if (Plugins::id_from_file($file) != Plugins::id_from_file(__FILE__)) {
         return;
     }
     Post::add_new_type('revision');
 }
开发者ID:habari-extras,项目名称:revision,代码行数:14,代码来源:revision.plugin.php

示例2: action_plugin_activation

 /**
  * When Plugin is activated insert default options
  */
 public function action_plugin_activation($file)
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         Options::set('syntax__default_lang', 'php');
         Options::set('syntax__line_numbers', '');
     }
 }
开发者ID:habari-extras,项目名称:syntaxhighlighter,代码行数:10,代码来源:syntax.plugin.php

示例3: action_plugin_activation

 /**
  * action: plugin_activation
  *
  * @access public
  * @param string $file
  * @return void
  */
 public function action_plugin_activation($file)
 {
     if (Plugins::id_from_file($file) != Plugins::id_from_file(__FILE__)) {
         return;
     }
     Options::set('calendar__week_start', 0);
 }
开发者ID:habari-extras,项目名称:calendar,代码行数:14,代码来源:calendar.plugin.php

示例4: action_plugin_activation

 /**
  * Add the subpage vocabulary
  *
  */
 public function action_plugin_activation($file)
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         $params = array('name' => self::$vocabulary, 'description' => 'A vocabulary for describing hierarchical relationships between pages', 'features' => array('hierarchical'));
         $subpages = new Vocabulary($params);
         $subpages->insert();
     }
 }
开发者ID:habari-extras,项目名称:subpages,代码行数:12,代码来源:subpages.plugin.php

示例5: action_plugin_activation

 public function action_plugin_activation($file)
 {
     if (Plugins::id_from_file($file) != Plugins::id_from_file(__FILE__)) {
         return;
     }
     Options::set('woopra__tag_registered', false);
     Options::set('woopra__display_avatar', 'no');
 }
开发者ID:habari-extras,项目名称:woopra,代码行数:8,代码来源:woopra.plugin.php

示例6: action_plugin_deactivation

 public function action_plugin_deactivation($file = '')
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         $class_name = strtolower(get_class($this));
         // dump our cached list
         Cache::expire($class_name . ':list');
     }
 }
开发者ID:habari-extras,项目名称:monthly_archives,代码行数:8,代码来源:monthly_archives.plugin.php

示例7: action_plugin_deactivation

 /**
  * Remove notify_all options on deactivation
  */
 public function action_plugin_deactivation($file)
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         Options::delete('notify_all__notify_posts');
         Options::delete('notify_all__notify_comments');
         Options::delete('notify_all__user_can_override');
     }
 }
开发者ID:habari-extras,项目名称:notify_all,代码行数:11,代码来源:notify_all.plugin.php

示例8: action_plugin_deactivation

 /**
  * action_plugin_deactivation
  * Unregisters the core modules.
  * @param string $file plugin file
  */
 public function action_plugin_deactivation($file)
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         foreach ($this->reports as $rpt => $data) {
             Modules::remove_by_name($data['module']);
         }
     }
 }
开发者ID:habari-extras,项目名称:ga_dashboard,代码行数:13,代码来源:ga_dashboard.plugin.php

示例9: action_plugin_deactivation

 /**
  * action_plugin_deactivation
  * Unregisters the core modules.
  * @param string $file plugin file
  */
 function action_plugin_deactivation($file)
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         Modules::remove_by_name('Latest Entries');
         Modules::remove_by_name('Latest Comments');
         Modules::remove_by_name('Latest Log Activity');
     }
 }
开发者ID:anupom,项目名称:my-blog,代码行数:13,代码来源:coredashmodules.plugin.php

示例10: plugin_id

	/**
	 * Returns a unique id for this pluggable
	 * @return string A plugin id
	 */
	final public function plugin_id()
	{
		static $id;
		if ( !isset( $id ) ) {
			$id = Plugins::id_from_file( str_replace( '\\', '/', $this->get_file() ) );
		}
		return $id;
	}
开发者ID:nerdfiles,项目名称:habari_boilerplate,代码行数:12,代码来源:pluggable.php

示例11: action_plugin_activation

 public function action_plugin_activation($file)
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         if (Options::get('dateyurl__format') == null) {
             Options::set('dateyurl__format', 'date');
         }
     }
 }
开发者ID:habari-extras,项目名称:dateyurl,代码行数:8,代码来源:dateyurl.plugin.php

示例12: action_plugin_activation

 /**
  * action: plugin_activation
  *
  * @access public
  * @param string $file
  * @return void
  */
 public function action_plugin_activation($file)
 {
     if (Plugins::id_from_file($file) != Plugins::id_from_file(__FILE__)) {
         return;
     }
     Options::set('socialink__link_pos', 'top');
     Options::set('socialink__services', serialize(array('digg', 'delicious', 'technorati', 'google', 'yahoo', 'furl', 'reddit', 'magnolia')));
 }
开发者ID:habari-extras,项目名称:socialink,代码行数:15,代码来源:socialink.plugin.php

示例13: action_plugin_activation

 /**
  * Sets default to always show themeswitcher in footer if not using $theme->swithcer();
  **/
 public function action_plugin_activation($file)
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         if (Options::get('themeswitcher__show') == null) {
             Options::set('themeswitcher__show', 1);
         }
     }
 }
开发者ID:habari-extras,项目名称:themeswitcher,代码行数:11,代码来源:themeswitcher.plugin.php

示例14: action_plugin_activation

 /**
  * action: plugin_activation
  *
  * @access public
  * @param string $file
  */
 public function action_plugin_activation($file)
 {
     if (Plugins::id_from_file($file) != Plugins::id_from_file(__FILE__)) {
         return;
     }
     Options::set('photozousilo__username', '');
     Options::set('photozousilo__password', '');
 }
开发者ID:habari-extras,项目名称:photozousilo,代码行数:14,代码来源:photozousilo.plugin.php

示例15: action_plugin_deactivation

 public function action_plugin_deactivation($file = '')
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         CronTab::delete_cronjob('optimize database tables initial');
         CronTab::delete_cronjob('optimize database tables');
         Options::delete('database_optimizer__frequency');
     }
 }
开发者ID:habari-extras,项目名称:database_optimizer,代码行数:8,代码来源:database_optimizer.plugin.php


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