Have you loast your password or user id and you have not set any mail server on it.
Step 1:
Have you loast your password or user id and you have not set any mail server on it.
First you have to change values in php.ini file as per your requirements.
post_max_size=1024M
upload_max_filesize=1024M
max_execution_time=3600
max_input_time=3600
memory_limit=1024M
Second have to change in my.ini file
max_allowed_packet=1024M
Then resart xampp
var formData = new FormData();
formData.append('section', 'general');
formData.append('action', 'docxtohtmlcontent');
formData.append('image', jQuery('#docx_file')[0].files[0]);
$.ajax({
type: 'POST',
url: "<?php echo admin_url('admin-ajax.php'); ?>",
data: formData,
cache: false,
contentType: false,
processData: false,
success: function(data) {
console.log(data);
}
});
Below code in where you need ajax data
jQuery(document).ready(function() {
jQuery.ajax({
type: 'POST',
url: "<?php echo admin_url('admin-ajax.php'); ?>",
data: {
"action": "change_store_ajax_callback_function",
},
success: function(data) {
jQuery('#copy_content_loading_image').hide();
console.log(data);
}
});
});
Below code in functions.php
add_action('wp_ajax_change_store_ajax_callback_function', 'change_store_ajax_callback_function');
add_action('wp_ajax_nopriv_change_store_ajax_callback_function', 'change_store_ajax_callback_function');
function change_store_ajax_callback_function(){
$a = get_post_status(($_POST['current_value']));
if($a == 'publish'){
wp_update_post(array(
'ID' => $_POST['current_value'],
'post_status' => 'draft'
));
}else{
wp_update_post(array(
'ID' => $_POST['current_value'],
'post_status' => 'publish'
));
}
}