How to get the Tags on Publish post hook?

Found Solution : If there is no data in the request_body, the we can also fetch it from the postID which is already we have. Changed Code: added condition if data not available, then get it from post id public static function saveDataInNotificationTable($ID,$request_body) { $post_data = json_decode($request_body); $tags = $post_data->tags; if($post_data == “” || $post_data … Read more

Include drafts in internal link dialog

This is very similar to this question. We have to hook into check_ajax_referer to address the internal linking feature only. Then we register an action for pre_get_posts to extend the search to drafts and pending posts. We will still get no pretty permalinks, because they are excluded in get_permalink. So we register a filter for … Read more

Clicking On View Post In Draft Opens New Tab

You can hack by adding below lines in your theme’s functions.php file. function remove_preview_target() { // below JS code will set Preview button’s **target** attribute to **_self**, it means same tab/window. echo “<script> jQuery(document).ready(function(){ jQuery(‘#post-preview’).attr(‘target’, ‘_self’); }) </script>”; } // this action performs in admit footer add_action(‘admin_footer’, ‘remove_preview_target’); Or add below lines in your JS … 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)