Skip to content
Merged
Show file tree
Hide file tree
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
17 changes: 10 additions & 7 deletions classes/helpers/FrmEntriesHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -861,14 +861,17 @@ public static function maybe_render_captcha_score( $entry_id ) {
$metas_without_a_field = (array) FrmEntryMeta::getAll( $query, ' ORDER BY it.created_at DESC', '', true );

foreach ( $metas_without_a_field as $meta ) {
if ( ! empty( $meta->meta_value['captcha_score'] ) ) {
echo '<div class="misc-pub-section">';
FrmAppHelper::icon_by_class( 'frmfont frm_shield_check_icon', array( 'aria-hidden' => 'true' ) );
echo ' ' . esc_html__( 'reCAPTCHA Score', 'formidable' ) . ': ';
echo '<b>' . esc_html( $meta->meta_value['captcha_score'] ) . '</b>';
echo '</div>';
return;
if ( empty( $meta->meta_value['captcha_score'] ) ) {
continue;
}

echo '<div class="misc-pub-section">';
FrmAppHelper::icon_by_class( 'frmfont frm_shield_check_icon', array( 'aria-hidden' => 'true' ) );
echo ' ' . esc_html__( 'reCAPTCHA Score', 'formidable' ) . ': ';
echo '<b>' . esc_html( $meta->meta_value['captcha_score'] ) . '</b>';
echo '</div>';
return;

}
}

Expand Down
31 changes: 17 additions & 14 deletions classes/views/shared/form-nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,24 @@
<?php

foreach ( $nav_items as $nav_item ) {
if ( current_user_can( $nav_item['permission'] ) ) {
?>
<li>
<a href="<?php echo esc_url( $nav_item['link'] ); ?>"
<?php FrmAppHelper::select_current_page( $nav_item['page'], $current_page, $nav_item['current'] ); ?>
<?php
if ( isset( $nav_item['atts'] ) ) {
FrmAppHelper::array_to_html_params( $nav_item['atts'], true );
}
?>>
<?php echo esc_html( $nav_item['label'] ); ?>
</a>
</li>
<?php
if ( ! current_user_can( $nav_item['permission'] ) ) {
continue;
}

?>
<li>
<a href="<?php echo esc_url( $nav_item['link'] ); ?>"
<?php FrmAppHelper::select_current_page( $nav_item['page'], $current_page, $nav_item['current'] ); ?>
<?php
if ( isset( $nav_item['atts'] ) ) {
FrmAppHelper::array_to_html_params( $nav_item['atts'], true );
}
?>>
<?php echo esc_html( $nav_item['label'] ); ?>
</a>
</li>
<?php

}
?>
</ul>
Loading
Loading