cptui_slug_matches_page

Returns error message for if trying to register post type with matching page slug.

Description

(string) cptui_slug_matches_page(); 

Returns (string)


Usage

  1. if ( !function_exists( 'cptui_slug_matches_page' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'custom-post-type-ui/inc/utility.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = cptui_slug_matches_page(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc/utility.php  
  1. function cptui_slug_matches_page() { 
  2. return sprintf( 
  3. esc_html__( 'Please choose a different post type name. %s matches an existing page slug, which can cause conflicts.', 'custom-post-type-ui' ),  
  4. );