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:
- static variable loop not working in WordPress
- Set media upload attachment link to none and hide it in WP v3.5
- How to set custom cookies before output
- 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”
- How to make an meta_query optional?
- Check if page parent has certain template
- How to remove “out of stock” variation options from size dropdown in woocommerce?
- Change comments form title on a page by page basis
- Display only text to WordPress loop without loosing the text formatting
- Remove class that has been added by parent theme
- append PHP function to the_content
- I want to remove the links from the term list returned by get_the_term_list
- “Maximum function nesting level of ‘100’ reached” after adding a new filter
- How do I know what variables are passed in a filter/action and what their meaning is?
- Find variables available at a given hook
- wp_get_attachment_url filter won’t accept two arguments
- Getting my head round WordPress filter
- Change links automatically to affiliate links
- How to set a custom path, for ajax image upload folder in admin?
- Filter get_the_title to remove certain characters?
- How to use return in my custom function instead of echo
- When using the_author hook, how can I determine the PHP file that generates each call to `the_author()`?
- How to properly insert a link to a template in WordPress?
- WordPress php filter admin_body_class not working
- Combine two filters into a single call
- Remove a filter added by a plugin
- Handling Body class based on Template
- WooCommerce Related Products by Attribute
- Add a class to the anchor tag on HTML5 gallery
- wordpress count link clicks by ip address
- How to control WordPress image metadata (using Imagick)?
- How do I add custom bulk actions to multiple custom post types?
- Show prices with tax in Woocommerce Mini Cart [closed]
- Removing “wpautop” (auto tags) only on certain pages?
- Add filter when image is uploaded?
- Remove the first 5 characters of the_title and orderby that
- Remove a div from RSS feed
- WordPress Gravatar filter is removing my custom attributes
- Alter required message using comment form api
- How to debug this search & replace strings snippet?
- Hide Featured Image Meta Box on Editor Screen
- Add filter multiple times using only one master function
- How to edit php code in WordPress Post file?
- Change page title from page using php via php executed from page/post itself
- How to get post permalink url without a href
- Filtering a function’ output for a new continued function
- Deleting Certain terms from appearing on the front end as links
- Create page template via functions.php?
- Add meta tags to a custom header
- Ajax filter button display all posts
- How to have different site identity logos on each page on Astra Theme [closed]
- 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
- Get the name of menu item with wp_nav_menu
- update_post_meta() not saving data inside of save-post filter
- How to add aria role and schema markup to custom walker container
- Must filter functions receive all arguments passed to them?
- Adding custom url to readmore link using get_permalink()
- How to internationalize header image?
- apply_filters with several different values?
- User filter posts by year
- How to add a custom filter (by coding) before access one wordpress page ? And where to call the custom filter?
- Adding wp users ID into a link address from a DIVI modul
- Variation prices breakdown only for single product page
- How to use apply_filters() inside a plugin class?
- Shortcodes not processing inside post content
- Multiple Tag Filtering
- I want to hide “sold by” on certain pages with id page 43
- How to filter specific element of an array in wordpress/php?
- How to disable sub menu items from being created?
- How can i style “echo apply_filters”
- How to generate customized filtered output for the gallery
- Add class to all meta boxes for a custom post type
- Add a leading zero to pagination
- Change username link in admin bar
- Multisite – Display different header content based on which site is accessed
- Passing parameter from the current URL to redirect to another url
- How to apply filter
- changing static link to relative link
- Apply filters when loading post via ajax
- Make first child link default instead of its parent
- Select All not working in a WordPress search filter
- Custom field in title
- WordPress – show all posts + ones with specific tag
- 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
- Add attribute to featured image with filter (wp_get_attachment_image_attributes)
- How to pass value to add_filter wpcf7_form_tag from another function?
- Add text below WooCommerce short description if metabox value is true
- Is there a hook that I can use when a fatal error occurs?