Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 8 additions & 40 deletions .github/workflows/deploy-svn.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,24 @@
name: Deploy to WordPress.org SVN
name: Deploy to WordPress.org

on:
release:
types: [published]
types:
- published
workflow_dispatch:
inputs:
version:
description: 'Version tag (e.g. 1.2.0)'
required: true

jobs:
deploy:
name: Deploy to WordPress.org SVN
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'release' && github.event.release.tag_name || github.ref_name }}
fetch-depth: 0

- name: Install SVN
run: sudo apt-get update && sudo apt-get install -y subversion

- name: Deploy to WordPress.org SVN
- name: Deploy plugin to WordPress.org
uses: 10up/action-wordpress-plugin-deploy@stable
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: ct-optimization
VERSION: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.version }}
run: |
set -euo pipefail

SVN_URL="https://plugins.svn.wordpress.org/${SLUG}/"

if svn ls "${SVN_URL}tags/${VERSION}" >/dev/null 2>&1; then
echo "Version ${VERSION} already exists in SVN; skipping deploy."
exit 0
fi

TMP_DIR="$(mktemp -d)"
echo "Preparing clean release tree in ${TMP_DIR}"
rsync -rc --delete --delete-excluded \
--exclude '.git' \
--exclude '.github' \
--exclude '.gitignore' \
--exclude '.editorconfig' \
--exclude '.DS_Store' \
"$GITHUB_WORKSPACE/" "$TMP_DIR/"

echo "Importing release to SVN tag ${VERSION}"
svn import "$TMP_DIR" "${SVN_URL}tags/${VERSION}" \
-m "Release version ${VERSION} from GitHub" \
--no-auth-cache --non-interactive \
--username "$SVN_USERNAME" --password "$SVN_PASSWORD"
ASSETS_DIR: .wordpress-org
18 changes: 17 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
languages/*.*~
# Composer dependencies
/vendor/

# Node.js dependencies
/node_modules/

# macOS metadata
.DS_Store

# PHP logs and debug output
*.log

# PHPUnit result cache
.phpunit.result.cache

# Language backup files
languages/*.*~
Binary file added .wordpress-org/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 112 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.3.0 (2026-06-26)

### Added

- Official PHP 8.0–8.4 support, bumped `Requires PHP` to 8.0
- `.wordpress-org/` directory for WordPress.org plugin assets (icons, banners)
- Standard WordPress.org SVN deploy workflow using `10up/action-wordpress-plugin-deploy`

### Fixed

- Undefined `$attributes` variable warning in admin options page under PHP 8.0
- `Requires at least` bumped to WordPress 6.0

## 1.2.0

- PHP 8.2-8.4 compatibility: fix missing property declaration in Gravity Forms class
- Fix manifest option key mismatch (`disable_manifest` → `disable_wlw_manifest`)
- Bump minimum PHP requirement to 7.4
- Tested up to WordPress 6.8

## 1.1.1

- Fix PHP 8.1+ deprecation warnings for null/false passed to `strip_tags()` and `strtotime()`
- Fix `parse_url()` return value not checked in `get_domain_from_url()`
- Fix widget existence check in `check_comment_style()` for PHP 8.x

## 1.1.0

- Fix compatible with PHP 8

## 1.0.16

- Add option to remove duotone and extra CSS style in WP 5.9

## 1.0.15

- Fix save key for Gravity Forms settings
- Remove Compress HTML feature

## 1.0.14

- Fix load Gravity form assets if disable option.

## 1.0.13

- Disable more Gravity form assets.
- Remove HTML Compress feature.

## 1.0.12

- Add option to disable Gutenberg widget admin UI.

## 1.0.11

- Disable more Gutenberg feature.

## 1.0.10

- Fix warning PHP when calling function inline

## 1.0.9

- Add option to enable/disable lazysizes script.

## 1.0.8

- Update plugin translation.

## 1.0.7

- Add Gravity Form tweak settings, including disable default styles, hide some menus and load Gravity forms script in footer.

## 1.0.6

- Update config key to match process.

## 1.0.5

- Fix iconv convert character.
- Update Vietnamese translation.

## 1.0.4

- Fix enable cdn domain option key.

## 1.0.3

- Fix option keys to match
- Remove option in database if deactivate plugin.
- Add comment for html compress to easy debug.
- Translate update for Vietnamese
- Add more FAQ
- Add notice in case PHP version is lower 7.0

## 1.0.2

- Fix HTML compress class name.

## 1.0.1

- Add HTML compress feature.

## 1.0.0

- First release
12 changes: 10 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
Contributors: khoipro, codetot
Donate link: https://codetot.com
Tags: optimization, compress, settings, codetot
Requires at least: 5.0
Requires at least: 6.0
Tested up to: 6.8
Stable tag: 1.2.0
Stable tag: 1.3.0
Requires PHP: 8.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -77,6 +78,13 @@ Yes, if you are using our themes.

== Changelog ==

= 1.3.0 =
* Official PHP 8.0-8.4 support, bumped Requires PHP to 8.0
* Fix undefined variable warning in admin options page under PHP 8.0
* Bump Requires at least to WordPress 6.0
* Integrate standard WordPress.org SVN deploy workflow
* Move WP.org assets to .wordpress-org/ directory

= 1.2.0 =
* PHP 8.2-8.4 compatibility: fix missing property declaration in Gravity Forms class
* Fix manifest option key mismatch (disable_manifest → disable_wlw_manifest)
Expand Down
8 changes: 4 additions & 4 deletions codetot-optimization.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
* Plugin Name: CT Optimization
* Plugin URI: https://codetot.com
* Description: Provides settings for enable/disable WordPress core features and some tweaks for ACF, Gravity Forms, such like Enable CDN, Lazyload assets.
* Version: 1.2.0
* Requires at least: 5.0
* Requires PHP: 7.4
* Version: 1.3.0
* Requires at least: 6.0
* Requires PHP: 8.0
* Author: CODE TOT JSC
* Author URI: https://codetot.com
* License: GPL-2.0+
Expand All @@ -24,7 +24,7 @@
die;
}

define( 'CODETOT_OPTIMIZATION_VERSION', '1.2.0' );
define( 'CODETOT_OPTIMIZATION_VERSION', '1.3.0' );
define( 'CODETOT_OPTIMIZATION_PATH', plugin_dir_path(__FILE__) );
define( 'CODETOT_OPTIMIZATION_URL', plugin_dir_url(__FILE__) );

Expand Down
2 changes: 1 addition & 1 deletion includes/class-codetot-admin-options-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ protected function build_settings_field($page_key, $section_key, $field_key)
}

// Additional attributes
$attributes = array();
if (!empty($field['attributes'])) {
$attributes = array();
foreach ($field['attributes'] as $attribute => $value) {
if (!empty($value)) {
$attributes[] = "{$attribute}='{$value}'";
Expand Down
Loading