function expand_arg($args) { $box_args = parent::expand_arg($args); foreach (array('can_create_post') as $key) { if (isset($args[$key])) { $box_args[$key] = _p2p_pluck($args, $key); } } $box_args = wp_parse_args($box_args, array('context' => 'side', 'priority' => 'default', 'can_create_post' => true)); return $box_args; }
function __construct() { parent::__construct(); add_action('load-edit.php', array($this, 'add_items')); add_action('load-users.php', array($this, 'add_items')); }