Change link to other post to shortlink in the editor

The links in that dialog are made by wp_ajax_wp_link_ajax() (see wp-admin/includes/ajax-actions.php, there is no page on Codex or queryposts.com for that function). To change the links filter ‘page_link’, ‘post_type_link’, ‘post_link’ and maybe ‘attachment_link’ after check_ajax_referer() was called for the action ‘internal-linking’. Okay, sounds a little bit complicated, but it is really easy. 🙂 Plugin on … Read more

Shortlink directly to a media file?

It turns out this is easily solved by creating a file attachment.php and redirecting to the file itself. Create an attachment.php file in your WordPress theme folder Put this code in the file <?php wp_redirect(wp_get_attachment_url(), 301); ?> Upload it and there you go This link explains in full.

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