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


PHP Post::deactivate_post_type方法代码示例

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


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

示例1: action_admin_theme_post_admin_cctypes

 /**
  * Respond to post requests on the admin_cctypes template
  *
  * @param AdminHandler $handler The admin handler object
  * @param Theme $theme The admin theme object
  */
 function action_admin_theme_post_admin_cctypes($handler, $theme)
 {
     $action = Controller::get_var('cct_action');
     switch ($action) {
         case 'addtype':
             Post::add_new_type($_POST['newtype']);
             $typeid = Post::type($_POST['newtype']);
             $handled = Options::get('cctypes_types');
             if (!is_array($handled)) {
                 $handled = array();
             }
             $handled[$typeid] = $typeid;
             array_unique($handled);
             Options::set('cctypes_types', $handled);
             Session::notice(_t('Added post type "' . $_POST['newtype'] . '".'));
             break;
         case 'deletetype':
             $typename = Post::type_name($_POST['deltype']);
             Post::deactivate_post_type($_POST['deltype']);
             $handled = Options::get('cctypes_types');
             if (isset($handled[$_POST['deltype']])) {
                 unset($handled[$_POST['deltype']]);
             }
             Options::set('cctypes_types', $handled);
             Session::notice(_t('Deactivated post type "' . $typename . '".'));
     }
     Utils::redirect();
 }
开发者ID:habari-extras,项目名称:customctypes,代码行数:34,代码来源:customctypes.plugin.php

示例2: remove_template

 public function remove_template()
 {
     Post::deactivate_post_type('poll');
     $this->remove_template('widget', dirname(__FILE__) . '/widget.php');
     Stack::remove('template_header_javascript', Site::get_url('scripts') . '/jquery.js', 'jquery');
     Stack::remove('template_stylesheet', array(URL::get_from_filesystem(__FILE__) . '/widget.css', 'screen'), 'pollwigitcss');
     $this->remove_template('poll.single', dirname(__FILE__) . '/poll.single.php');
 }
开发者ID:habari-extras,项目名称:polls,代码行数:8,代码来源:polls.plugin.php

示例3: action_plugin_deactivation

 public function action_plugin_deactivation($plugin_file)
 {
     Post::deactivate_post_type('link');
 }
开发者ID:habari-extras,项目名称:linkblog,代码行数:4,代码来源:linkblog.plugin.php

示例4: uninstall

 /**
  * Remove stuff we installed
  **/
 public function uninstall()
 {
     Post::deactivate_post_type('project');
 }
开发者ID:habari-extras,项目名称:mpango,代码行数:7,代码来源:mpango.plugin.php

示例5: action_plugin_deactivation

 /**
  * Hook on deactivation of this plugin
  */
 public function action_plugin_deactivation()
 {
     // when deactivating, don't destroy data, just turn it 'off'
     Post::deactivate_post_type('addon');
     ACL::destroy_token('manage_versions');
 }
开发者ID:habari-extras,项目名称:addon_catalog,代码行数:9,代码来源:addon_catalog.plugin.php

示例6: action_plugin_deactivation

 public function action_plugin_deactivation($file)
 {
     if (realpath($file) == __FILE__) {
         Post::deactivate_post_type('snippet');
     }
 }
开发者ID:habari-extras,项目名称:snippet,代码行数:6,代码来源:snippet.plugin.php

示例7: action_plugin_deactivation

 public function action_plugin_deactivation($plugin_file)
 {
     if (Plugins::id_from_file(__FILE__) == Plugins::id_from_file($plugin_file)) {
         Post::deactivate_post_type('podcast');
     }
 }
开发者ID:habari-extras,项目名称:podcast,代码行数:6,代码来源:podcast.plugin.php

示例8: action_plugin_deactivation

 public function action_plugin_deactivation($file = '')
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         // @todo it has yet been decided whether or not this is a good idea - MellerTime
         /*
         // get all the posts of our update type, so we can delete them
         $posts = Posts::get( array( 'content_type' => 'plugin', 'nolimit' => true ) );
         
         foreach ( $posts as $post ) {
         
         	$post->delete();
         
         }
         */
         // deactivate our custom post type
         Post::deactivate_post_type('plugin');
     }
 }
开发者ID:ringmaster,项目名称:plugin_directory,代码行数:18,代码来源:plugin_directory.plugin.php

示例9: uninstall

 /**
  * Set up needed permissions
  */
 private static function uninstall()
 {
     // Deactivate post types
     Post::deactivate_post_type('thread');
     Post::deactivate_post_type('forum');
     // Remove tokens
     ACL::destroy_token('forum_close_thread');
     ACL::destroy_token('forum_see_private');
 }
开发者ID:habari-extras,项目名称:spreking,代码行数:12,代码来源:spreking.plugin.php


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