ACF_Post_Type::enter_title_here
Filters the "Add title" text for ACF post types.
Метод класса: ACF_Post_Type{}
Хуков нет.
Возвращает
Строку
.
Использование
$ACF_Post_Type = new ACF_Post_Type(); $ACF_Post_Type->enter_title_here( $default, $post );
- $default(строка) (обязательный)
- The default text.
- $post(WP_Post) (обязательный)
- The WP_Post object.
Список изменений
С версии 6.2.1 | Введена. |
Код ACF_Post_Type::enter_title_here() ACF Post Type::enter title here ACF 6.4.2
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; }