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:
- Apply class to every paragraph that holds image?
- Remove “Insert from URL” link in Media upload – WP 3.5
- Add a class to links in the visual editor (how to get old dialog back)
- How to change the wp-login.php page title?
- Hide custom image sizes from media library
- How can I hook into and edit the text of a wp_nav_menu tag?
- Rename image uploads with width in filename
- How to overwrite youtube embed?
- Check if page parent has certain template
- Filter the blog title displayed in the header
- Why do filters/actions require an argument count?
- How To Change The Html of Products filtration sidebar in Woocommerce?
- Filter get_the_title to remove certain characters?
- Get posts with at least one category in common with current post?
- Shortcode return function with link href inside PHP
- Change the site tagline (or similar) based on current page
- WooCommerce Related Products by Attribute
- Taxonomy linked to pages
- Custom filter in admin edit custom post type responding with invalid post type?
- add_action shortcut?
- Is it acceptable to treat a filter like an action?
- Add data attribute to each li in menu
- Ajax category filtering products default show all
- Add a specific part of current category page url to shortcode
- Remove the first 5 characters of the_title and orderby that
- Print last modified date only on posts
- How to add an arrow to menu items has submenus
- Generating an nonce for Content Security Policy and all scripts – How to make it match/persist for each page load?
- Change tinyMCE editor to allow marked content when pasting from Word
- How to debug this search & replace strings snippet?
- Hide Featured Image Meta Box on Editor Screen
- Add item to top of menu using a filter in functions.php
- Make Current/Active Page Number a Link (WP_LINK_PAGES)
- How to make modifications only to certain elements of an HTML string on the server-side?
- How to get post permalink url without a href
- get_template_directory_uri() providing wrong path for img
- Trying to prepend a Hashtag symbol to the_tags links [closed]
- Next post link on a bootstrap button
- trouble with page_id & highlighting current page
- Add meta tags to a custom header
- Ajax filter button display all posts
- How to append to an array and return the results in a filter?
- Custom query vars filters problem with pagination
- Filter by field with array value in ACF on WP REST API
- Automatically Add Page Links to Nav Menu
- wrap a span tag around author’s post count
- Must filter functions receive all arguments passed to them?
- How to set all External Domain Links with nofollow Attribute from Header Footer Content and Excerpt using PHP?
- Obfuscate links (for SEO purpose) [closed]
- How to Create custom block for displaying information in content section which act like shortcode
- Filter wordpress posts without searching the keywords in the post content
- Variation prices breakdown only for single product page
- Remove Author Links
- How to remove get_header From all single pages in wordpress with functions.php without plugin?
- Apply function.php filter only if url not has /amp/
- Change lost password url to a mailto URL in WordPress
- Remove span tags from WooCommerce Downloads page
- How to enable HTML tags in category description without breaking the category page
- How to edit post meta data before publishing the post it self wordpress?
- Multiple Tag Filtering
- opens like sitename.com/URL
- Link to index.php from home.php?
- Should I set a page as “No-index” if I include it’s content within the front-Page.php via this method?
- How to change href of a Widget menu item link?
- Reload page with a different shortcode when a user selects from a dropdown
- Display child-page links in sidebar on both Parent Pages AND Child Pages
- WordPress Ajax filter: Create two loops for different output styles?
- How to disable sub menu items from being created?
- 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?
- What is the proper way to call a function (from functions.php) on a link click?
- Change username link in admin bar
- How to remove title tag with this filter
- str_replace not preserving whitespace
- how to remove replicating a tag inside loop?
- 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
- Get terms of the posts with one query
- Woocommerce Price Text
- Limit Taxonomy Parents
- Display a post based on its metabox selection
- dynamically filter by category via sub-menu
- Display a list of users with avatar filterable with alphabets
- How to add custom checkout field in user details mail template
- Keeping the previous get value and add another value when submitted
- For each loop will not append to the_content hook
- Assign new post author IF another user in custom field on post transition
- Modify meta data before saving to database
- Remove content links (internal and external), but exclude post at specific categories
- How to change wp-admin and wp-login urls
- Custom Filtering date with newsletter
- 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
- Display featured posts first, then display all others within a specific category in WordPress
- Prevent publishing of uncategorized posts