ACF_Post_Type::enter_title_here
Filters the "Add title" text for ACF post types.
Method of the class: ACF_Post_Type{}
No Hooks.
Returns
String.
Usage
$ACF_Post_Type = new ACF_Post_Type(); $ACF_Post_Type->enter_title_here( $default, $post );
- $default(string) (required)
- The default text.
- $post(WP_Post) (required)
- The WP_Post object.
Changelog
| Since 6.2.1 | Introduced. |
ACF_Post_Type::enter_title_here() ACF Post Type::enter title here code ACF 6.8.8
public function enter_title_here( $default, $post ) {
$post_types = $this->get_posts( array( 'active' => true ) );
foreach ( $post_types as $post_type ) {
if ( $post->post_type === $post_type['post_type'] && ! empty( $post_type['enter_title_here'] ) ) {
return (string) $post_type['enter_title_here'];
}
}
return $default;
}