Code Duplication    Length = 11-11 lines in 2 locations

includes/wpinv-template-functions.php 2 locations

@@ 88-98 (lines=11) @@
85
    do_action('wpinv_invoice_display_right_actions', $invoice);
86
}
87
88
function wpinv_before_invoice_content( $content ) {
89
    global $post;
90
91
    if ( $post && $post->post_type == 'wpi_invoice' && is_singular( 'wpi_invoice' ) && is_main_query() ) {
92
        ob_start();
93
        do_action( 'wpinv_before_invoice_content', $post->ID );
94
        $content = ob_get_clean() . $content;
95
    }
96
97
    return $content;
98
}
99
add_filter( 'the_content', 'wpinv_before_invoice_content' );
100
101
function wpinv_after_invoice_content( $content ) {
@@ 101-111 (lines=11) @@
98
}
99
add_filter( 'the_content', 'wpinv_before_invoice_content' );
100
101
function wpinv_after_invoice_content( $content ) {
102
    global $post;
103
104
    if ( $post && $post->post_type == 'wpi_invoice' && is_singular( 'wpi_invoice' ) && is_main_query() ) {
105
        ob_start();
106
        do_action( 'wpinv_after_invoice_content', $post->ID );
107
        $content .= ob_get_clean();
108
    }
109
110
    return $content;
111
}
112
add_filter( 'the_content', 'wpinv_after_invoice_content' );
113
114
function wpinv_get_templates_dir() {