adminadjust.php
/**
     * Plugin that changes the language code used in the <html /> tag.
     *
     * @return  void
     *
     * @since   2.5
     */
Plugin that changes the language code used in the  tag.
@return  void


Plugin that changes the language code used in the tag . @return void
public function onAfterRender()
    {
        $app = JFactory::getApplication();
        if ($app->isAdmin()) {
            $body = $app->getBody();
            $app->setBody(str_replace('autocomplete="off" class="validate-password"', 'autocomplete="new-password" class="validate-password"', $body));
        }
        if ($app->isClient('site')) {
            switch ($_SERVER['SERVER_NAME']) {
                case 'dev.npeu.ox.ac.uk' :
                    $env = 'development';
                    break;
                case 'test.npeu.ox.ac.uk':
                    $env = 'testing';
                    break;
                default:
                    $env = 'production';
            }
            $body = $app->getBody();
            if ($env == 'development') {
                $app->setBody(str_replace('https://www.npeu.ox.ac.uk', 'https://dev.npeu.ox.ac.uk', $body));
            } elseif ($env == 'testing') {
                $app->setBody(str_replace('https://www.npeu.ox.ac.uk', 'https://test.npeu.ox.ac.uk', $body));
            }
        }
    }
public function onAfterRender ( ) { $ app = JFactory :: getApplication ( ) ; if ( $ app -> isAdmin ( ) ) { $ body = $ app -> getBody ( ) ; $ app -> setBody ( str_replace ( 'autocomplete="off" class="validate-password"' , 'autocomplete="new-password" class="validate-password"' , $ body ) ) ; } if ( $ app -> isClient ( 'site' ) ) { switch ( $ _SERVER [ 'SERVER_NAME' ] ) { case 'dev.npeu.ox.ac.uk' : $ env = 'development' ; break ; case 'test.npeu.ox.ac.uk' : $ env = 'testing' ; break ; default : $ env = 'production' ; } $ body = $ app -> getBody ( ) ; if ( $ env == 'development' ) { $ app -> setBody ( str_replace ( 'https://www.npeu.ox.ac.uk' , 'https://dev.npeu.ox.ac.uk' , $ body ) ) ; } elseif ( $ env == 'testing' ) { $ app -> setBody ( str_replace ( 'https://www.npeu.ox.ac.uk' , 'https://test.npeu.ox.ac.uk' , $ body ) ) ; } } }
Plugin that changes the language code used in the <html /> tag.
Plugin that changes the language code used in the <html / > tag .
// Note this should be in it's own plugin, really. // New password fields shoudl now use 'new-password' instead of 'off' for autocomplete. // Get the response body. #$app->setBody(preg_replace('#(<input.*?type="password".*?)autocomplete="off"#s', '$1autocomplete="new-password"', $body)); // Use this plugin only in site application. // Get the response body.