Mô tả
URL Shortener by Melk is a lightweight and efficient WordPress plugin that allows you to automatically generate short URLs for your posts, pages, categories, tags, and Custom Post Types. Ideal for sharing on social media and marketing materials.
Features:
- Automatic Generation: Automatically creates short URLs when publishing new posts.
- Comprehensive Support: Works with Posts, Pages, Categories, Tags, and Custom Post Types.
- Quick Copy: “Copy” button directly in the post/term listing in the admin panel.
- Bulk Generation: Tool to generate short URLs for old content with one click.
- Performance: Fast redirection using native WordPress rewrite rules (no heavy queries).
- Secure: Validated and secure code, following WordPress best practices.
Developer Notes
- Namespace:
Melk\\UrlShortenerByMelk. - Unique prefix: all functions, options, meta keys and hooks use the
urlshbym_prefix, following the WordPress Plugin Handbook recommendations to avoid naming collisions. - Options stored in the database:
urlshbym_enabled_post_typesurlshbym_enabled_taxonomies
- Meta keys:
_urlshbym_short_codeon posts_urlshbym_short_codeon terms (taxonomies)
- Database table:
{$wpdb->prefix}urlshbym_short_urlsis created on activation to store the mapping between short codes and objects. - Main hook:
urlshbym_short_url_clicked— fired whenever a short URL is accessed, receiving the short code and the internal record ID.
- Rewrite rules: short URLs are handled through a rewrite rule that maps patterns like
/abc12toindex.php?urlshbym_short=abc12.
Ảnh màn hình
Cài đặt
- Upload the
url-shortenerfolder to the/wp-content/plugins/directory. - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Go to Settings > URL Shortener to adjust preferences.
Hỏi đáp
-
Does the plugin work with Custom Post Types?
-
Yes! You can enable which post types you want to generate short URLs for in the plugin settings.
-
How are URLs generated?
-
We use a secure Base62 algorithm to create short and unique strings (e.g.,
abc12) based on the post ID.
Đánh giá
Không có đánh giá nào cho plugin này.
Người đóng góp & Lập trình viên
“URL Shortener by Melk” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.
Những người đóng gópDịch “URL Shortener by Melk” sang ngôn ngữ của bạn.
Muốn tham gia phát triển?
Duyệt code, check out SVN repository, hoặc theo dõi nhật ký phát triển qua RSS.
Nhật ký thay đổi
1.0.0
- Initial release.



