コード例 #1
0
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->type = 'contact';
     // Post title fields
     add_filter('enter_title_here', array($this, 'enter_title_here'), 1, 2);
     // Featured image text
     //add_filter( 'gettext', array( $this, 'featured_image_gettext' ) );
     //add_filter( 'media_view_strings', array( $this, 'media_view_strings' ), 10, 2 );
     // Visibility option
     //add_action( 'post_submitbox_misc_actions', array( $this, 'property_data_visibility' ) );
     // Before data updates
     add_action('pre_post_update', array($this, 'pre_post_update'));
     add_filter('wp_insert_post_data', array($this, 'wp_insert_post_data'));
     // Admin Columns
     add_filter('manage_edit-contact_columns', array($this, 'edit_columns'));
     add_action('manage_contact_posts_custom_column', array($this, 'custom_columns'), 2);
     /*add_filter( 'manage_edit-property_sortable_columns', array( $this, 'custom_columns_sort' ) );
     		add_filter( 'request', array( $this, 'custom_columns_orderby' ) );
     
     		// Sort link
     		add_filter( 'views_edit-property', array( $this, 'default_sorting_link' ) );
     
     		// Prouct filtering
     		add_action( 'restrict_manage_posts', array( $this, 'product_filters' ) );
     		add_filter( 'parse_query', array( $this, 'property_filters_query' ) );
     
     		// Enhanced search
     		add_filter( 'posts_search', array( $this, 'product_search' ) );
     
     		// Maintain hierarchy of terms
     		add_filter( 'wp_terms_checklist_args', array( $this, 'disable_checked_ontop' ) );*/
     // Bulk / quick edit
     add_filter('bulk_actions-edit-contact', array($this, 'remove_bulk_actions'));
     /*add_action( 'bulk_edit_custom_box', array( $this, 'bulk_edit' ), 10, 2 );
     		add_action( 'quick_edit_custom_box',  array( $this, 'quick_edit' ), 10, 2 );
     		add_action( 'save_post', array( $this, 'bulk_and_quick_edit_save_post' ), 10, 2 );
     
     		// Uploads
     		add_filter( 'upload_dir', array( $this, 'upload_dir' ) );
     		add_action( 'media_upload_downloadable_product', array( $this, 'media_upload_downloadable_product' ) );
     		add_filter( 'mod_rewrite_rules', array( $this, 'ms_protect_download_rewite_rules' ) );
     
     		// Download permissions
     		//add_action( 'propertyhive_process_product_file_download_paths', array( $this, 'process_product_file_download_paths' ), 10, 3 );*/
     add_action('admin_notices', array($this, 'ph_message_admin_notice'));
     // Call PH_Admin_CPT constructor
     parent::__construct();
 }
コード例 #2
0
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->type = 'enquiry';
     // Post title fields
     add_filter('enter_title_here', array($this, 'enter_title_here'), 1, 2);
     // Featured image text
     //add_filter( 'gettext', array( $this, 'featured_image_gettext' ) );
     //add_filter( 'media_view_strings', array( $this, 'media_view_strings' ), 10, 2 );
     // Visibility option
     //add_action( 'post_submitbox_misc_actions', array( $this, 'property_data_visibility' ) );
     // Before data updates
     add_action('pre_post_update', array($this, 'pre_post_update'));
     add_filter('wp_insert_post_data', array($this, 'wp_insert_post_data'));
     // Admin Columns
     add_filter('manage_edit-enquiry_columns', array($this, 'edit_columns'));
     add_action('manage_enquiry_posts_custom_column', array($this, 'custom_columns'), 2);
     // Bulk / quick edit
     add_filter('bulk_actions-edit-enquiry', array($this, 'remove_bulk_actions'));
     // Call PH_Admin_CPT constructor
     parent::__construct();
 }