WordPress.org

Plugin Directory

Opened 6 months ago

#2641 new enhancement

How to stop getting updates as mentioned below

Reported by: Himanshu Goel Owned by:
Priority: highest Severity: critical
Plugin: not-listed Keywords:
Cc:

Description

I want to GET RID of these kind of updates...


Revision

1706424

Author

takayukister

Date

2017-08-01 15:11:17 +0000 (Tue, 01 Aug 2017)

Log Message

Introduce wpcf7.apiSettings.getRoute() into the admin JS. Same approach as its frontend JS.

Modified Paths

contact-form-7/trunk/admin/admin.php
contact-form-7/trunk/admin/js/scripts.js

Diff
Modified: contact-form-7/trunk/admin/admin.php (1706423 => 1706424)

--- contact-form-7/trunk/admin/admin.php 2017-08-01 15:10:40 UTC (rev 1706423)
+++ contact-form-7/trunk/admin/admin.php 2017-08-01 15:11:17 UTC (rev 1706424)
@@ -301,9 +301,11 @@

$args = array(

'apiSettings' => array(

  • 'root' => esc_url_raw( get_rest_url() ),

+ 'root' => esc_url_raw( rest_url( 'contact-form-7/v1' ) ),
+ 'namespace' => 'contact-form-7/v1',

'nonce' => ( wp_installing() && ! is_multisite() )

  • ? : wp_create_nonce( 'wp_rest' ) ),

+ ? : wp_create_nonce( 'wp_rest' ),
+ ),

'pluginUrl' => wpcf7_plugin_url(),
'saveAlert' => (

"The changes you made will be lost if you navigate away from this page.",

Modified: contact-form-7/trunk/admin/js/scripts.js (1706423 => 1706424)

--- contact-form-7/trunk/admin/js/scripts.js 2017-08-01 15:10:40 UTC (rev 1706423)
+++ contact-form-7/trunk/admin/js/scripts.js 2017-08-01 15:11:17 UTC (rev 1706424)
@@ -77,8 +77,7 @@

$.ajax( {

method: 'POST',

  • url: wpcf7.apiSettings.root +
  • 'contact-form-7/v1/contact-forms/' + postId,

+ url: wpcf7.apiSettings.getRoute( '/contact-forms/' + postId ),

beforeSend: function( xhr ) {

xhr.setRequestHeader( 'X-WP-Nonce', wpcf7.apiSettings.nonce );

},

@@ -275,4 +274,14 @@

} );

};


+ wpcf7.apiSettings.getRoute = function( path ) {
+ var url = wpcf7.apiSettings.root;
+
+ url = url.replace(
+ wpcf7.apiSettings.namespace,
+ wpcf7.apiSettings.namespace + path );
+
+ return url;
+ };
+

} )( jQuery );

Change History (0)

Note: See TracTickets for help on using tickets.