get_extended( string $post ): string[]  Gets extended entry info (<!--more-->).   Description There should not be any space after the second dash and before the word ‘more’. There can be text or space(s) after the word ‘more’, but won’t be referenced. The returned array has ‘main’, ‘extended’, and ‘more_text’ keys. Main has the text before the <!--more-->. The ‘extended’ key has the content after the <!--more--> comment. The ‘more_text’ key has the custom "Read More" text.   Parameters   $post string Required    Post content.      Return string[] Extended entry info. 


mainstringContent before the more tag.
 
extendedstringContent after the more tag.
 
more_textstringCustom read more text, or empty string.
    Source  File: wp-includes/post.php. View all references  function get_extended( $post ) {
	// Match the new style more links.
	if ( preg_match( '/<!--more(.*?)?-->/', $post, $matches ) ) {
		list($main, $extended) = explode( $matches[0], $post, 2 );
		$more_text             = $matches[1];
	} else {
		$main      = $post;
		$extended  = '';
		$more_text = '';
	}

	// Leading and trailing whitespace.
	$main      = preg_replace( '/^[\s]*(.*)[\s]*$/', '\\1', $main );
	$extended  = preg_replace( '/^[\s]*(.*)[\s]*$/', '\\1', $extended );
	$more_text = preg_replace( '/^[\s]*(.*)[\s]*$/', '\\1', $more_text );

	return array(
		'main'      => $main,
		'extended'  => $extended,
		'more_text' => $more_text,
	);
}
   Related  Used By    Used By Description      wp_xmlrpc_server8b7c:f320:99b9:690f:4595:cd17:293a:c069mw_getPost() wp-includes/class-wp-xmlrpc-server.php   Retrieve post.     wp_xmlrpc_server8b7c:f320:99b9:690f:4595:cd17:293a:c069mw_getRecentPosts() wp-includes/class-wp-xmlrpc-server.php   Retrieve list of recent posts.     wp_xmlrpc_server8b7c:f320:99b9:690f:4595:cd17:293a:c069_prepare_page() wp-includes/class-wp-xmlrpc-server.php   Prepares page data for return in an XML-RPC object.   
    Changelog    Version Description     1.0.0 Introduced.    

    
{'path': 'public/docs/wordpress/functions/get_extended.html', 'source': 'DevDocs.IO'}