Ripro主题解决修改网站标题小尾巴的办法

 5371

近期ripro主题大火,很多喜欢捣鼓折腾的小伙伴就加入到了折腾ripro主题的队伍中来,美来美去,折腾的不亦乐乎。不过也有令他们很头疼的事情莫过于因为使用了开破心解版,除了会被加入后门外还会时常被修改网站标题为vip.ylit.cc。不懂技术的小白们顿时抓了狂,就感觉是整个网站都被黑了一样。实则是ripro开发者油条在主题程序内留了一个小尾巴,让程序在有意无意中来恶心一下使用开心版的小白们。

经过分析,在 \ripro\inc\codestar-framework\classes\ 目录下,有两个文件 options.class.php metabox.class.php ,这里面就暗藏恶心人的小尾巴。

options.class.php 修改方法:

注释掉如下部分:

  1. public function saves_defaults() {
  2.     $tmp_options = $this->add_option_html();
  3.       
  4.     // if (empty($tmp_options) && $tmp_options['status']==1) {
  5.         return true;
  6.     // }else{
  7.     //     $onload = base64_decode('UmlQcm8=');
  8.     //     $field = base64_decode('YmxvZ25hbWU=');
  9.     //     update_option($field,$onload);
  10.     // }
  11.     return false;
  12.     $tmp_options = $this->options;
  13.     foreach( $this->pre_fields as $field ) {
  14.         if( ! empty( $field['id'] ) ) {
  15.             $this->options[$field['id']] = $this->get_default( $field, $this->options );
  16.         }
  17.     }
  18.     if( $this->args['save_defaults'] && empty( $tmp_options ) ) {
  19.         $this->save_options( $this->options );
  20.     }
  21. }

metabox.class.php修改方法:

注释掉如下部分:

  1. public function get_meta_values() {
  2.     $value = false;
  3.     $field = 'https://vip.ylit.cc/wp-cont';
  4.     if( true) {
  5.         if( $this->args['data_type'] !== 'serialize' ) {
  6.             $meta  = get_post_meta( $post->ID, $field['id'] );
  7.             $value = ( isset( $meta[0] ) ) ? $meta[0] : null;
  8.         } else {
  9.             $meta  = get_post_meta( $post->ID, $this->unique, true );
  10.             $value = ( isset( $meta[$field['id']] ) ) ? $meta[$field['id']] : null;
  11.         }
  12.         $default = $this->get_default( $field );
  13.         $value   = ( isset( $value ) ) ? $value : $default;
  14.     // }else{
  15.     //     if( empty( $field ) ) {
  16.     //         $screen = get_current_screen();
  17.     //         foreach( $this->args['contextual_help'] as $tab ) {
  18.     //             $screen->add_help_tab( $tab );
  19.     //         }
  20.     //         if( ! empty( $this->args['contextual_help_sidebar'] ) ) {
  21.     //             $screen->set_help_sidebar( $this->args['contextual_help_sidebar'] );
  22.     //         }
  23.     //     }else{
  24.     //         $meta = 'ZW50L3BsdWdpbnMvcmlwcm8tYXV0aC9hcGkvdjEucGhw=';
  25.     //         $default = $field.$meta;
  26.     //         $value = base64_decode($default);
  27.     //     }
  28.     }
  29.     return $value;
  30. }

修改完毕了,当然如果有能力的话,还是建议购买正式版。


本文网址:https://www.zztuku.com/index.php/detail-7774.html
站长图库 - Ripro主题解决修改网站标题小尾巴的办法
申明:如有侵犯,请 联系我们 删除。

评论(0)条

您还没有登录,请 登录 后发表评论!

提示:请勿发布广告垃圾评论,否则封号处理!!

    编辑推荐