updated plugin Simple Local Avatars
version 2.7.11
This commit is contained in:
@ -1476,6 +1476,7 @@ class Simple_Local_Avatars {
|
||||
?>
|
||||
<input type="hidden" name="simple-local-avatar-file-id" id="simple-local-avatar-file-id" value="<?php echo ! empty( $default_avatar_file_id ) ? esc_attr( $default_avatar_file_id ) : ''; ?>"/>
|
||||
<input type="hidden" name="simple-local-avatar-file-url" id="simple-local-avatar-file-url" value="<?php echo ! empty( $default_avatar_file_url ) ? esc_url( $default_avatar_file_url ) : ''; ?>"/>
|
||||
<?php wp_nonce_field( 'simple_local_avatar_default', 'simple-local-avatar-file-wpnonce' ); ?>
|
||||
<input type="button" name="simple-local-avatar" id="simple-local-avatar-default" class="button-secondary" value="<?php esc_attr_e( 'Choose Default Avatar', 'simple-local-avatar' ); ?>"/>
|
||||
<p class="description" style="margin-left: 23px;"><?php esc_html_e( 'Note that this avatar needs to be publicly available or a broken image will be shown.', 'simple-local-avatar' ); ?></p>
|
||||
<?php
|
||||
@ -1490,6 +1491,11 @@ class Simple_Local_Avatars {
|
||||
private function save_default_avatar_file_id() {
|
||||
global $pagenow;
|
||||
|
||||
// Check if nonce is set.
|
||||
if ( ! isset( $_POST['simple-local-avatar-file-wpnonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['simple-local-avatar-file-wpnonce'] ) ), 'simple_local_avatar_default' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$file_id = filter_input( INPUT_POST, 'simple-local-avatar-file-id', FILTER_SANITIZE_NUMBER_INT );
|
||||
|
||||
// check for uploaded files
|
||||
|
Reference in New Issue
Block a user