去掉WordPress中Meta Widget的WordPress.org链接

去掉WordPress中Meta Widget的WordPress.org链接

Meta Widget中的内容是无法直接在后台修改,如果我们要去掉Wordpress的链接,则需要进入源代码中进行修改
文件的具体位置是:/wp-includes/default-widgets.php
修改时在文件中找到
[php]
<?php
/**
* Filter the "Powered by WordPress" text in the Meta widget.
*
* @since 3.6.0
*
* @param string $title_text Default title text for the WordPress.org link.
*/
echo apply_filters( ‘widget_meta_poweredby’, sprintf( ‘<li><a href="%s" title="%s">%s</a></li>’,
esc_url( __( ‘https://wordpress.org/’ ) ),
esc_attr__( ‘Powered by WordPress, state-of-the-art semantic personal publishing platform.’ ),
_x( ‘WordPress.org’, ‘meta widget link text’ )
) );

wp_meta();
?>
[/php]
把它删掉或者注释

发表评论

© 2022. powered by PHP 个人小站