Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /plugins/non-ja-slug/
- + non-ja-slug.php
- + readme.txt
- // non-ja-slug.php
- <?php
- /**
- * @package non-ja-slug
- */
- /*
- /*
- Plugin Name: パーマリンク日本語防止プラグイン
- Plugin URI: http://example.com/
- Description: タイトルに日本語が含まれる場合、スラッグを半角英数のみに自動変換します。
- Version: 1.0
- Author: unknown coder and hcc_dtp
- Author URI: http://example.com/
- License: Unlicense
- Text Domain: non-ja-slug
- */
- add_filter('sanitize_title','sanitize_title_numalpha_only',9);
- function sanitize_title_numalpha_only($title) {
- return preg_replace('/[^%a-zA-Z0-9 \(\)_-]/', '-', $title);
- }
- ?>
- // readme.txt
- === パーマリンク日本語防止プラグイン ===
- Contributors: unknown coder, hcc_dtp
- Tags: permalink,permanent link,slug
- Requires at least: 6.0
- Tested up to: 6.1
- Stable tag: 1.0
- License: Unlicense
- License URI: http://example.com/
- Requires PHP: 5.4 or later
- Donate link:
- == Description ==
- 記事タイトルに日本語が含まれる場合、保存時にスラッグを半角英数のみに自動変換します。
- = Features =
- == Installation ==
- 1. Upload 'plugin-notes-label' folder to the `/wp-content/plugins/` directory.
- 2. Activate the plugin through the 'Plugins' menu in WordPress.
- 3. If you have any problems - please ask for support.
- == Frequently Asked Questions ==
- == Screenshots ==
- == Changelog ==
- = 1.0 =
- 2022.09.22
- * Initial release
- == Upgrade Notice ==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement