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/clone/wp-conte.../plugins/wp-bulk-.../includes
File: delele-meta-form-functions.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Form Process
[2] Fix | Delete
*
[3] Fix | Delete
* @package WP_Bulk_Delete
[4] Fix | Delete
* @subpackage Form Process
[5] Fix | Delete
* @copyright Copyright (c) 2016, Dharmesh Patel
[6] Fix | Delete
* @since 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
// postmeta
[14] Fix | Delete
add_action( 'render_postmeta_form', 'wpdb_render_meta_form_posttype', 10 );
[15] Fix | Delete
add_action( 'render_postmeta_form', 'wpdb_render_meta_form_postdropdown', 10 );
[16] Fix | Delete
add_action( 'render_postmeta_form', 'wpbd_render_meta_fields', 10 );
[17] Fix | Delete
add_action( 'render_postmeta_form', 'wpbd_render_meta_date_interval', 10 );
[18] Fix | Delete
[19] Fix | Delete
// commentmeta
[20] Fix | Delete
add_action( 'render_commentmeta_form', 'wpbd_render_meta_fields', 10 );
[21] Fix | Delete
add_action( 'render_commentmeta_form', 'wpbd_render_meta_date_interval', 10 );
[22] Fix | Delete
[23] Fix | Delete
// usermeta
[24] Fix | Delete
add_action( 'render_usermeta_form', 'wpbd_render_meta_userroles', 10 );
[25] Fix | Delete
add_action( 'render_usermeta_form', 'wpbd_render_meta_fields', 10 );
[26] Fix | Delete
add_action( 'render_usermeta_form', 'wpbd_render_meta_date_interval', 10 );
[27] Fix | Delete
[28] Fix | Delete
/**
[29] Fix | Delete
* Process Delete meta form
[30] Fix | Delete
*
[31] Fix | Delete
*
[32] Fix | Delete
* @since 1.0
[33] Fix | Delete
* @param array $data meta form data.
[34] Fix | Delete
* @return array | with status and message.
[35] Fix | Delete
*/
[36] Fix | Delete
function wpbd_delete_meta_form_process( $data ) {
[37] Fix | Delete
$error = $meta_results = array();
[38] Fix | Delete
$meta_count = 0;
[39] Fix | Delete
[40] Fix | Delete
if ( ! current_user_can( 'manage_options' ) ) {
[41] Fix | Delete
$error[] = esc_html__('You don\'t have enough permission for this operation.', 'wp-bulk-delete' );
[42] Fix | Delete
}
[43] Fix | Delete
[44] Fix | Delete
if ( isset( $data['_delete_meta_wpnonce'] ) && wp_verify_nonce( $data['_delete_meta_wpnonce'], 'delete_meta_nonce' ) ) {
[45] Fix | Delete
[46] Fix | Delete
if( empty( $error ) ){
[47] Fix | Delete
$delete_time = ( $data['delete_time'] ) ? $data['delete_time'] : 'now';
[48] Fix | Delete
$delete_datetime = ( $data['delete_datetime'] ) ? $data['delete_datetime'] : '';
[49] Fix | Delete
if( $delete_time === 'scheduled' && !empty($delete_datetime) && wpbd_is_pro() ) {
[50] Fix | Delete
$data['delete_entity'] = $data['meta_type'];
[51] Fix | Delete
return wpbd_save_scheduled_delete($data);
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
// Get meta_results for delete based on user input.
[55] Fix | Delete
if( 'postmeta' == $data['meta_type'] ) {
[56] Fix | Delete
$meta_results = wpbulkdelete()->api->get_delete_postmeta_ids( $data );
[57] Fix | Delete
[58] Fix | Delete
} elseif('usermeta' == $data['meta_type'] ) {
[59] Fix | Delete
$meta_results = wpbulkdelete()->api->get_delete_usermeta_ids( $data );
[60] Fix | Delete
[61] Fix | Delete
} elseif('commentmeta' == $data['meta_type'] ) {
[62] Fix | Delete
$meta_results = wpbulkdelete()->api->get_delete_commentmeta_ids( $data );
[63] Fix | Delete
}
[64] Fix | Delete
[65] Fix | Delete
if ( ! empty( $meta_results ) && count( $meta_results ) > 0 ) {
[66] Fix | Delete
[67] Fix | Delete
if( 'postmeta' == $data['meta_type'] ) {
[68] Fix | Delete
$meta_count = wpbulkdelete()->api->do_delete_postmetas( $meta_results );
[69] Fix | Delete
[70] Fix | Delete
} elseif('usermeta' == $data['meta_type'] ) {
[71] Fix | Delete
$meta_count = wpbulkdelete()->api->do_delete_usermetas( $meta_results );
[72] Fix | Delete
[73] Fix | Delete
} elseif('commentmeta' == $data['meta_type'] ) {
[74] Fix | Delete
$meta_count = wpbulkdelete()->api->do_delete_commentmetas( $meta_results );
[75] Fix | Delete
[76] Fix | Delete
}
[77] Fix | Delete
[78] Fix | Delete
return array(
[79] Fix | Delete
'status' => 1,
[80] Fix | Delete
'messages' => array( sprintf( esc_html__( '%d Meta deleted successfully.', 'wp-bulk-delete' ), $meta_count)
[81] Fix | Delete
) );
[82] Fix | Delete
} else {
[83] Fix | Delete
return array(
[84] Fix | Delete
'status' => 1,
[85] Fix | Delete
'messages' => array( esc_html__( 'Nothing to delete!!', 'wp-bulk-delete' ) ),
[86] Fix | Delete
);
[87] Fix | Delete
}
[88] Fix | Delete
[89] Fix | Delete
} else {
[90] Fix | Delete
return array(
[91] Fix | Delete
'status' => 0,
[92] Fix | Delete
'messages' => $error,
[93] Fix | Delete
);
[94] Fix | Delete
}
[95] Fix | Delete
[96] Fix | Delete
} else {
[97] Fix | Delete
wp_die( esc_html__( 'Sorry, Your nonce did not verify.', 'wp-bulk-delete' ) );
[98] Fix | Delete
}
[99] Fix | Delete
}
[100] Fix | Delete
[101] Fix | Delete
/**
[102] Fix | Delete
* Render meta cleanup options
[103] Fix | Delete
*
[104] Fix | Delete
* @since 1.1.0
[105] Fix | Delete
* @return void
[106] Fix | Delete
*/
[107] Fix | Delete
function wpbd_render_meta_cleanup(){
[108] Fix | Delete
// Counts
[109] Fix | Delete
$orphan_postmeta_count = wpbulkdelete()->api->get_post_count('orphan_postmeta');
[110] Fix | Delete
$duplicated_postmeta_count = wpbulkdelete()->api->get_post_count('duplicated_postmeta');
[111] Fix | Delete
$orphan_commentmeta_count = wpbulkdelete()->api->get_post_count('orphan_commentmeta');
[112] Fix | Delete
$duplicated_commentmeta_count = wpbulkdelete()->api->get_post_count('duplicated_commentmeta');
[113] Fix | Delete
$orphan_usermeta_count = wpbulkdelete()->api->get_post_count('orphan_usermeta');
[114] Fix | Delete
$duplicated_usermeta_count = wpbulkdelete()->api->get_post_count('duplicated_usermeta');
[115] Fix | Delete
$orphan_termmeta_count = wpbulkdelete()->api->get_post_count('orphan_termmeta');
[116] Fix | Delete
$duplicated_termmeta_count = wpbulkdelete()->api->get_post_count('duplicated_termmeta');
[117] Fix | Delete
?>
[118] Fix | Delete
<tr>
[119] Fix | Delete
<th scope="row">
[120] Fix | Delete
<?php _e('Cleanup Meta:','wp-bulk-delete'); ?>
[121] Fix | Delete
</th>
[122] Fix | Delete
<td>
[123] Fix | Delete
<fieldset>
[124] Fix | Delete
<input name="cleanup_post_type[]" class="cleanup_post_type" id="cleanup_orphan_postmeta" type="checkbox" value="orphan_postmeta" >
[125] Fix | Delete
<label for="cleanup_orphan_postmeta">
[126] Fix | Delete
<?php printf( __( 'Orphaned Post Meta (%d Post Meta)', 'wp-bulk-delete' ), $orphan_postmeta_count ); ?>
[127] Fix | Delete
</label>
[128] Fix | Delete
</fieldset>
[129] Fix | Delete
[130] Fix | Delete
<fieldset>
[131] Fix | Delete
<input name="cleanup_post_type[]" class="cleanup_post_type" id="cleanup_duplicated_postmeta" type="checkbox" value="duplicated_postmeta" >
[132] Fix | Delete
<label for="cleanup_duplicated_postmeta">
[133] Fix | Delete
<?php printf( __( 'Duplicated Post Meta (%d Post Meta)', 'wp-bulk-delete' ), $duplicated_postmeta_count ); ?>
[134] Fix | Delete
</label>
[135] Fix | Delete
</fieldset>
[136] Fix | Delete
[137] Fix | Delete
<fieldset>
[138] Fix | Delete
<input name="cleanup_post_type[]" class="cleanup_post_type" id="cleanup_orphan_commentmeta" type="checkbox" value="orphan_commentmeta" >
[139] Fix | Delete
<label for="cleanup_orphan_commentmeta">
[140] Fix | Delete
<?php printf( __( 'Orphaned Comment Meta (%d Comment Meta)', 'wp-bulk-delete' ), $orphan_commentmeta_count ); ?>
[141] Fix | Delete
</label>
[142] Fix | Delete
</fieldset>
[143] Fix | Delete
[144] Fix | Delete
<fieldset>
[145] Fix | Delete
<input name="cleanup_post_type[]" class="cleanup_post_type" id="cleanup_duplicated_commentmeta" type="checkbox" value="duplicated_commentmeta" >
[146] Fix | Delete
<label for="cleanup_duplicated_commentmeta">
[147] Fix | Delete
<?php printf( __( 'Duplicated Comment Meta (%d Comment Meta)', 'wp-bulk-delete' ), $duplicated_commentmeta_count ); ?>
[148] Fix | Delete
</label>
[149] Fix | Delete
</fieldset>
[150] Fix | Delete
[151] Fix | Delete
<fieldset>
[152] Fix | Delete
<input name="cleanup_post_type[]" class="cleanup_post_type" id="cleanup_orphan_usermeta" type="checkbox" value="orphan_usermeta" >
[153] Fix | Delete
<label for="cleanup_orphan_usermeta">
[154] Fix | Delete
<?php printf( __( 'Orphaned User Meta (%d User Meta)', 'wp-bulk-delete' ), $orphan_usermeta_count ); ?>
[155] Fix | Delete
</label>
[156] Fix | Delete
</fieldset>
[157] Fix | Delete
[158] Fix | Delete
<fieldset>
[159] Fix | Delete
<input name="cleanup_post_type[]" class="cleanup_post_type" id="cleanup_duplicated_usermeta" type="checkbox" value="duplicated_usermeta" >
[160] Fix | Delete
<label for="cleanup_duplicated_usermeta">
[161] Fix | Delete
<?php printf( __( 'Duplicated User Meta (%d User Meta)', 'wp-bulk-delete' ), $duplicated_usermeta_count ); ?>
[162] Fix | Delete
</label>
[163] Fix | Delete
</fieldset>
[164] Fix | Delete
[165] Fix | Delete
<fieldset>
[166] Fix | Delete
<input name="cleanup_post_type[]" class="cleanup_post_type" id="cleanup_orphan_termmeta" type="checkbox" value="orphan_termmeta" >
[167] Fix | Delete
<label for="cleanup_orphan_termmeta">
[168] Fix | Delete
<?php printf( __( 'Orphaned Term Meta (%d Term Meta)', 'wp-bulk-delete' ), $orphan_commentmeta_count ); ?>
[169] Fix | Delete
</label>
[170] Fix | Delete
</fieldset>
[171] Fix | Delete
[172] Fix | Delete
<fieldset>
[173] Fix | Delete
<input name="cleanup_post_type[]" class="cleanup_post_type" id="cleanup_duplicated_termmeta" type="checkbox" value="duplicated_termmeta" >
[174] Fix | Delete
<label for="cleanup_duplicated_termmeta">
[175] Fix | Delete
<?php printf( __( 'Duplicated Term Meta (%d Term Meta)', 'wp-bulk-delete' ), $duplicated_termmeta_count ); ?>
[176] Fix | Delete
</label>
[177] Fix | Delete
</fieldset>
[178] Fix | Delete
[179] Fix | Delete
</td>
[180] Fix | Delete
</tr>
[181] Fix | Delete
<?php
[182] Fix | Delete
}
[183] Fix | Delete
[184] Fix | Delete
/**
[185] Fix | Delete
* Render post meta post options
[186] Fix | Delete
*
[187] Fix | Delete
* @since 1.1.0
[188] Fix | Delete
* @return void
[189] Fix | Delete
*/
[190] Fix | Delete
function wpdb_render_meta_form_posttype(){
[191] Fix | Delete
global $wp_post_types;
[192] Fix | Delete
$ingnore_types = array('attachment','revision','nav_menu_item');
[193] Fix | Delete
$types = array();
[194] Fix | Delete
if( !empty( $wp_post_types ) ){
[195] Fix | Delete
foreach( $wp_post_types as $key_type => $post_type ){
[196] Fix | Delete
if( in_array( $key_type, $ingnore_types ) ){
[197] Fix | Delete
continue;
[198] Fix | Delete
}else{
[199] Fix | Delete
$types[$key_type] = $post_type->labels->name;
[200] Fix | Delete
}
[201] Fix | Delete
}
[202] Fix | Delete
}
[203] Fix | Delete
?>
[204] Fix | Delete
<tr>
[205] Fix | Delete
<th scope="row">
[206] Fix | Delete
<?php _e('Post type:','wp-bulk-delete'); ?>
[207] Fix | Delete
</th>
[208] Fix | Delete
<td>
[209] Fix | Delete
<select name="meta_post_type" class="meta_post_type" id="meta_post_type" required="required">
[210] Fix | Delete
<?php
[211] Fix | Delete
if( !empty( $types ) ){
[212] Fix | Delete
foreach( $types as $key_type => $type ){
[213] Fix | Delete
?>
[214] Fix | Delete
<fieldset>
[215] Fix | Delete
<label for="meta_post_type">
[216] Fix | Delete
<option value="<?php echo $key_type; ?>">
[217] Fix | Delete
<?php printf( __( '%s', 'wp-bulk-delete' ), $type ); ?>
[218] Fix | Delete
</option>
[219] Fix | Delete
</label>
[220] Fix | Delete
</fieldset>
[221] Fix | Delete
<?php
[222] Fix | Delete
}
[223] Fix | Delete
}else{
[224] Fix | Delete
_e('No post types are there, WP Bulk Delete will not work.','wp-bulk-delete');
[225] Fix | Delete
}
[226] Fix | Delete
?>
[227] Fix | Delete
</select>
[228] Fix | Delete
<p class="description">
[229] Fix | Delete
<?php esc_html_e('Select the post type whose post meta fields you want to delete.','wp-bulk-delete'); ?>
[230] Fix | Delete
</p>
[231] Fix | Delete
</td>
[232] Fix | Delete
</tr>
[233] Fix | Delete
<?php
[234] Fix | Delete
}
[235] Fix | Delete
[236] Fix | Delete
[237] Fix | Delete
/**
[238] Fix | Delete
* Render meta Fields.
[239] Fix | Delete
*
[240] Fix | Delete
* @since 1.1.0
[241] Fix | Delete
* @return void
[242] Fix | Delete
*/
[243] Fix | Delete
function wpbd_render_meta_fields(){
[244] Fix | Delete
?>
[245] Fix | Delete
<tr>
[246] Fix | Delete
<th scope="row">
[247] Fix | Delete
<?php _e('Meta fields','wp-bulk-delete'); ?> :
[248] Fix | Delete
</th>
[249] Fix | Delete
<td>
[250] Fix | Delete
<?php esc_html_e( 'Meta key', 'wp-bulk-delete' ); ?>
[251] Fix | Delete
<input type="text" id="custom_field_key" name="custom_field_key" class="custom_field_key" placeholder="<?php esc_html_e( 'Meta key (Required)', 'wp-bulk-delete' ); ?>" required="required" />
[252] Fix | Delete
<select name="custom_field_compare">
[253] Fix | Delete
<option value="equal_to_str"><?php esc_html_e( 'equal to ( string )', 'wp-bulk-delete' ); ?></option>
[254] Fix | Delete
<option value="notequal_to_str"><?php esc_html_e( 'not equal to ( string )', 'wp-bulk-delete' ); ?></option>
[255] Fix | Delete
<option value="like_str"><?php esc_html_e( 'like ( string )', 'wp-bulk-delete' ); ?></option>
[256] Fix | Delete
<option value="notlike_str"><?php esc_html_e( 'not like ( string )', 'wp-bulk-delete' ); ?></option><option value="equal_to_date"><?php esc_html_e( 'equal to ( date )', 'wp-bulk-delete' ); ?></option>
[257] Fix | Delete
<option value="notequal_to_date"><?php esc_html_e( 'not equal to ( date )', 'wp-bulk-delete' ); ?></option>
[258] Fix | Delete
<option value="lessthen_date"><?php esc_html_e( 'less than ( date )', 'wp-bulk-delete' ); ?></option>
[259] Fix | Delete
<option value="lessthenequal_date"><?php esc_html_e( 'less than and equal to ( date )', 'wp-bulk-delete' ); ?></option>
[260] Fix | Delete
<option value="greaterthen_date"><?php esc_html_e( 'greater than ( date )', 'wp-bulk-delete' ); ?></option>
[261] Fix | Delete
<option value="greaterthenequal_date"><?php esc_html_e( 'greater than and equal to ( date )', 'wp-bulk-delete' ); ?></option>
[262] Fix | Delete
<option value="equal_to_number"><?php esc_html_e( 'equal to ( number )', 'wp-bulk-delete' ); ?></option>
[263] Fix | Delete
<option value="notequal_to_number"><?php esc_html_e( 'not equal to ( number )', 'wp-bulk-delete' ); ?></option>
[264] Fix | Delete
<option value="lessthen_number"><?php esc_html_e( 'less than ( number )', 'wp-bulk-delete' ); ?></option>
[265] Fix | Delete
<option value="lessthenequal_number"><?php esc_html_e( 'less than and equal to ( number )', 'wp-bulk-delete' ); ?></option>
[266] Fix | Delete
<option value="greaterthen_number"><?php esc_html_e( 'greater than ( number )', 'wp-bulk-delete' ); ?></option>
[267] Fix | Delete
<option value="greaterthenequal_number"><?php esc_html_e( 'greater than and equal to ( number )', 'wp-bulk-delete' ); ?></option>
[268] Fix | Delete
</select>
[269] Fix | Delete
<?php esc_html_e( 'Value', 'wp-bulk-delete' ); ?>
[270] Fix | Delete
<input type="text" id="custom_field_value" name="custom_field_value" class="custom_field_value" placeholder="<?php esc_html_e( 'Meta value (Optional)', 'wp-bulk-delete' ); ?>" />
[271] Fix | Delete
<p class="description">
[272] Fix | Delete
<?php esc_html_e('Enter the meta key for delete meta, please consider following points into meta delete.','wp-bulk-delete'); ?><br>
[273] Fix | Delete
<?php esc_html_e('1. If you want to delete meta by meta key only enter meta key.','wp-bulk-delete'); ?><br>
[274] Fix | Delete
<?php esc_html_e('2. If you want to delete meta by meta key and meta value than enter both values.','wp-bulk-delete'); ?><br>
[275] Fix | Delete
</p>
[276] Fix | Delete
</td>
[277] Fix | Delete
</tr>
[278] Fix | Delete
<?php
[279] Fix | Delete
}
[280] Fix | Delete
[281] Fix | Delete
[282] Fix | Delete
/**
[283] Fix | Delete
* Render Postmeta Date intervals.
[284] Fix | Delete
*
[285] Fix | Delete
* @since 1.0
[286] Fix | Delete
* @return void
[287] Fix | Delete
*/
[288] Fix | Delete
function wpbd_render_meta_date_interval(){
[289] Fix | Delete
?>
[290] Fix | Delete
<tr>
[291] Fix | Delete
<th scope="row">
[292] Fix | Delete
<?php _e('Date interval :','wp-bulk-delete'); ?>
[293] Fix | Delete
</th>
[294] Fix | Delete
<td>
[295] Fix | Delete
<?php _e('Delete meta for posts/comments/users which are','wp-bulk-delete'); ?>
[296] Fix | Delete
<select name="date_type" class="date_type">
[297] Fix | Delete
<option value="older_than"><?php _e('older than','wp-bulk-delete'); ?></option>
[298] Fix | Delete
<option value="within_last"><?php _e('created within last','wp-bulk-delete'); ?></option>
[299] Fix | Delete
<?php if( wpbd_is_pro() ) { ?>
[300] Fix | Delete
<option value="onemonth"><?php _e('1 Month','wp-bulk-delete'); ?></option>
[301] Fix | Delete
<option value="sixmonths"><?php _e('6 Months','wp-bulk-delete'); ?></option>
[302] Fix | Delete
<option value="oneyear"><?php _e('1 Year','wp-bulk-delete'); ?></option>
[303] Fix | Delete
<option value="twoyear"><?php _e('2 Years','wp-bulk-delete'); ?></option>
[304] Fix | Delete
<?php } ?>
[305] Fix | Delete
<option value="custom_date"><?php _e('created between custom','wp-bulk-delete'); ?></option>
[306] Fix | Delete
</select>
[307] Fix | Delete
<div class="wpbd_date_days wpbd_inline">
[308] Fix | Delete
<input type="number" id="input_days" name="input_days" class="wpbd_input_days" placeholder="0" min="0" /> <?php _e('days','wp-bulk-delete'); ?>
[309] Fix | Delete
</div>
[310] Fix | Delete
<div class="wpbd_custom_interval wpbd_inline" style="display:none;">
[311] Fix | Delete
<input type="text" id="delete_start_date" name="delete_start_date" class="delete_all_datepicker" placeholder="<?php _e('Start Date','wp-bulk-delete'); ?>" />
[312] Fix | Delete
-
[313] Fix | Delete
<input type="text" id="delete_end_date" name="delete_end_date" class="delete_all_datepicker" placeholder="<?php _e('End Date','wp-bulk-delete'); ?>" />
[314] Fix | Delete
<p class="description">
[315] Fix | Delete
<?php _e('Set the date interval for posts/comments/users whose meta fields will be deleted, or leave these fields blank to select all meta. The dates must be specified in the following format: <strong>YYYY-MM-DD</strong>','wp-bulk-delete'); ?>
[316] Fix | Delete
</p>
[317] Fix | Delete
</div>
[318] Fix | Delete
<div class="wpbd_date_range wpbd_inline" style="display:none;">
[319] Fix | Delete
<p class="description">
[320] Fix | Delete
<?php _e('This option will work well with Scheduled Delete, which will help to delete posts/comments/users of the selected option from the scheduled run date.','wp-bulk-delete'); ?>
[321] Fix | Delete
</p>
[322] Fix | Delete
</div>
[323] Fix | Delete
</td>
[324] Fix | Delete
</tr>
[325] Fix | Delete
<?php
[326] Fix | Delete
}
[327] Fix | Delete
[328] Fix | Delete
/**
[329] Fix | Delete
* Render Userroles dropdown.
[330] Fix | Delete
*
[331] Fix | Delete
* @since 1.0
[332] Fix | Delete
* @return void
[333] Fix | Delete
*/
[334] Fix | Delete
function wpbd_render_meta_userroles(){
[335] Fix | Delete
$userroles = count_users();
[336] Fix | Delete
?>
[337] Fix | Delete
<tr>
[338] Fix | Delete
<th scope="row">
[339] Fix | Delete
<?php _e( 'User roles', 'wp-bulk-delete' ); ?> :
[340] Fix | Delete
</th>
[341] Fix | Delete
<td>
[342] Fix | Delete
<?php
[343] Fix | Delete
if( ! empty( $userroles['avail_roles'] ) ){
[344] Fix | Delete
foreach ($userroles['avail_roles'] as $userrole => $count ) {
[345] Fix | Delete
?>
[346] Fix | Delete
<input name="delete_user_roles[]" class="delete_user_roles" id="user_role_<?php echo $userrole; ?>" type="checkbox" value="<?php echo $userrole; ?>" >
[347] Fix | Delete
<label for="user_role_<?php echo $userrole; ?>">
[348] Fix | Delete
<?php echo $userrole . ' ' . sprintf( __( '( %s Users )', 'wp-bulk-delete' ), $count ); ?>
[349] Fix | Delete
</label><br/>
[350] Fix | Delete
<?php
[351] Fix | Delete
}
[352] Fix | Delete
}
[353] Fix | Delete
?>
[354] Fix | Delete
<p class="description">
[355] Fix | Delete
<?php _e('Select the user roles from which you want to delete user meta.','wp-bulk-delete'); ?>
[356] Fix | Delete
</p>
[357] Fix | Delete
</td>
[358] Fix | Delete
</tr>
[359] Fix | Delete
<?php
[360] Fix | Delete
}
[361] Fix | Delete
[362] Fix | Delete
/**
[363] Fix | Delete
* Render post dropdown based on posttype selection.
[364] Fix | Delete
*
[365] Fix | Delete
* @since 1.1
[366] Fix | Delete
* @return void
[367] Fix | Delete
*/
[368] Fix | Delete
function wpdb_render_meta_form_postdropdown(){
[369] Fix | Delete
?>
[370] Fix | Delete
<tr>
[371] Fix | Delete
<th scope="row">
[372] Fix | Delete
<?php _e('Post :','wp-bulk-delete'); ?>
[373] Fix | Delete
</th>
[374] Fix | Delete
<td>
[375] Fix | Delete
<div <?php if(wpbd_is_pro()){ ?>class="postdropdown_space"<?php } ?>>
[376] Fix | Delete
<select name="sample_post_dropdown" disabled="disabled">
[377] Fix | Delete
<option value=""> <?php esc_html_e( 'Select post', 'wp-bulk-delete' ); ?></option>
[378] Fix | Delete
</select>
[379] Fix | Delete
</div>
[380] Fix | Delete
<p class="description">
[381] Fix | Delete
<?php esc_html_e('Select the post whose post meta fields you want to delete.','wp-bulk-delete'); ?>
[382] Fix | Delete
</p>
[383] Fix | Delete
<?php do_action( 'wpbd_display_available_in_pro'); ?>
[384] Fix | Delete
</td>
[385] Fix | Delete
</tr>
[386] Fix | Delete
<script>
[387] Fix | Delete
jQuery(document).ready(function(){
[388] Fix | Delete
jQuery('#meta_post_type').trigger( 'change' );
[389] Fix | Delete
});
[390] Fix | Delete
</script>
[391] Fix | Delete
<?php
[392] Fix | Delete
}
[393] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function