Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Fix admin headings #965

Merged
merged 1 commit into from
Jul 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions php/class-coauthors-guest-authors.php
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,7 @@ function view_guest_authors_list() {
$count = $coauthors_plus->get_guest_author_post_count( $guest_author );

echo '<div class="wrap">';
echo '<div class="icon32" id="icon-users"><br/></div>';
echo '<h2>' . esc_html__( 'Delete Guest Authors', 'co-authors-plus' ) . '</h2>';
echo '<h1>' . esc_html__( 'Delete Guest Authors', 'co-authors-plus' ) . '</h1>';
echo '<p>' . esc_html__( 'You have specified this guest author for deletion:', 'co-authors-plus' ) . '</p>';
echo '<p>#' . esc_html( $guest_author->ID . ': ' . $guest_author->display_name ) . '</p>';
// display wording differently per post count
Expand Down Expand Up @@ -555,20 +554,21 @@ function view_guest_authors_list() {
echo '</form>';
echo '</div>';
} else {
echo '<div class="wrap">';
echo '<div class="icon32" id="icon-users"><br/></div>';
echo '<h2>' . esc_html( $this->labels['plural'] );
// @todo caps check for creating a new user
$add_new_link = admin_url( "post-new.php?post_type=$this->post_type" );
echo '<a href="' . esc_url( $add_new_link ) . '" class="add-new-h2">' . esc_html__( 'Add New', 'co-authors-plus' ) . '</a>';
echo '</h2>';
$cap_list_table = new CoAuthors_WP_List_Table();
$cap_list_table->prepare_items();
echo '<form id="guest-authors-filter" action="" method="GET">';
echo '<input type="hidden" name="page" value="view-guest-authors" />';
$cap_list_table->display();
echo '</form>';
echo '</div>';
?>
<div class="wrap">
<h1 class="wp-heading-inline"><?php echo esc_html( get_admin_page_title() ); ?></h1>
<a href="<?php echo esc_url( admin_url( "post-new.php?post_type={$this->post_type}" ) ); ?>" class="page-title-action"><?php echo esc_html__( 'Add New', 'co-authors-plus' ); ?></a>
<form id="guest-authors-filter" action="" method="GET">
<input type="hidden" name="page" value="view-guest-authors" />
<?php
$cap_list_table = new CoAuthors_WP_List_Table();
$cap_list_table->prepare_items();
$cap_list_table->display();
?>
</form>
</div>
<?php
}

}
Expand Down