Currently there are no ready filters available for this purpose. A ticket has been posted for the request.Lets hope we get one soon.
Instead of hardcoding your custom post types its better to create a filter hook and use it
Till then you can create your own filter.
Open includes/class-wp-editor.php and make folowing changes at line no 712
$pt_names = apply_filters('custom_insert_link_suggestion_filter',array_keys( $pts ));
we just added a new filter instead of getting all the public post types
Then in your theme add following code to filter the internal link custom post type
function my_filter_function($allowed_post_types)
{
if( condition chek)
{
return array('page','your custom post types');
}
}
add_filter('custom_insert_link_suggestion_filter','my_filter_function',10,1);
Related Posts:
- How to make a image-size selected by default in Media upload – WP v3.5
- Apply class to every paragraph that holds image?
- Remove “Insert from URL” link in Media upload – WP 3.5
- static variable loop not working in WordPress
- Add a class to links in the visual editor (how to get old dialog back)
- How to change the wp-login.php page title?
- adding a filter to a shortcode?
- Hide custom image sizes from media library
- Set media upload attachment link to none and hide it in WP v3.5
- How to set custom cookies before output
- Permanently remove first image from posts
- Change the footer text on the login page
- How can I hook into and edit the text of a wp_nav_menu tag?
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- add_filter to post-gallery and remove all ‘s?
- Rename image uploads with width in filename
- How to make an meta_query optional?
- How to overwrite youtube embed?
- How to change href of a Widget menu item link?
- Reload page with a different shortcode when a user selects from a dropdown
- Filter portforlio with librairie isotop
- Display child-page links in sidebar on both Parent Pages AND Child Pages
- WordPress Ajax filter: Create two loops for different output styles?
- add_filter() inside another add_filter()
- How to filter specific element of an array in wordpress/php?
- How to disable sub menu items from being created?
- Redirecting the lost password page request when using a custon login page
- How to display custom seo title before the loop?
- How can i style “echo apply_filters”
- Adding body class to html tag that already has language attrubutes?
- Custom Bulk Actions handler not firing
- How to generate customized filtered output for the gallery
- dynamically change content of div with php
- Add class to all meta boxes for a custom post type
- What is the proper way to call a function (from functions.php) on a link click?
- Add a leading zero to pagination
- Change username link in admin bar
- How to remove title tag with this filter
- Multisite – Display different header content based on which site is accessed
- Passing parameter from the current URL to redirect to another url
- str_replace not preserving whitespace
- Wrapping shortcode content in a span or link
- How to apply filter
- how to remove replicating a tag inside loop?
- changing static link to relative link
- Custom theme: adding unwanted tags in the content
- Apply filters when loading post via ajax
- Links in footer section
- How to change this internal image link parameter using PHP?
- Add custom filter to register data in array
- problem with category menu, it doesn’t want to show link
- Get terms of the posts with one query
- Woocommerce Price Text
- Limit Taxonomy Parents
- Display a post based on its metabox selection
- Make first child link default instead of its parent
- Select All not working in a WordPress search filter
- How to link a word comprised of a custom field with another?
- Custom field in title
- WordPress – show all posts + ones with specific tag
- Search box background on a different page template
- dynamically filter by category via sub-menu
- Display a list of users with avatar filterable with alphabets
- WXR XML import is stripping php tags that I need to keep
- How to add custom checkout field in user details mail template
- Keeping the previous get value and add another value when submitted
- Link to external page has wordpress blog-url inside
- AJAX: WordPress filters inside $html do not work as intended
- PHP code for link with text
- Why not showing all post by default in my jquery filter
- For each loop will not append to the_content hook
- Assign new post author IF another user in custom field on post transition
- Blog Posts not sorted and pagination not adjusted after filtering some category
- Modify meta data before saving to database
- Add attribute to featured image with filter (wp_get_attachment_image_attributes)
- Remove content links (internal and external), but exclude post at specific categories
- How to change wp-admin and wp-login urls
- How to add different menu items on different menus?
- How to pass value to add_filter wpcf7_form_tag from another function?
- Custom Filtering date with newsletter
- Add text below WooCommerce short description if metabox value is true
- Is there a hook that I can use when a fatal error occurs?
- How rename wp-content and wp-admin folders correctly
- Unable to logout correctly after wp-login file was modified
- how to append ACF field data using one of the following filter/ hooks
- Changing upload directory temporarily
- Add an attribute on WP images attachment link
- Show post in elementor based on views and specific category with query id feature in elementor
- Display featured posts first, then display all others within a specific category in WordPress
- Edit password change email text or disable it
- Adding Author Filter to CPTs
- How can I display formatted content using the_content filter?
- Remove links to the comments section
- How to get default variation ID (woocommerce)
- Using send_password_email filter after wp_update_user
- Prevent publishing of uncategorized posts
- WordPress query_posts with multiple tax_query
- Ajax Filters with Multiple tax_query args
- How do I ensure that the URL parameters are updated correctly when multiple filters are applied
- Filtered queries not responeding to page path