-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from kimcoleman/settings-page-ui
Settings UI improvements; fixing text domain; fixing JS error
- Loading branch information
Showing
6 changed files
with
115 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
jQuery( document ).ready( function( $ ) { | ||
// Make an AJAX call to the pmprolpv_get_restriction_js action. | ||
$.ajax( { | ||
url: pmprolpv.ajaxurl + '?action=pmprolpv_get_restriction_js', | ||
type: 'POST', | ||
data: { | ||
url: window.location.href | ||
}, | ||
success: function( response ) { | ||
// If the response is not empty, eval it. | ||
$.ajax( { | ||
url: pmprolpv.ajaxurl + '?action=pmprolpv_get_restriction_js', | ||
type: 'POST', | ||
data: { | ||
url: window.location.href | ||
}, | ||
success: function( response ) { | ||
// If the response is not empty, eval it. | ||
console.log(response); | ||
if ( response.success ) { | ||
eval( response.data ); | ||
} | ||
} | ||
} ); | ||
} ); | ||
if (response.success) { | ||
// Wrap the response data in a function to avoid illegal return statement | ||
var wrappedCode = '(function() {' + response.data + '})();'; | ||
eval(wrappedCode); | ||
} | ||
} | ||
} ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters