MediaWiki添加自定义尾注 footer添加自定义链接、文字

MediaWiki网站底部,添加自定义链接、备注!

// Add a link to this page (https://www.mediawiki.org/wiki/?curid=6031)

// Add a link to this page (https://www.mediawiki.org/wiki/?curid=6031)
// test-desc is an i18n message of the text
$wgHooks['SkinAddFooterLinks'][] = function ( Skin $skin, string $key, array &$footerlinks ) {
    if ( $key === 'places' ) {
        $footerlinks['test'] = Html::element( 'a',
            [
                'href' => 'https://www.mediawiki.org/wiki/?curid=6031',
                'rel' => 'noreferrer noopener' // not required, but recommended for security reasons
            ],
        $skin->msg( 'test-desc' )->text()
        );
    };
};

//添加广州为电技术有限公司版权

// Add a link to this page (https://www.mediawiki.org/wiki/?curid=6031)
// test-desc is an i18n message of the text
$wgHooks['SkinAddFooterLinks'][] = function ( Skin $skin, string $key, array &$footerlinks ) {
    if ( $key === 'places' ) {
        $footerlinks['test'] = Html::element( 'a',
            [
                'href' => 'https://iec.wiki/',
                'rel' => 'noreferrer noopener' // not required, but recommended for security reasons
            ],
        $skin->msg( '广州为电技术有限公司 © 2024 All rights reserved.' )->text()
        );
    };
};

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注