Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsayan committed Aug 9, 2024
1 parent a4ec8ae commit 13f1f61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/Core/Backend/DashboardWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ public function widget_callback() {
public function widget_control_callback() {
// Update widget options
if ( 'POST' === $_SERVER['REQUEST_METHOD'] && isset( $_POST['wplmi_widget_options'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated
check_admin_referer();
check_admin_referer( 'wplmi-dashboard-widget' );
update_option( 'lmt_dashboard_widget_options', array_map( 'intval', $_POST['wplmi_widget_options'] ), false );
}

// Get widget options
$widget_options = get_option( 'lmt_dashboard_widget_options' );
$value = isset( $widget_options['number'] ) ? $widget_options['number'] : '';

wp_nonce_field(); ?>
wp_nonce_field( 'wplmi-dashboard-widget' ); ?>
<table>
<tr>
<td><label for="post-count"><strong><?php esc_html_e( 'Number of Posts to Display', 'wp-last-modified-info' ); ?>:</strong></label></td>
Expand Down

0 comments on commit 13f1f61

Please sign in to comment.