Skip to content

Commit

Permalink
Rename ajax parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
SohamPatel46 committed Feb 22, 2024
1 parent 5470b7f commit 34a4e74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions admin/js/rt-transcoder-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

var data = {
action: 'rt_disable_transcoding',
rt_transcoder_security: rt_transcoder_script.security_nonce_for_disabling_encoding
rt_transcoder_nonce: rt_transcoder_script.security_nonce_for_disabling_encoding
};

if ( $( this ).next( 'img' ).length === 0 ) {
Expand Down Expand Up @@ -86,7 +86,7 @@

var data = {
action: 'rt_enable_transcoding',
rt_transcoder_security: rt_transcoder_script.security_nonce_for_enabling_encoding
rt_transcoder_nonce: rt_transcoder_script.security_nonce_for_enabling_encoding
};

if ( $( this ).next( 'img' ).length === 0 ) {
Expand Down
4 changes: 2 additions & 2 deletions admin/rt-transcoder-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ public function enter_api_key() {
* @since 1.0.0
*/
public function disable_transcoding() {
check_ajax_referer( 'rt_disable_transcoding', 'rt_transcoder_security', true );
check_ajax_referer( 'rt_disable_transcoding', 'rt_transcoder_nonce', true );
update_site_option( 'rt-transcoding-api-key', '' );
esc_html_e( 'Transcoding disabled successfully.', 'transcoder' );
die();
Expand All @@ -1308,7 +1308,7 @@ public function disable_transcoding() {
* @since 1.0.0
*/
public function enable_transcoding() {
check_ajax_referer( 'rt_enable_transcoding', 'rt_transcoder_security', true );
check_ajax_referer( 'rt_enable_transcoding', 'rt_transcoder_nonce', true );
update_site_option( 'rt-transcoding-api-key', $this->stored_api_key );
esc_html_e( 'Transcoding enabled successfully.', 'transcoder' );
die();
Expand Down

0 comments on commit 34a4e74

Please sign in to comment.