Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pm_excluded_ids() {
- return array(426, 512, 604);
- }
- function pm_ignore_post_ids($uris) {
- $excluded_ids = (array) pm_excluded_ids();
- if(!empty($uris) && is_array($uris)) {
- $uris = array_diff_key($uris, array_flip($excluded_ids));
- }
- return $uris;
- }
- add_filter('permalink_manager_uris', 'pm_ignore_post_ids');
- function pm_hide_uri_editor($bool) {
- global $post;
- $excluded_ids = (array) pm_excluded_ids();
- if(!empty($post->ID) && in_array($post->ID, $excluded_ids)) {
- return false;
- }
- return $bool;
- }
- add_filter('permalink_manager_hide_uri_editor_post_page', 'pm_hide_uri_editor');
- add_filter('permalink_manager_show_uri_editor_post_post', 'pm_hide_uri_editor');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement