Plugin Directory

Changeset 2714748

Timestamp:
04/26/2022 09:13:49 AM (2 years ago)
Author:
increaserev
Message:

Path Correction
Image loader

Location:
gowebp/trunk
Files:
5 added
5 edited

Legend:

Unmodified
Added
Removed
  • gowebp/trunk/gowebp.php

    r2714583 r2714748  
    3939        $current_screen = get_current_screen();
    4040        $remaining_days = $this->ir_get_remaining_days();
    41         if( strpos($current_screen->base, 'go-webp') === false && $remaining_days<=15 && !$this->ir_check_feature_pre()){
     41        if( strpos($current_screen->base, 'gowebp') === false && $remaining_days<=15 && !$this->ir_check_feature_pre()){
    4242           add_action('admin_notices',function() use($remaining_days){
    4343               $domain = sanitize_text_field( $_SERVER["HTTP_HOST"] );
     
    5252        }else{
    5353
    54             if (isset($_GET['page']) && ($_GET['page'] == 'go-webp/gowebp_option2.php')) {
     54            if (isset($_GET['page']) && ($_GET['page'] == 'gowebp/gowebp_option2.php')) {
    5555                wp_enqueue_style('trial_style',plugin_dir_url( __FILE__) ."lib/css/trial.css", array(), time());
    5656                wp_enqueue_style('buttons_style',plugin_dir_url( __FILE__) ."lib/css/buttons.css", array(), time());
     
    7373        if(current_user_can("administrator")){
    7474        add_menu_page('GOWEBP', 'GOWEBP', 'editor', 'gowebp-menu', '', plugin_dir_url( __FILE__) ."lib/img/Gowebpwp.png", 30);
    75             add_submenu_page('gowebp-menu', 'GOWEBP', 'Settings', 'administrator', 'go-webp/gowebp_option2.php');
     75            add_submenu_page('gowebp-menu', 'GOWEBP', 'Settings', 'administrator', 'gowebp/gowebp_option2.php');
    7676        }
    7777       
  • gowebp/trunk/gowebp_worker.php

    r2714583 r2714748  
    13731373            $optImgCount=round($imageCounter/4);
    13741374        }
    1375         if(file_exists(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/gowebp_urls3.txt")){
    1376             $var__=file_get_contents(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/gowebp_urls3.txt");
     1375        if(file_exists(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/gowebp_urls3.txt")){
     1376            $var__=file_get_contents(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/gowebp_urls3.txt");
    13771377            $var__=explode("_ir_",$var__);
    13781378            $counturl=[];
  • gowebp/trunk/gowebp_worker_premium.php

    r2714583 r2714748  
    13391339            $optImgCount=round($imageCounter/4);
    13401340        }
    1341         if(file_exists(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/gowebp_urls3.txt")){
    1342             $var__=file_get_contents(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/gowebp_urls3.txt");
     1341        if(file_exists(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/gowebp_urls3.txt")){
     1342            $var__=file_get_contents(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/gowebp_urls3.txt");
    13431343            $var__=explode("_ir_",$var__);
    13441344            $counturl=[];
  • gowebp/trunk/includes/helper.php

    r2714583 r2714748  
    261261
    262262    function ir_webp_start($plugin){
    263         if( strpos($plugin,"go-webp") !==false) {
     263        if( strpos($plugin,"gowebp") !==false) {
    264264            $this->ir_add_record($this->ir_send_req_to_server());
    265             exit( wp_safe_redirect( admin_url( 'admin.php?page=go-webp/gowebp_option2.php' ) ) );
     265            exit( wp_safe_redirect( admin_url( 'admin.php?page=gowebp/gowebp_option2.php' ) ) );
    266266        }
    267267    }
  • gowebp/trunk/store.php

    r2714583 r2714748  
    115115       
    116116
    117         file_put_contents(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/gowebp_urls3.txt","");
     117        file_put_contents(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/gowebp_urls3.txt","");
    118118
    119119         $this->gowebp_clear_cache2();
     
    164164    function ir_start_optimization(){
    165165        $var__="not";
    166         file_put_contents(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/status_opt.txt",$var__);
     166        file_put_contents(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/status_opt.txt",$var__);
    167167        $check = get_user_meta(1);
    168168        $ir_theme_image_status  = $check["ir_theme_image_status"][0] ?? 0;
     
    242242            if($status== true || $status== 1){
    243243                $this->ir_proceed_key($response);
    244                 echo admin_url("admin.php")."?page=go-webp/gowebp_option2.php&reg_success=1";
     244                echo admin_url("admin.php")."?page=gowebp/gowebp_option2.php&reg_success=1";
    245245            }else{
    246246                echo "failed";
     
    364364   
    365365
    366                     if(file_exists(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/status_opt.txt")){
    367                         $var__=file_get_contents(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/status_opt.txt");
     366                    if(file_exists(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/status_opt.txt")){
     367                        $var__=file_get_contents(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/status_opt.txt");
    368368                    }else{
    369369                        $var__="not";
    370                         file_put_contents(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/status_opt.txt",$var__);                       
     370                        file_put_contents(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/status_opt.txt",$var__);                       
    371371                        return false;
    372372                    }
     
    390390                            $optImgCount=round($imageCounter/4);
    391391                        }
    392                         if(file_exists(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/gowebp_urls3.txt")){
    393                             $var__=file_get_contents(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/gowebp_urls3.txt");
     392                        if(file_exists(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/gowebp_urls3.txt")){
     393                            $var__=file_get_contents(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/gowebp_urls3.txt");
    394394                            $var__=preg_replace( "/\r|\n/", "", $var__ );
    395395                            $var__=explode("_ir_",$var__);
     
    446446                                                    $url=$path."/".$filename;
    447447                                                    $this->ir_compressor($path,$filename);
    448                                                     @$var__2=file_get_contents(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/gowebp_urls3.txt");
     448                                                    @$var__2=file_get_contents(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/gowebp_urls3.txt");
    449449                                                    $var__2=$var__2.$url."_ir_\n";
    450                                                     file_put_contents(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/gowebp_urls3.txt",$var__2);
     450                                                    file_put_contents(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/gowebp_urls3.txt",$var__2);
    451451                                                }
    452452
     
    460460                                }
    461461                            }
    462                             file_put_contents(dirname(plugin_dir_path(__FILE__))."/go-webp/includes/status_opt.txt","completed");
     462                            file_put_contents(dirname(plugin_dir_path(__FILE__))."/gowebp/includes/status_opt.txt","completed");
    463463                            echo "completed";
    464464                        }else{
Note: See TracChangeset for help on using the changeset viewer.