Avoid PHP notices in get_sample_permalink() and get_sample_permalink_html(). Remove unused global reference. props ocean90. fixes #25005.

Built from https://develop.svn.wordpress.org/trunk@25028


git-svn-id: http://core.svn.wordpress.org/trunk@25015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2013-08-15 16:25:12 +00:00
parent a872d95778
commit aadd546d48
8 changed files with 37 additions and 22 deletions

View File

@@ -241,10 +241,11 @@ function wp_ajax_logged_in() {
* @return die
*/
function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) {
$total = (int) @$_POST['_total'];
$per_page = (int) @$_POST['_per_page'];
$page = (int) @$_POST['_page'];
$url = esc_url_raw( @$_POST['_url'] );
$total = isset( $_POST['_total'] ) ? (int) $_POST['_total'] : 0;
$per_page = isset( $_POST['_per_page'] ) ? (int) $_POST['_per_page'] : 0;
$page = isset( $_POST['_page'] ) ? (int) $_POST['_page'] : 0;
$url = isset( $_POST['_url'] ) ? esc_url_raw( $_POST['_url'] ) : '';
// JS didn't send us everything we need to know. Just die with success message
if ( !$total || !$per_page || !$page || !$url )
wp_die( time() );