Title: WP_Customize_Manager::get_document_title_template
Published: December 9, 2015
Last modified: February 24, 2026

---

# WP_Customize_Manager::get_document_title_template(): string

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_document_title_template/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_document_title_template/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_document_title_template/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_document_title_template/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_document_title_template/?output_format=md#wp--skip-link--target)

Gets the template string for the Customizer pane document title.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_document_title_template/?output_format=md#return)󠁿

 string The template string for the document title.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_document_title_template/?output_format=md#source)󠁿

    ```php
    public function get_document_title_template() {
    	if ( $this->is_theme_active() ) {
    		/* translators: %s: Document title from the preview. */
    		$document_title_tmpl = __( 'Customize: %s' );
    	} else {
    		/* translators: %s: Document title from the preview. */
    		$document_title_tmpl = __( 'Live Preview: %s' );
    	}
    	$document_title_tmpl = html_entity_decode( $document_title_tmpl, ENT_QUOTES, 'UTF-8' ); // Because exported to JS and assigned to document.title.
    	return $document_title_tmpl;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-customize-manager.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-customize-manager.php#L4587)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-customize-manager.php#L4587-L4597)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_document_title_template/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Customize_Manager::is_theme_active()](https://developer.wordpress.org/reference/classes/wp_customize_manager/is_theme_active/)`wp-includes/class-wp-customize-manager.php` |

Checks if the current theme is active.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  |

| Used by | Description | 
| [WP_Customize_Manager::customize_pane_settings()](https://developer.wordpress.org/reference/classes/wp_customize_manager/customize_pane_settings/)`wp-includes/class-wp-customize-manager.php` |

Prints JavaScript settings for parent window.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_document_title_template/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.4.0](https://developer.wordpress.org/reference/since/4.4.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_manager%2Fget_document_title_template%2F)
before being able to contribute a note or feedback.