Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-bulk-.../includes
File: delele-terms-form-functions.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Delete Terms Form Funcitons
[2] Fix | Delete
*
[3] Fix | Delete
* @package WP_Bulk_Delete
[4] Fix | Delete
* @subpackage Delete Terms Form Funcitons
[5] Fix | Delete
* @copyright Copyright (c) 2016, Dharmesh Patel
[6] Fix | Delete
* @since 1.1.0
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
// Exit if accessed directly
[10] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) exit;
[11] Fix | Delete
[12] Fix | Delete
/** Actions *************************************************************/
[13] Fix | Delete
add_action( 'wpbd_delete_terms_form', 'wpbd_render_form_posttype_dropdown' );
[14] Fix | Delete
add_action( 'wpbd_delete_terms_form', 'wpbd_render_delete_terms_taxonomy' );
[15] Fix | Delete
[16] Fix | Delete
/**
[17] Fix | Delete
* Process Delete Terms form
[18] Fix | Delete
*
[19] Fix | Delete
*
[20] Fix | Delete
* @since 1.1.0
[21] Fix | Delete
* @param array $data Form post Data.
[22] Fix | Delete
* @return array | posts ID to be delete.
[23] Fix | Delete
*/
[24] Fix | Delete
function xt_delete_terms_form_process( $data ) {
[25] Fix | Delete
$error = array();
[26] Fix | Delete
if ( ! current_user_can( 'manage_options' ) ) {
[27] Fix | Delete
$error[] = esc_html__('You don\'t have enough permission for this operation.', 'wp-bulk-delete' );
[28] Fix | Delete
}
[29] Fix | Delete
if( $data['delete_post_type'] == '' || $data['post_taxonomy'] == '' ){
[30] Fix | Delete
$error[] = esc_html__('Please select required fields for proceed delete operation.', 'wp-bulk-delete' );
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
if ( !isset( $data['_delete_terms_wpnonce'] ) || !wp_verify_nonce( $data['_delete_terms_wpnonce'], 'delete_terms_nonce' ) ) {
[34] Fix | Delete
wp_die( esc_html__( 'Sorry, Your nonce did not verify.', 'wp-bulk-delete' ) );
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
if( empty( $error ) ){
[38] Fix | Delete
[39] Fix | Delete
$term_count = wpbulkdelete()->api->do_delete_terms( $data );
[40] Fix | Delete
if( false === $term_count ){
[41] Fix | Delete
return array(
[42] Fix | Delete
'status' => 0,
[43] Fix | Delete
'messages' => array( esc_html__( 'Something went wrong please try again!!', 'wp-bulk-delete' ) ),
[44] Fix | Delete
);
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
if ( ! empty( $term_count ) && $term_count > 0 ) {
[48] Fix | Delete
return array(
[49] Fix | Delete
'status' => 1,
[50] Fix | Delete
'messages' => array( sprintf( esc_html__( '%d Term(s) deleted successfully.', 'wp-bulk-delete' ), $term_count )
[51] Fix | Delete
) );
[52] Fix | Delete
} else {
[53] Fix | Delete
return array(
[54] Fix | Delete
'status' => 1,
[55] Fix | Delete
'messages' => array( esc_html__( 'Nothing to delete!!', 'wp-bulk-delete' ) ),
[56] Fix | Delete
);
[57] Fix | Delete
}
[58] Fix | Delete
[59] Fix | Delete
} else {
[60] Fix | Delete
return array(
[61] Fix | Delete
'status' => 0,
[62] Fix | Delete
'messages' => $error,
[63] Fix | Delete
);
[64] Fix | Delete
}
[65] Fix | Delete
}
[66] Fix | Delete
[67] Fix | Delete
[68] Fix | Delete
/**
[69] Fix | Delete
* Render taxonomies for terms.
[70] Fix | Delete
*
[71] Fix | Delete
* @since 1.0
[72] Fix | Delete
* @return void
[73] Fix | Delete
*/
[74] Fix | Delete
function wpbd_render_delete_terms_taxonomy(){?>
[75] Fix | Delete
<tr>
[76] Fix | Delete
<th scope="row">
[77] Fix | Delete
<?php _e('Post Taxonomy:','wp-bulk-delete'); ?>
[78] Fix | Delete
</th>
[79] Fix | Delete
<td>
[80] Fix | Delete
<div class="post_taxonomy">
[81] Fix | Delete
</div>
[82] Fix | Delete
<p class="description">
[83] Fix | Delete
<?php _e( 'Select the post taxonomy whose terms you want to delete.', 'wp-bulk-delete' ); ?>
[84] Fix | Delete
</p>
[85] Fix | Delete
</td>
[86] Fix | Delete
</tr>
[87] Fix | Delete
<script>
[88] Fix | Delete
jQuery(document).ready(function(){
[89] Fix | Delete
jQuery('#delete_post_type').trigger( 'change' );
[90] Fix | Delete
});
[91] Fix | Delete
</script>
[92] Fix | Delete
<?php
[93] Fix | Delete
}
[94] Fix | Delete
[95] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function