Skip to content

Commit

Permalink
MetaBox - if recirculation is disabled globally, hide the this option…
Browse files Browse the repository at this point in the history
… in the metabox
  • Loading branch information
ramiy committed Sep 24, 2017
1 parent 7ba35f4 commit ea43489
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion inc/class-spotim-metabox.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,12 @@ public function render_metabox( $post ) {
echo ' </td>';
echo ' </tr>';

echo ' <tr>';
// Check if recirculation is disabled globally
$hide_recirculation = '';
if ( 'none' === self::$options->get( 'rc_embed_method' ) )
$hide_recirculation = 'style="display: none;"';

echo ' <tr ' . $hide_recirculation . '>';
echo ' <th><label for="spotim_display_recirculation" class="spotim_display_recirculation_label">' . esc_html__( 'Recirculation', 'spotim-comments' ) . '</label></th>';
echo ' <td>';
echo ' <select id="spotim_display_recirculation" name="spotim_display_recirculation" class="spotim_display_recirculation_field">';
Expand Down

0 comments on commit ea43489

Please sign in to comment.