@SUB_TIGER
Програмер на диване

Как вывести Title страницы на которой сейчас находимся?

Плагин Remove_Redundant_Links удаляет цыклические ссылки (cсылки на логотип например), но после удаления оставляет статическое название 'You are here.'. Как реализовать чтобы подтягивался title название страницы вместо статических слов 'You are here.' ? сайт https://www.nenws.com

define( 'PLUGIN_RRL_TEXT_DOMAIN', 'plugin-rrl' );
    load_plugin_textdomain(
    	PLUGIN_RRL_TEXT_DOMAIN
    ,	FALSE
    ,	basename( dirname( __FILE__ ) ) . '/lang'
    );
    
    /**
     * Manager for the plugin Remove Redundant Links.
     *
     * @return void
     */
    if ( ! function_exists( 'rrl_start' ) )
    {
    	function rrl_start()
    	{
    		if ( is_feed() )
    		{
    			return;
    		}
    
    		! class_exists( 'Remove_Redundant_Links' ) and
    			include dirname( __FILE__ ) . '/class.Remove_Redundant_Links.php';
    
    		// Make it global to allow easier deactivation.
    		global $Remove_Redundant_Links;
    
    		$settings = array (
    			'class'   => 'rrl current_page_item'
    		,	'title'   => __( 'You are here.', PLUGIN_RRL_TEXT_DOMAIN )
    		,	'charset' => get_bloginfo( 'charset' )
    		);
    
    		$Remove_Redundant_Links = new Remove_Redundant_Links(
    		// You may hook into the settings with
    		// add_filter( 'rrl_settings', 'change_rrl_settings', 10, 1 );
    		// where change_rrl_settings( $settings ) returns an altered array.
    			apply_filters( 'rrl_settings', $settings )
    		);
    
    		ob_start( array ( $Remove_Redundant_Links, 'convert' ) );
    	}
    }
    add_action( 'template_redirect', 'rrl_start', 50 );
  • Вопрос задан
  • 92 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы