src/WPametu/UI/Field/TokenInputPost.php
protected function get_required( \WP_Post $post = null){
        if( current_user_can('edit_posts') ){
            $url = admin_url('post-new.php?post_type='.$this->post_type);
            $post_type_obj = get_post_type_object($this->post_type);
            $tip = esc_html(sprintf($this->__('Add new %s'), $post_type_obj->labels->name));
            $input = <<<HTML
<a href="{$url}" data-tooltip-title="{$tip}"><i class="dashicons dashicons-plus-alt"></i></a>
HTML;
            return $input.parent::get_required($post);
        }else{
            return parent::get_required($post);
        }

    }
protected function get_required( \WP_Post $post = null){
        if( current_user_can('edit_posts') ){
            $url = admin_url('post-new.php?post_type='.$this->post_type);
            $post_type_obj = get_post_type_object($this->post_type);
            $tip = esc_html(sprintf($this->__('Add new %s'), $post_type_obj->labels->name));
            $input = <<<HTML
<a href="{$url}" data-tooltip-title="{$tip}"><i class="dashicons dashicons-plus-alt"></i></a>
HTML;
            return $input.parent::get_required($post);
        }else{
            return parent::get_required($post);
        }

    }
protected function get_required ( \ WP_Post $ post = null ) { if ( current_user_can ( 'edit_posts' ) ) { $ url = admin_url ( 'post-new.php?post_type=' . $ this -> post_type ) ; $ post_type_obj = get_post_type_object ( $ this -> post_type ) ; $ tip = esc_html ( sprintf ( $ this -> __ ( 'Add new %s' ) , $ post_type_obj -> labels -> name ) ) ; $ input =  <<<HTML
<a href="{$url}" data-tooltip-title="{$tip}"><i class="dashicons dashicons-plus-alt"></i></a>
HTML ; return $ input . parent :: get_required ( $ post ) ; } else { return parent :: get_required ( $ post ) ; } }
Add button before requried

@param \WP_Post $post
@return string
Add button before requried