There are questions remain, We'll search for the answers together. But one thing we known for sure,the future is not set!

【原创文章】去掉功能里的wordpress.org链接的最新方法

wordpress 百蔬君 9967℃ 已收录 2评论

今日无聊,看到了wordpress博客系统在功能中有一个wordpress.org的链接,就搜索了一下,怎么去掉。发现基本上都是说去掉wp-includes文件夹default-widgets.php中318的一段代码。

<pre class="prettyprint linenums" >
<li><a href="<?php esc_attr_e( 'http://wordpress.org/' ); ?>" title="<?php echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>"><?php
/* translators: meta widget link text */
_e( 'WordPress.org' );
?></a></li>

我检查了一下,这个代码已经不存在了,最新版本已经变了。

翻了一下代码,发现这个控制代码在\wp-includes\widgets\class-wp-widget-meta.php文件的widget函数中。

echo apply_filters前面的注释符号*/,放到) );后面就好了。注释掉后代码如下

/**
* 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' )
 ) );*/

转载请注明:百蔬君 » 【原创文章】去掉功能里的wordpress.org链接的最新方法

喜欢 (4)or分享 (0)
发表我的评论
取消评论

请证明您不是机器人(^v^):

表情
(2)个小伙伴在吐槽
  1. 看到了wordpress博客系统在功能中有一个wordpress.org的链接,就搜索了一下,怎么去掉
    百蔬君2016-03-06 20:05 回复
  2. ludou_comment_add_at出错了
    百蔬君2016-03-06 20:14 回复