LLMS_Admin_Meta_Boxes::maybe_modify_title_placeholder( string $placeholder, WP_Post $post )

Modifies the placeholder text for the post title field.


Description Description

This is used to denote that the achievement and certificate template title fields are for internal use only to help avoid confusion as to why there are two separate titles.


Top ↑

Parameters Parameters

$placeholder

(string) (Required) Default placeholder text.

$post

(WP_Post) (Required) Post object.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/admin/post-types/class.llms.meta.boxes.php

	public function maybe_modify_title_placeholder( $placeholder, $post ) {
		$post_types = array(
			'llms_achievement',
			'llms_certificate',
		);
		if ( in_array( $post->post_type, $post_types, true ) ) {
			$placeholder = sprintf(
				'%1$s (%2$s)',
				$placeholder,
				_x( 'for internal use only', 'added achievement and certificate template post title placeholder', 'lifterlms' )
			);
		}

		return $placeholder;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.