How to save post change url youtube link?

I think you want to change default video width. You can change default embed video width and height by embed_defaults filter. add_filter(’embed_defaults’, ‘ravs_embed_defaults’); function ravs_embed_defaults($embed_size) { if (is_single()) { // Conditionally set max height and width $embed_size[‘width’] = 640; $embed_size[‘height’] = 600; } else { // Default values $embed_size[‘width’] = 460; $embed_size[‘height’] = 600; } … Read more

How to get updated data when save_post triggers?

I’m going to post this as an answer, because it worked for me: function my_awesome_func ($post_id, $post, $update) { //update the value we need early update_post_meta($post_id, ‘my_meta_key’, $_REQUEST[‘my_meta_key’]); $newValue = get_post_meta($post_id, ‘my_meta_key’); } add_action( ‘save_post_my-custom-post-type’, ‘my_awesome_func’, 10, 3 ); You could also simply use the value of $_REQUEST[‘my_meta_key’] directly if that works, but for my … Read more

save imported posts as drafts

You can hack this plugin code by changing ‘create_draft‘ option ‘no’ to ‘yes’ into plugin.php ‘get_default_import_options‘ method(Approx line no. 1013). I’m not tested this hack, try it your own risk.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)