$title ) { if ( class_exists( $class ) ) { $obj = call_user_func( array( $class, 'get_instance' ) ); $obj->do_meta_box( $post_id ); } } } public static function add_admin_scripts( $hook ) { global $post; if ( ( $hook != 'post-new.php' && $hook != 'post.php' ) || TribeEvents::POSTTYPE != $post->post_type ) return; wp_enqueue_script( 'events-tickets', plugins_url( 'resources/tickets.js', dirname( dirname( __FILE__ ) ) ) ); wp_enqueue_style( 'events-tickets', plugins_url( 'resources/tickets.css', dirname( dirname( __FILE__ ) ) ) ); } } add_action( 'add_meta_boxes', array( 'TribeEventsTicketsMetabox', 'do_meta_box' ) ); add_action( 'admin_enqueue_scripts', array( 'TribeEventsTicketsMetabox', 'add_admin_scripts' ) );