示例#1
0
 function __construct()
 {
     /**
      * Settings Page
      */
     //		add_action( 'psts_settings_page', array( &$this, 'settings' ) );
     /**
      * Add warning
      */
     add_action('admin_notices', array(&$this, 'message'));
     /**
      * Check limit before publishing
      */
     add_filter('wp_insert_post_data', array($this, 'checkPostStatusBeforeSave'), 10, 2);
     /**
      * Remove publish option if limit reached
      *
      */
     add_action('post_submitbox_misc_actions', array($this, 'remove_publish_option'));
     self::$user_label = __('Posting Quotas', 'psts');
     self::$user_description = __('Limited post types', 'psts');
 }
示例#2
0
 /**
  * 'Post/Page Quotas'
  *
  * @return string
  */
 public static function render_tab_quotas()
 {
     ProSites_Helper_Settings::settings_header(ProSites_Helper_Tabs_Settings::get_active_tab());
     $module = new ProSites_Module_PostingQuota();
     echo $module->settings();
 }