Περιγραφή
Custom URL Replacer scans your post content for anchor tags where the visible text exactly matches the full URL. If the URL is external to your site, it replaces the text with a custom string. Additionally, if the “Open in New Tab” setting is enabled, the plugin forces all external links to open in a new tab by adding target=”_blank” and rel=”noopener noreferrer” automatically. A settings page is provided under the Tools menu so you can customize the replacement text and toggle the new tab option.
Εγκατάσταση
- Upload the plugin files to the
/wp-content/plugins/custom-url-replacerdirectory, or install the plugin through the WordPress plugins screen by uploading the ZIP file. - Activate the plugin through the ‘Plugins’ screen in WordPress.
- Configure the plugin settings by navigating to Tools Custom URL Replacer.
- The plugin will automatically process your post content and update anchor texts that exactly match external URLs, and optionally update all external links to open in a new tab.
Συχνές Ερωτήσεις
-
How does Custom URL Replacer work?
-
It scans post content for anchor tags. If an anchor’s text exactly matches its href (and that URL is external), the plugin replaces the text with a custom string. When the “Open in New Tab” option is enabled, all external links will have target=”_blank” and rel=”noopener noreferrer” added automatically if not already set.
-
How can I change the replacement text?
-
Go to Tools Custom URL Replacer in your WordPress admin area and update the “Replacement Text” field.
-
Can I force all external links to open in a new tab?
-
Yes. When the “Open in New Tab” option is enabled, all external links in your post content will be modified to include target=”_blank” and rel=”noopener noreferrer”.
Κριτικές
Δεν υπάρχουν αξιολογήσεις για αυτό το πρόσθετο.
Συνεισφέροντες & Προγραμματιστές
“Custom URL Replacer” είναι λογισμικό ανοιχτού κώδικα. Οι παρακάτω έχουν συνεισφέρει στη δημιουργία του.
ΣυντελεστέςΜεταφράστε το “Custom URL Replacer” στην γλώσσα σας.
Ενδιαφέρεστε για την ανάπτυξη;
Περιηγηθείτε στον κώδικα, ανατρέξτε στο αποθετήριο SVN ή εγγραφείτε στο αρχείο καταγραφής αλλαγών ανάπτυξης μέσω RSS .
Σύνοψη αλλαγών
1.0.1
- Added a sanitization callback for register_setting() to ensure all settings are properly sanitized.
- Replaced parse_url() with wp_parse_url() for better compatibility.
- Updated functions, options, and admin page elements to use the unique prefix “currep_”.
- Improved nonce verification and data sanitization.
- Added functionality to force all external links to open in a new tab when the setting is enabled.
- General code improvements for enhanced security and compatibility.


