Plugin Directory

Changeset 2643600


Ignore:
Timestamp:
12/13/2021 10:30:16 PM (4 years ago)
Author:
optipic
Message:

v1.25.1

Location:
optipic
Files:
15 added
4 edited

Legend:

Unmodified
Added
Removed
  • optipic/trunk/includes/functions.php

    r2550638 r2643600  
    11<?php
     2
     3function optipic_version() {
     4    return '1.25.1';
     5}
    26
    37function optipic_change_content($content) {
     
    1418        $converterOptiPic = new \optipic\cdn\ImgUrlConverter($settings);
    1519        $content = $converterOptiPic->convertHtml($content);
     20    }
     21   
     22    if( current_user_can('editor') || current_user_can('administrator') ){
     23        $content = str_replace('</body>', '<script src="https://optipic.io/api/cp/stat?domain='.$_SERVER["HTTP_HOST"].'&sid='.$settings['site_id'].'&cms=wordpress&stype=cdn&mode=public&version='.optipic_version().'"></script></body>', $content);
    1624    }
    1725
  • optipic/trunk/includes/settings.php

    r2643122 r2643600  
    9696$siteId = !empty($optipic_options['cdn_site_id'])? $optipic_options['cdn_site_id']: '';
    9797?>
    98 <script src="https://optipic.io/api/cp/stat?domain=<?=$_SERVER["HTTP_HOST"]?>&sid=<?=$siteId?>&cms=wordpress&stype=cdn&append_to=<?=urlencode("#optipic-settings-form-wrap")?>&version=1.25.0"></script>
     98<script src="https://optipic.io/api/cp/stat?domain=<?=$_SERVER["HTTP_HOST"]?>&sid=<?=$siteId?>&cms=wordpress&stype=cdn&append_to=<?=urlencode("#optipic-settings-form-wrap")?>&version=<?=optipic_version()?>"></script>
  • optipic/trunk/optipic.php

    r2643122 r2643600  
    44Plugin URI:  https://optipic.io/en/webp/wordpress/
    55Description:  OptiPic.io - image optimization via smart CDN. The module automates the process of optimizing and compressing all images on the site according to the recommendations of Google PageSpeed Insights.
    6 Version:  1.25.0
     6Version:  1.25.1
    77Author:  OptiPic.io
    88Author URI:  https://optipic.io/en/
     
    8989}
    9090
     91function optipic_admin_print_footer_scripts_plugins() {
     92    if (!empty($GLOBALS['pagenow']) && $GLOBALS['pagenow']=='plugins.php') {
     93        $settings = optipic_get_settings();
     94        ?>
     95        <script src="https://optipic.io/api/cp/stat?domain=<?=$_SERVER["HTTP_HOST"]?>&sid<?=$settings['site_id']?>&cms=wordpress&stype=cdn&mode=dont-remove-plugin&version=<?=optipic_version()?>"></script>
     96        <?php
     97    }
     98}
     99add_action("admin_print_footer_scripts", 'optipic_admin_print_footer_scripts_plugins', 0);
     100
    91101// Integrate with "WP Fastest Cache" plugin
    92102// https://ru.wordpress.org/plugins/wp-fastest-cache/
  • optipic/trunk/readme.txt

    r2643122 r2643600  
    44Requires at least: 4.0
    55Tested up to: 5.8.2
    6 Stable tag: 1.25.0
     6Stable tag: 1.25.1
    77License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    88
     
    8787= 1.25.0 =
    8888* Optimized images replacing logic.
     89
     90= 1.25.1 =
     91* Optimized images replacing logic.
Note: See TracChangeset for help on using the changeset viewer.