本文整理汇总了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');
}
示例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', '');
}
}
示例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);
}
示例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();
}
}
示例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');
}
示例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');
}
}
示例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');
}
}
示例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']);
}
}
}
示例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');
}
}
示例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;
}
示例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');
}
}
}
示例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')));
}
示例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);
}
}
}
示例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', '');
}
示例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');
}
}