Plugin Directory

Changeset 2728981


Ignore:
Timestamp:
05/24/2022 02:33:33 AM (4 years ago)
Author:
wokamoto
Message:

[c3-cloudfront-clear-cache] update ver.6.1.3

Location:
c3-cloudfront-clear-cache/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c3-cloudfront-clear-cache/trunk/c3-cloudfront-clear-cache.php

    r2559100 r2728981  
    22/**
    33 * Plugin Name: C3 Cloudfront Cache Controller
    4  * Version: 6.1.2
     4 * Version: 6.1.3
    55 * Plugin URI:https://github.com/amimoto-ami/c3-cloudfront-clear-cache
    66 * Description: Manage CloudFront Cache and provide some fixtures.
  • c3-cloudfront-clear-cache/trunk/classes/AWS/Invalidation_Batch.php

    r2558516 r2728981  
    4242        $this->items[] = $result;
    4343        $this->items   = array_unique( $this->items );
     44    }
     45
     46    /**
     47     * Apply WordPress filter hook.
     48     * We can overwrite the invalidation item by manually
     49     *
     50     * @param \WP_Post $post WordPress Post object.
     51     */
     52    public function apply_invalidation_item_filter( \WP_Post $post = null ) {
     53        $this->items = apply_filters( 'c3_invalidation_items', $this->items, $post );
    4454    }
    4555
  • c3-cloudfront-clear-cache/trunk/classes/AWS/Invalidation_Batch_Service.php

    r2558516 r2728981  
    9191            $invalidation_batch->put_invalidation_path( $url );
    9292        }
     93        $invalidation_batch->apply_invalidation_item_filter( $post );
    9394        return $invalidation_batch;
    9495    }
  • c3-cloudfront-clear-cache/trunk/classes/Views/Settings.php

    r2558516 r2728981  
    5959        $this->hook_service->add_filter( 'amimoto_show_c3_setting_form', '__return_false' );
    6060        $this->hook_service->add_filter( 'amimoto_show_invalidation_form', '__return_false' );
     61
     62        $this->hook_service->add_action( 'admin_init', array( $this, 'define_caps' ) );
    6163    }
    6264
     
    6870            __( 'CloudFront Settings', Constants::text_domain() ),
    6971            __( 'CloudFront Settings', Constants::text_domain() ),
    70             'administrator',
     72            'cloudfront_clear_cache',
    7173            Constants::MENU_ID,
    7274            function () {
     
    8688    }
    8789
     90    /**
     91     * Define C3 plugin capabilities
     92     *
     93     * @access public
     94     * @param none
     95     * @since 4.0.0
     96     */
     97    public function define_caps() {
     98        $role = get_role( 'administrator' );
     99        $role->add_cap( 'cloudfront_clear_cache' );
     100    }
    88101    /**
    89102     * Filter the saving option's request
  • c3-cloudfront-clear-cache/trunk/composer.json

    r2558516 r2728981  
    1212        "wp-coding-standards/wpcs": "*",
    1313        "wp-phpunit/wp-phpunit": "5.7.2",
    14         "phpunit/phpunit": "^7.5.20"
     14        "phpunit/phpunit": "7.5.20"
    1515  },
    1616    "autoload": {
  • c3-cloudfront-clear-cache/trunk/package.json

    r2559100 r2728981  
    44  },
    55  "name": "trunk",
    6   "version": "6.1.2",
     6  "version": "6.1.3",
    77  "main": "index.js",
    88  "directories": {
  • c3-cloudfront-clear-cache/trunk/readme.txt

    r2559100 r2728981  
    44Tags: AWS,CDN,CloudFront
    55Requires at least: 4.9.0
    6 Tested up to: 5.7.2
    7 Stable tag: 6.1.2
     6Tested up to: 5.9.3
     7Stable tag: 6.1.3
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    111111== Changelog ==
    112112
     113== 6.1.3 ==
     114* [Fix] Lost filter c3_invalidation_items From v6.0.0
     115
    113116== 6.1.2 ==
    114117* [Fix] php version compare issue
Note: See TracChangeset for help on using the changeset viewer.