__( 'All Snippets', 'code-snippets' ) ], code_snippets()->get_types() ); $current_type = isset( $_GET['type'] ) ? sanitize_text_field( wp_unslash( $_GET['type'] ) ) : 'all'; $current_type = isset( $types[ $current_type ] ) ? $current_type : 'all'; ?>

page_title_actions( code_snippets()->is_compact_menu() ? [ 'add', 'import', 'settings' ] : [ 'add', 'import' ] ); $this->list_table->search_notice(); ?>

print_messages(); ?> get_type_description( $current_type ); if ( $desc ) { echo '

', esc_html( $desc ); $type_names = [ 'php' => __( 'function snippets', 'code-snippets' ), 'html' => __( 'content snippets', 'code-snippets' ), 'css' => __( 'style snippets', 'code-snippets' ), 'js' => __( 'javascript snippets', 'code-snippets' ), ]; /* translators: %s: snippet type name */ $learn_more_text = sprintf( __( 'Learn more about %s →', 'code-snippets' ), $type_names[ $current_type ] ); printf( ' %s

', esc_url( "https://codesnippets.pro/learn-$current_type/" ), esc_html( $learn_more_text ) ); } ?> list_table->views(); ?>
list_table->required_form_fields( 'search_box' ); $this->list_table->search_box( __( 'Search Snippets', 'code-snippets' ), 'search_id' ); ?>
list_table->required_form_fields(); $this->list_table->display(); ?>