Esempio n. 1
0
 /**
  * @param array $args
  */
 public function __construct($args = array())
 {
     $this->args = wp_parse_args($args, array('singular' => __('Invoice', WPI), 'plural' => __('Invoices', WPI), 'post_type' => 'wpi_object', 'post_status' => 'all', 'orderby' => 'ID', 'order' => 'DESC'));
     add_filter('wplt:orderby:is_numeric', array(__CLASS__, 'set_numeric_fields'), 10, 2);
     add_filter('wplt:orderby:meta_type', array(__CLASS__, 'set_correct_types'), 10, 2);
     add_filter('post_row_actions', array(__CLASS__, 'add_view_link'), 10, 2);
     parent::__construct($this->args);
 }
Esempio n. 2
0
 /**
  * @param array $args
  */
 public function __construct($args = array())
 {
     wp_enqueue_script('wp-property-backend-global');
     wp_enqueue_script('wp-property-admin-overview');
     wp_enqueue_script('wpp-jquery-fancybox');
     wp_enqueue_style('wpp-jquery-fancybox-css');
     $this->args = wp_parse_args($args, array('singular' => \WPP_F::property_label(), 'plural' => \WPP_F::property_label('plural'), 'post_type' => 'property', 'orderby' => 'ID', 'order' => 'DESC'));
     //Set parent defaults
     parent::__construct($this->args);
     add_filter('wplt_column_title_label', array($this, 'get_column_title_label'), 10, 2);
     /* Determine if column contains numeric values */
     add_filter('wplt:orderby:is_numeric', array($this, 'is_numeric_column'), 10, 2);
 }