Skip to content

Commit

Permalink
Merge pull request #202 from LezWatch/development
Browse files Browse the repository at this point in the history
Creates an editor only button to refresh cache and recalculate a page.
  • Loading branch information
Ipstenu committed Jan 3, 2024
2 parents 25f9eaa + f81bfa3 commit 497b9e6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions template-parts/content-post_type_shows.php
Expand Up @@ -148,9 +148,9 @@
$havedeadcount = lwtv_plugin()->get_list_characters( $show_id, 'dead' );

// Get the list of characters.
$chars_regular = lwtv_plugin()->get_chars_for_show( $show_id, $havecharcount, 'regular' );
$chars_recurring = lwtv_plugin()->get_chars_for_show( $show_id, $havecharcount, 'recurring' );
$chars_guest = lwtv_plugin()->get_chars_for_show( $show_id, $havecharcount, 'guest' );
$chars_regular = lwtv_plugin()->get_chars_for_show( $show_id, 'regular' );
$chars_recurring = lwtv_plugin()->get_chars_for_show( $show_id, 'recurring' );
$chars_guest = lwtv_plugin()->get_chars_for_show( $show_id, 'guest' );
$chars_total = count( $chars_recurring ) + count( $chars_regular ) + count( $chars_guest );

// If havecharcount and chars_total are different, rerun the call.
Expand Down
4 changes: 4 additions & 0 deletions template-parts/sidebar-post_type_actors.php
Expand Up @@ -19,6 +19,10 @@
<?php get_template_part( 'template-parts/suggestedit', 'form' ); ?>
</section>

<?php
lwtv_plugin()->get_admin_tools( $actor_id );
?>

<section id="join-slack" class="widget widget_joinslack">
<div class="widget-wrap">
<div class="card card-slack">
Expand Down
4 changes: 4 additions & 0 deletions template-parts/sidebar-post_type_characters.php
Expand Up @@ -19,6 +19,10 @@
<?php get_template_part( 'template-parts/suggestedit', 'form' ); ?>
</section>

<?php
lwtv_plugin()->get_admin_tools( $char_id );
?>

<section id="join-slack" class="widget widget_joinslack">
<div class="widget-wrap">
<div class="card card-slack">
Expand Down
5 changes: 5 additions & 0 deletions template-parts/sidebar-post_type_shows.php
Expand Up @@ -13,6 +13,7 @@
$quality = ( get_post_meta( $show_id, 'lezshows_quality_rating', true ) && is_numeric( (int) get_post_meta( $show_id, 'lezshows_quality_rating', true ) ) ) ? min( (int) get_post_meta( $show_id, 'lezshows_quality_rating', true ), 5 ) : 0;
$screentime = ( get_post_meta( $show_id, 'lezshows_screentime_rating', true ) && is_numeric( (int) get_post_meta( $show_id, 'lezshows_screentime_rating', true ) ) ) ? min( (int) get_post_meta( $show_id, 'lezshows_screentime_rating', true ), 5 ) : 0;
$alt_names = ( get_post_meta( $show_id, 'lezshows_show_names', true ) ) ? get_post_meta( $show_id, 'lezshows_show_names', true ) : false;

?>

<section id="search" class="widget widget_search">
Expand All @@ -23,6 +24,10 @@
<?php get_template_part( 'template-parts/suggestedit', 'form' ); ?>
</section>

<?php
lwtv_plugin()->get_admin_tools( $show_id );
?>

<section id="ratings" class="widget widget_text">
<div class="card">
<div class="card-header">
Expand Down

0 comments on commit 497b9e6

Please sign in to comment.