Plugin Directory

Changeset 3300443


Ignore:
Timestamp:
05/26/2025 06:49:57 AM (10 months ago)
Author:
hideokamoto
Message:

Update to version 1.0.1 from GitHub

Location:
amimoto-dashboard
Files:
2 added
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • amimoto-dashboard/assets/banner-1544x500.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • amimoto-dashboard/assets/banner-772x250.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • amimoto-dashboard/assets/icon-128x128.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • amimoto-dashboard/assets/icon-256x256.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • amimoto-dashboard/tags/1.0.1/.github/workflows/push-asset-readme-update.yml

    r2538297 r3300443  
    1111    - uses: actions/checkout@master
    1212    - name: WordPress.org plugin asset/readme update
    13       uses: 10up/actions-wordpress/dotorg-plugin-asset-update@master
     13      uses: 10up/action-wordpress-plugin-asset-update@stable
    1414      env:
    1515        SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
  • amimoto-dashboard/tags/1.0.1/.github/workflows/push-deploy.yml

    r2538297 r3300443  
    1111    - uses: actions/checkout@master
    1212    - name: WordPress Plugin Deploy
    13       uses: 10up/action-wordpress-plugin-deploy@master
     13      uses: 10up/action-wordpress-plugin-deploy@stable
    1414      env:
    1515        SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
  • amimoto-dashboard/tags/1.0.1/.github/workflows/test.yml

    r2538297 r3300443  
    11name: Test plugin
    2 on:
    3   push
     2on: [push, pull_request]
    43
    54jobs:
    6   tag:
     5  test:
    76    name: PHP ${{ matrix.php }} / WP ${{ matrix.wp }} Test
    87    runs-on: ubuntu-latest
    9     services:
    10       mysql:
    11         image: mysql:5.7
    12         env:
    13           MYSQL_ALLOW_EMPTY_PASSWORD: true
    14           MYSQL_ROOT_PASSWORD: root
    15           MYSQL_DATABASE: wordpress_test
    16         ports:
    17           - 3306:3306
    18         options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
    198    strategy:
    209      matrix:
    2110        include:
    22           #- php: 8.0
    23           #  wp: trunk
    24           #  experimental: true
    2511          - php: 7.4
    26             wp: trunk
    27             experimental: true
    28           - php: 7.4
    29             wp: latest
    30           - php: 7.3
    31             wp: trunk
    32             experimental: true
    33           - php: 7.3
    34             wp: latest
    35           - php: 7.2
    36             wp: trunk
    37             experimental: true
    38           - php: 7.2
    39             wp: latest
     12            wp: 6.7
     13            composer_file: composer-php7.json
     14          - php: 8.2
     15            wp: 6.7
     16            composer_file: composer.json
    4017    steps:
    4118      - name: Checkout
    4219        uses: actions/checkout@master
    43       - name: PHP ${{ matrix.php }} / WP ${{ matrix.wp }} Test
     20       
     21      - name: PHP ${{ matrix.php }} Test
    4422        uses: shivammathur/setup-php@v2
    4523        with:
    4624          php-version: ${{ matrix.php }}
    47           extensions: mbstring, intl , mysqli
    48           ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
    49           coverage: xdebug #optional, setup coverage driver
    50 
    51       - name: Check PHP Version
    52         run: php -v
    53 
    54       - name: Install phpunit global
     25          extensions: mbstring, intl, mysqli
     26          ini-values: post_max_size=256M, short_open_tag=On
     27          coverage: xdebug
     28          tools: composer:v2
     29         
     30      - name: Setup Node.js
     31        uses: actions/setup-node@v3
     32        with:
     33          node-version: '22'
     34         
     35      - name: Ensure Yarn is installed
    5536        run: |
    56           composer global require "phpunit/phpunit=5.7.*|6.*.*|7.*.*"
    57           phpunit --version
    58 
    59       - name: Cache composer packages
    60         uses: actions/cache@v2
     37          if ! command -v yarn &> /dev/null; then
     38            echo "Yarn not found, installing..."
     39            npm install -g yarn
     40          fi
     41          yarn --version
     42         
     43      - name: Install plugin dependencies for PHP 7.4
     44        if: ${{ matrix.php == '7.4' }}
     45        run: |
     46          if [ -f "${{ matrix.composer_file }}" ]; then
     47            cp ${{ matrix.composer_file }} composer.json
     48          fi
     49          composer update --optimize-autoloader --prefer-dist
     50         
     51      - name: Install plugin dependencies for PHP 8.2
     52        if: ${{ matrix.php == '8.2' }}
     53        run: |
     54          composer install --optimize-autoloader --prefer-dist
     55         
     56      - name: Start WP-ENV
     57        uses: godaddy-wordpress/setup-wp-env@v1
     58        with:
     59          core: 'WordPress/WordPress#${{ matrix.wp }}'
     60          phpVersion: '${{ matrix.php }}'
     61       
     62      - name: Cache Composer packages
     63        uses: actions/cache@v3
    6164        with:
    6265          path: vendor
    63           key: composer-${{ hashFiles('composer.lock') }}
    64 
    65       - name: Composer install
    66         run: composer install --optimize-autoloader --prefer-dist
    67 
    68       - name: Install WP Tests
    69         run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 ${{ matrix.wp }} true
     66          key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
     67          restore-keys: |
     68            ${{ runner.os }}-php-${{ matrix.php }}-
    7069     
    71       - name: phpunit tests
     70      - name: Run tests with PHPUnit
    7271        run: |
    73           phpunit
    74           WP_MULTISITE=1 phpunit
     72          yarn test
  • amimoto-dashboard/tags/1.0.1/.wp-env.json

    r2538297 r3300443  
    11{
    2     "plugins": [
    3         "."
    4     ]
     2  "core": null,
     3  "plugins": [
     4    ".",
     5    "https://downloads.wordpress.org/plugin/wordpress-importer.zip"
     6  ],
     7  "phpVersion": "8.2",
     8  "port": 8888,
     9  "env": {
     10    "tests": {
     11      "port": 8889
     12    }
     13  }
    514}
  • amimoto-dashboard/tags/1.0.1/amimoto-plugin-dashboard.php

    r2538297 r3300443  
    22/**
    33 * Plugin Name: AMIMOTO Plugin Dashboard
    4  * Version: 1.0.0
     4 * Version: 1.0.1
    55 * Description: Control AMIMOTO helper plugins
    66 * Author: hideokamoto,amimotoami
  • amimoto-dashboard/tags/1.0.1/classes/C3_Service.php

    r2538297 r3300443  
    6868            return;
    6969        }
    70         $result;
     70        $result = null;
    7171        if ( isset( $_POST[ Constants::PLUGIN_ACTIVATION ] ) && $_POST[ Constants::PLUGIN_ACTIVATION ] ) {
    7272            if ( check_admin_referer( Constants::PLUGIN_ACTIVATION, Constants::PLUGIN_ACTIVATION ) ) {
     
    108108        $target = 'all';
    109109        if ( isset( $_POST['invalidation_target'] ) && $_POST['invalidation_target'] ) {
    110             $target = $_POST['invalidation_target'];
     110            $target = sanitize_text_field( $_POST['invalidation_target'] );
    111111        }
    112112        $result = $this->invalidation( $target );
  • amimoto-dashboard/tags/1.0.1/classes/NCC_Service.php

    r2538297 r3300443  
    6262            return;
    6363        }
    64         $result;
     64        $result = null;
    6565        if ( isset( $_POST[ Constants::PLUGIN_ACTIVATION ] ) && $_POST[ Constants::PLUGIN_ACTIVATION ] ) {
    6666            if ( check_admin_referer( Constants::PLUGIN_ACTIVATION, Constants::PLUGIN_ACTIVATION ) ) {
  • amimoto-dashboard/tags/1.0.1/classes/WP/Plugins.php

    r2538297 r3300443  
    5151        $activate_plugins = self::_get_active_plugins();
    5252        if (
    53             array_search( $amimoto_plugins['C3 Cloudfront Cache Controller'], $activate_plugins, true ) > -1
     53            array_search( $amimoto_plugins['C3 Cloudfront Cache Controller'], $activate_plugins, true ) !== false
    5454        ) {
    5555            return true;
     
    8383        $activate_plugins = self::_get_active_plugins();
    8484        if (
    85             array_search( $amimoto_plugins['Nginx Cache Controller on GitHub'], $activate_plugins, true ) > -1 ||
    86             array_search( $amimoto_plugins['Nginx Cache Controller on WP.org'], $activate_plugins, true ) > -1
     85            array_search( $amimoto_plugins['Nginx Cache Controller on GitHub'], $activate_plugins, true ) !== false ||
     86            array_search( $amimoto_plugins['Nginx Cache Controller on WP.org'], $activate_plugins, true ) !== false
    8787        ) {
    8888            return true;
  • amimoto-dashboard/tags/1.0.1/readme.txt

    r2538297 r3300443  
    55Requires at least: 4.4.0
    66Tested up to: 5.7.2
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3737
    3838== Changelog ==
     39
     40= 1.0.1 =
     41* Fixed PHP 8 compatibility issues while maintaining PHP 7 compatibility
     42* Updated GitHub Actions workflow to use wp-env for testing
     43
    3944
    4045= 1.0.0 =
  • amimoto-dashboard/trunk/.github/workflows/push-asset-readme-update.yml

    r2538297 r3300443  
    1111    - uses: actions/checkout@master
    1212    - name: WordPress.org plugin asset/readme update
    13       uses: 10up/actions-wordpress/dotorg-plugin-asset-update@master
     13      uses: 10up/action-wordpress-plugin-asset-update@stable
    1414      env:
    1515        SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
  • amimoto-dashboard/trunk/.github/workflows/push-deploy.yml

    r2538297 r3300443  
    1111    - uses: actions/checkout@master
    1212    - name: WordPress Plugin Deploy
    13       uses: 10up/action-wordpress-plugin-deploy@master
     13      uses: 10up/action-wordpress-plugin-deploy@stable
    1414      env:
    1515        SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
  • amimoto-dashboard/trunk/.github/workflows/test.yml

    r2538297 r3300443  
    11name: Test plugin
    2 on:
    3   push
     2on: [push, pull_request]
    43
    54jobs:
    6   tag:
     5  test:
    76    name: PHP ${{ matrix.php }} / WP ${{ matrix.wp }} Test
    87    runs-on: ubuntu-latest
    9     services:
    10       mysql:
    11         image: mysql:5.7
    12         env:
    13           MYSQL_ALLOW_EMPTY_PASSWORD: true
    14           MYSQL_ROOT_PASSWORD: root
    15           MYSQL_DATABASE: wordpress_test
    16         ports:
    17           - 3306:3306
    18         options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
    198    strategy:
    209      matrix:
    2110        include:
    22           #- php: 8.0
    23           #  wp: trunk
    24           #  experimental: true
    2511          - php: 7.4
    26             wp: trunk
    27             experimental: true
    28           - php: 7.4
    29             wp: latest
    30           - php: 7.3
    31             wp: trunk
    32             experimental: true
    33           - php: 7.3
    34             wp: latest
    35           - php: 7.2
    36             wp: trunk
    37             experimental: true
    38           - php: 7.2
    39             wp: latest
     12            wp: 6.7
     13            composer_file: composer-php7.json
     14          - php: 8.2
     15            wp: 6.7
     16            composer_file: composer.json
    4017    steps:
    4118      - name: Checkout
    4219        uses: actions/checkout@master
    43       - name: PHP ${{ matrix.php }} / WP ${{ matrix.wp }} Test
     20       
     21      - name: PHP ${{ matrix.php }} Test
    4422        uses: shivammathur/setup-php@v2
    4523        with:
    4624          php-version: ${{ matrix.php }}
    47           extensions: mbstring, intl , mysqli
    48           ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
    49           coverage: xdebug #optional, setup coverage driver
    50 
    51       - name: Check PHP Version
    52         run: php -v
    53 
    54       - name: Install phpunit global
     25          extensions: mbstring, intl, mysqli
     26          ini-values: post_max_size=256M, short_open_tag=On
     27          coverage: xdebug
     28          tools: composer:v2
     29         
     30      - name: Setup Node.js
     31        uses: actions/setup-node@v3
     32        with:
     33          node-version: '22'
     34         
     35      - name: Ensure Yarn is installed
    5536        run: |
    56           composer global require "phpunit/phpunit=5.7.*|6.*.*|7.*.*"
    57           phpunit --version
    58 
    59       - name: Cache composer packages
    60         uses: actions/cache@v2
     37          if ! command -v yarn &> /dev/null; then
     38            echo "Yarn not found, installing..."
     39            npm install -g yarn
     40          fi
     41          yarn --version
     42         
     43      - name: Install plugin dependencies for PHP 7.4
     44        if: ${{ matrix.php == '7.4' }}
     45        run: |
     46          if [ -f "${{ matrix.composer_file }}" ]; then
     47            cp ${{ matrix.composer_file }} composer.json
     48          fi
     49          composer update --optimize-autoloader --prefer-dist
     50         
     51      - name: Install plugin dependencies for PHP 8.2
     52        if: ${{ matrix.php == '8.2' }}
     53        run: |
     54          composer install --optimize-autoloader --prefer-dist
     55         
     56      - name: Start WP-ENV
     57        uses: godaddy-wordpress/setup-wp-env@v1
     58        with:
     59          core: 'WordPress/WordPress#${{ matrix.wp }}'
     60          phpVersion: '${{ matrix.php }}'
     61       
     62      - name: Cache Composer packages
     63        uses: actions/cache@v3
    6164        with:
    6265          path: vendor
    63           key: composer-${{ hashFiles('composer.lock') }}
    64 
    65       - name: Composer install
    66         run: composer install --optimize-autoloader --prefer-dist
    67 
    68       - name: Install WP Tests
    69         run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 ${{ matrix.wp }} true
     66          key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
     67          restore-keys: |
     68            ${{ runner.os }}-php-${{ matrix.php }}-
    7069     
    71       - name: phpunit tests
     70      - name: Run tests with PHPUnit
    7271        run: |
    73           phpunit
    74           WP_MULTISITE=1 phpunit
     72          yarn test
  • amimoto-dashboard/trunk/.wp-env.json

    r2538297 r3300443  
    11{
    2     "plugins": [
    3         "."
    4     ]
     2  "core": null,
     3  "plugins": [
     4    ".",
     5    "https://downloads.wordpress.org/plugin/wordpress-importer.zip"
     6  ],
     7  "phpVersion": "8.2",
     8  "port": 8888,
     9  "env": {
     10    "tests": {
     11      "port": 8889
     12    }
     13  }
    514}
  • amimoto-dashboard/trunk/amimoto-plugin-dashboard.php

    r2538297 r3300443  
    22/**
    33 * Plugin Name: AMIMOTO Plugin Dashboard
    4  * Version: 1.0.0
     4 * Version: 1.0.1
    55 * Description: Control AMIMOTO helper plugins
    66 * Author: hideokamoto,amimotoami
  • amimoto-dashboard/trunk/classes/C3_Service.php

    r2538297 r3300443  
    6868            return;
    6969        }
    70         $result;
     70        $result = null;
    7171        if ( isset( $_POST[ Constants::PLUGIN_ACTIVATION ] ) && $_POST[ Constants::PLUGIN_ACTIVATION ] ) {
    7272            if ( check_admin_referer( Constants::PLUGIN_ACTIVATION, Constants::PLUGIN_ACTIVATION ) ) {
     
    108108        $target = 'all';
    109109        if ( isset( $_POST['invalidation_target'] ) && $_POST['invalidation_target'] ) {
    110             $target = $_POST['invalidation_target'];
     110            $target = sanitize_text_field( $_POST['invalidation_target'] );
    111111        }
    112112        $result = $this->invalidation( $target );
  • amimoto-dashboard/trunk/classes/NCC_Service.php

    r2538297 r3300443  
    6262            return;
    6363        }
    64         $result;
     64        $result = null;
    6565        if ( isset( $_POST[ Constants::PLUGIN_ACTIVATION ] ) && $_POST[ Constants::PLUGIN_ACTIVATION ] ) {
    6666            if ( check_admin_referer( Constants::PLUGIN_ACTIVATION, Constants::PLUGIN_ACTIVATION ) ) {
  • amimoto-dashboard/trunk/classes/WP/Plugins.php

    r2538297 r3300443  
    5151        $activate_plugins = self::_get_active_plugins();
    5252        if (
    53             array_search( $amimoto_plugins['C3 Cloudfront Cache Controller'], $activate_plugins, true ) > -1
     53            array_search( $amimoto_plugins['C3 Cloudfront Cache Controller'], $activate_plugins, true ) !== false
    5454        ) {
    5555            return true;
     
    8383        $activate_plugins = self::_get_active_plugins();
    8484        if (
    85             array_search( $amimoto_plugins['Nginx Cache Controller on GitHub'], $activate_plugins, true ) > -1 ||
    86             array_search( $amimoto_plugins['Nginx Cache Controller on WP.org'], $activate_plugins, true ) > -1
     85            array_search( $amimoto_plugins['Nginx Cache Controller on GitHub'], $activate_plugins, true ) !== false ||
     86            array_search( $amimoto_plugins['Nginx Cache Controller on WP.org'], $activate_plugins, true ) !== false
    8787        ) {
    8888            return true;
  • amimoto-dashboard/trunk/readme.txt

    r2538297 r3300443  
    55Requires at least: 4.4.0
    66Tested up to: 5.7.2
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3737
    3838== Changelog ==
     39
     40= 1.0.1 =
     41* Fixed PHP 8 compatibility issues while maintaining PHP 7 compatibility
     42* Updated GitHub Actions workflow to use wp-env for testing
     43
    3944
    4045= 1.0.0 =
Note: See TracChangeset for help on using the changeset viewer.