我有自己的类,它扩展了WP\\u List\\u Table类,一切都很好,但批量操作有一些问题。他们的表现很好(删除表中的行、更改项目状态等),但重新加载时会出现以下错误和注意事项:
Notice: Undefined offset: 0 in /home/www/interier-ricany.cz/www/bonus.interier-ricany.cz/wp-includes/functions.php on line 773
Notice: Undefined offset: 0 in /home/www/interier-ricany.cz/www/bonus.interier-ricany.cz/wp-includes/functions.php on line 813
Notice: Undefined offset: 0 in /home/www/interier-ricany.cz/www/bonus.interier-ricany.cz/wp-includes/functions.php on line 818
Notice: Undefined offset: 1 in /home/www/interier-ricany.cz/www/bonus.interier-ricany.cz/wp-includes/functions.php on line 818
Warning: Cannot modify header information - headers already sent by (output started at /home/www/interier-ricany.cz/www/bonus.interier-ricany.cz/wp-includes/formatting.php:5081) in /home/www/interier-ricany.cz/www/bonus.interier-ricany.cz/wp-includes/pluggable.php on line 1179
我发现这和
$args
在page中,我试图找出重定向的错误,但没有找到任何结果:
public function process_bulk_action() {
//Detect when a bulk action is being triggered...
if ( \'delete\' === $this->current_action() ) {
// In our file that handles the request, verify the nonce.
$nonce = esc_attr( $_REQUEST[\'_wpnonce\'] );
if ( ! wp_verify_nonce( $nonce, \'sp_smazat_objednavku\' ) ) {
die( \'Go get a life script kiddies\' );
}
else {
self::smazat_objednavku( absint( $_GET[\'customer\'] ) );
// esc_url_raw() is used to prevent converting ampersand in url to "#038;"
// add_query_arg() return the current url$
wp_redirect( esc_url_raw(add_query_arg()) );
exit;
}
}
//[...]
}
你能看到什么吗?如果需要,完整代码在此处:
https://pastebin.com/D5mprA9x