mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Add per page option to Screen Options for comments, posts, pages, and media.
git-svn-id: https://develop.svn.wordpress.org/trunk@10847 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -113,7 +113,31 @@ columns = {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){columns.init();});
|
||||
|
||||
screenOptions = {
|
||||
init : function() {
|
||||
$('.screen-option').change(function() {
|
||||
var option = $(this).map(function() { return this.id; }).get();
|
||||
var value = $(this).val();
|
||||
screenOptions.save_screen_option(option, value);
|
||||
});
|
||||
},
|
||||
|
||||
save_screen_option : function (option, value) {
|
||||
$.post(ajaxurl, {
|
||||
action: 'set-screen-option',
|
||||
option: option,
|
||||
value: value,
|
||||
screenoptionnonce: $('#screenoptionnonce').val(),
|
||||
page: pagenow
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){screenOptions.init();});
|
||||
|
||||
})(jQuery);
|
||||
|
||||
// stub for doing better warnings
|
||||
|
||||
Reference in New Issue
Block a user