WordPress.org

Make WordPress Core

Changeset 35295


Ignore:
Timestamp:
10/20/2015 05:04:29 PM (4 years ago)
Author:
obenland
Message:

Tests: Use updated filter names and oembed title for UT sanity.

See [35294], #31078.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/embed-template.php

    r35235 r35295  
    2121<html <?php language_attributes(); ?>>
    2222<head>
    23     <title><?php wp_title( '-', true, 'right' ); ?></title>
     23    <title><?php echo wp_get_document_title(); ?></title>
    2424    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    2525    <?php
  • trunk/tests/phpunit/tests/general/document-title.php

    r35294 r35295  
    4949        $this->go_to( '/' );
    5050
    51         add_filter( 'title_tag_pre', array( $this, '_short_circuit_title' ) );
     51        add_filter( 'pre_get_document_title', array( $this, '_short_circuit_title' ) );
    5252
    5353        $this->expectOutputString( "<title>A Wild Title</title>\n" );
     
    7575        $this->go_to( '/' );
    7676
    77         add_filter( 'title_tag_parts', array( $this, '_home_title_parts' ) );
     77        add_filter( 'document_title_parts', array( $this, '_home_title_parts' ) );
    7878
    7979        $this->expectOutputString( "<title>Test Blog &#8211; Just another WordPress site</title>\n" );
     
    9292        $this->go_to( '?page=4' );
    9393
    94         add_filter( 'title_tag_parts', array( $this, '_paged_title_parts' ) );
     94        add_filter( 'document_title_parts', array( $this, '_paged_title_parts' ) );
    9595
    9696        $this->expectOutputString( "<title>Test Blog &#8211; Page 4 &#8211; Just another WordPress site</title>\n" );
     
    110110        $this->go_to( '?p=' . $this->post_id );
    111111
    112         add_filter( 'title_tag_parts', array( $this, '_singular_title_parts' ) );
     112        add_filter( 'document_title_parts', array( $this, '_singular_title_parts' ) );
    113113
    114114        $this->expectOutputString( "<title>test_title &#8211; Test Blog</title>\n" );
     
    213213        $this->go_to( '?p=' . $this->post_id );
    214214
    215         add_filter( 'title_tag_parts', array( $this, '_rearrange_title_parts' ) );
     215        add_filter( 'document_title_parts', array( $this, '_rearrange_title_parts' ) );
    216216
    217217        $this->expectOutputString( "<title>Test Blog &#8211; test_title</title>\n" );
     
    231231        $this->go_to( '?p=' . $this->post_id );
    232232
    233         add_filter( 'title_tag_separator', array( $this, '_change_title_separator' ) );
     233        add_filter( 'document_title_separator', array( $this, '_change_title_separator' ) );
    234234
    235235        $this->expectOutputString( "<title>test_title %% Test Blog</title>\n" );
Note: See TracChangeset for help on using the changeset viewer.