Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
5082fdb
Verify blog id on multisite before asset parent deletion
gabriel-detassigny Feb 13, 2026
25a1be1
Rename method
gabriel-detassigny Feb 16, 2026
d66c27c
Fall back to original public ID
gabriel-detassigny Mar 16, 2026
9559790
Add wp-env configuration for local development environment
PatelUtkarsh Mar 19, 2026
d0c1ea0
Add @wordpress/env dependency and env:* npm scripts
PatelUtkarsh Mar 19, 2026
eb3b6be
Add loopback fix script for wp-env sync daemon support
PatelUtkarsh Mar 19, 2026
1fab9ba
Add local development setup instructions to README
PatelUtkarsh Mar 19, 2026
26db9ff
Merge pull request #1157 from PatelUtkarsh/feature/local-wp-env-setup
gabrielcld2 Mar 20, 2026
d8304a1
Fallback to default media context within relationship query
gabriel-detassigny Mar 24, 2026
bff3c04
Replace deprecated render with createRoot
gabriel-detassigny Mar 27, 2026
4bded42
Migrate from @import to @use/@forward in SCSS
gabriel-detassigny Mar 30, 2026
520323e
Ignore .claude config
gabriel-detassigny Mar 30, 2026
55dc8e7
Rebuild assets
gabriel-detassigny Mar 30, 2026
1364657
Replace deprecated color functions
gabriel-detassigny Mar 30, 2026
c952340
Remove deprecation warnings from gallery settings
gabriel-detassigny Mar 31, 2026
320b7a1
Replace deprecated tagsSuggestL10n with i18n
gabriel-detassigny Apr 2, 2026
bc33e6e
Ensure we return the current context row first
gabriel-detassigny Apr 6, 2026
d3c1910
Delete unused CSS file
gabriel-detassigny Apr 6, 2026
e0e1a9f
Merge pull request #1160 from cloudinary/node-upgrade-improvements
gabrielcld2 Apr 6, 2026
3cfb9a0
Merge branch 'develop' into wp-7.0
gabriel-detassigny Apr 6, 2026
2a10253
Build assets
gabriel-detassigny Apr 6, 2026
47a5825
Bump up the WP core requirements
gabriel-detassigny Apr 7, 2026
0ac7a15
Remove isSecondary
gabriel-detassigny Apr 7, 2026
67e9a3d
Upgrade gallery block to apiVersion 2
gabriel-detassigny Apr 7, 2026
79689d8
Ensure compatibility with WP 5.6
gabriel-detassigny Apr 13, 2026
e2612b6
Build assets
gabriel-detassigny Apr 13, 2026
8dfb5b2
Ensure compatibility with PHP 7.4
gabriel-detassigny Apr 13, 2026
2570c30
Switch JSX transform from automatic to classic runtime
gabriel-detassigny Apr 13, 2026
b52246e
Merge pull request #1159 from cloudinary/bugfix/wpml-lazy-loading
gabrielcld2 Apr 14, 2026
dda2dad
Enforce check of PHP >= 7.4
gabriel-detassigny Apr 16, 2026
c2e2609
Add wp-i18n as direct dependency to terms-order script
gabriel-detassigny Apr 16, 2026
15ca42b
Detect use of PHP 8 functionalities
gabriel-detassigny Apr 16, 2026
1f4aa4b
Stop ignoring PHPCS warnings
gabriel-detassigny Apr 16, 2026
355a6d5
Merge pull request #1161 from cloudinary/wp-7.0
gabrielcld2 Apr 17, 2026
1b262a1
Merge branch 'develop' into feature/parent-multisite-check
gabriel-detassigny Apr 17, 2026
ad71ccb
Merge pull request #1162 from cloudinary/feature/parent-multisite-check
gabrielcld2 Apr 24, 2026
dbf252a
Merge branch 'develop' into bugfix/woocommerce-sideloading-duplication
gabriel-detassigny Apr 24, 2026
11a9a02
Avoid duplicated images when sideloading images to Woo API
gabriel-detassigny Apr 24, 2026
a7c6269
Add missing use statement
gabriel-detassigny Apr 27, 2026
bd1935b
Merge pull request #1165 from cloudinary/bugfix/woocommerce-sideloadi…
gabrielcld2 Apr 27, 2026
c187cc7
Update translation file
gabriel-detassigny Apr 27, 2026
e938e2c
Handle old autoloaded version of the plugin not having the new method
gabriel-detassigny Apr 27, 2026
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
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ coverage/html/
# ENV files
.env

# wp-env
.wp-env.json
# wp-env personal overrides
.wp-env.override.json

# IDE
.vscode
Expand All @@ -52,3 +52,6 @@ cloudinary-image-management-and-manipulation-in-the-cloud-cdn.zip
cloudinary-wordpress-v2.zip
cloudinary-wordpress-v3.zip
package/dist

# AI generated files
.claude/
26 changes: 26 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"core": "WordPress/WordPress#6.9.4",
"phpVersion": "8.2",
"plugins": ["."],
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
"SCRIPT_DEBUG": true
},
"mappings": {
"wp-content/mu-plugins": "./.wp-env/mu-plugins"
},
"lifecycleScripts": {
"afterStart": "./.wp-env/scripts/fix-loopback.sh"
},
"env": {
"tests": {
"phpVersion": "8.2",
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
"SCRIPT_DEBUG": true
}
}
}
}
Empty file added .wp-env/mu-plugins/.gitkeep
Empty file.
28 changes: 28 additions & 0 deletions .wp-env/scripts/fix-loopback.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
# Fix loopback requests in wp-env Docker environment.
#
# WordPress in wp-env thinks its URL is localhost:8888, but inside the
# container Apache only listens on port 80. This causes self-pinging
# REST API requests (used by Cloudinary's sync daemon) to fail with
# cURL error 7. Adding port 8888 to Apache resolves this.
#
# This script finds the wp-env WordPress container and configures Apache
# to also listen on port 8888, enabling loopback requests to succeed.

# Find the wp-env wordpress container (exclude tests container).
CONTAINER=$(docker ps --format '{{.Names}}' | grep -E 'wordpress-1$' | grep -v tests | head -1)

if [ -z "$CONTAINER" ]; then
echo "Warning: Could not find wp-env WordPress container. Loopback fix skipped."
exit 0
fi

# Add Listen 8888 if not already present, then graceful restart Apache.
docker exec "$CONTAINER" bash -c \
"grep -q 'Listen 8888' /etc/apache2/ports.conf || (echo 'Listen 8888' >> /etc/apache2/ports.conf && apache2ctl graceful)" 2>/dev/null

if [ $? -eq 0 ]; then
echo "Loopback fix applied: Apache now also listens on port 8888 inside the container."
else
echo "Warning: Failed to apply loopback fix."
fi
82 changes: 74 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cloudinary's WordPress Plugin

Cloudinary is a cloud service that offers a solution to a web application's entire image and video management pipeline.
Cloudinary is a cloud service that offers a solution to a web application's entire image and video management pipeline.
With Cloudinary, all your images are automatically uploaded, normalized, optimized and backed-up in the cloud instead of being hosted on your servers.

With Cloudinary, you can stop messing around with image editors. Cloudinary can manipulate and transform your images online, on-the-fly, directly from your WordPress console. Enhance your images using every possible filter and effect you can think of. All manipulations are done in the cloud using super-powerful hardware, and all resulting images are cached, optimized (smushed and more) and delivered via a lightning fast content delivery network (CDN).
Expand All @@ -12,20 +12,18 @@ The plugin is publicly available at: [https://wordpress.org/plugins/cloudinary-i

This Git repository is the development repository, while there's a mirror public SVN repository of the actual released WordPress plugin version: [https://plugins.svn.wordpress.org/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/](https://plugins.svn.wordpress.org/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/)


> **Deprecation Note**
> The legacy WordPress Plugin version (v1.x) will be deprecated as of **February 1st, 2021**, after which support, updates and bug fixes for the legacy plugin will continue in limited fashion.
> The legacy WordPress Plugin version (v1.x) will be deprecated as of **February 1st, 2021**, after which support, updates and bug fixes for the legacy plugin will continue in limited fashion.
> The legacy plugin will be made obsolete on **August 1st, 2021** (end-of-life date), meaning, Version 1.x of the plugin will no longer function after that date.
> We ask that you update to our latest WordPress Plugin v2.x before the August 1st deadline.

> We ask that you update to our latest WordPress Plugin v2.x before the August 1st deadline.

## Additional resources

Additional resources are available at:

* [Website](https://cloudinary.com)
* [Documentation](https://cloudinary.com/documentation)
* [Knowledge Base](https://support.cloudinary.com/hc/en-us)
- [Website](https://cloudinary.com)
- [Documentation](https://cloudinary.com/documentation)
- [Knowledge Base](https://support.cloudinary.com/hc/en-us)

## Support

Expand All @@ -37,6 +35,74 @@ Stay tuned for updates, tips and tutorials: [Blog](https://cloudinary.com/blog),

## Development

### Prerequisites

- [Node.js](https://nodejs.org/) v16+ (see `.nvmrc`)
- [npm](https://www.npmjs.com/) v6.9+
- [Composer](https://getcomposer.org/)
- [Docker](https://www.docker.com/) (required for the WordPress local environment via `wp-env`)

### Local Development Setup

1. **Clone the repository:**

```bash
git clone https://github.com/cloudinary/cloudinary_wordpress.git
cd cloudinary_wordpress
```

2. **Set the correct Node version** (if using [nvm](https://github.com/nvm-sh/nvm)):

```bash
nvm install
nvm use
```

3. **Install dependencies:**

```bash
npm install
```

This will also run `composer install` automatically via the `postinstall` script, setting up PHP dependencies and linting tools.

4. **Start the local WordPress environment:**

Make sure Docker is running, then:

```bash
npm run env:start
```

This spins up a WordPress instance at [http://localhost:8888](http://localhost:8888) with the plugin activated and `WP_DEBUG` enabled. A loopback fix is applied automatically so REST API self-requests work inside the container.

5. **Build front-end assets:**

```bash
npm run build # One-time production build
npm run dev # Watch mode for development
```

### Useful Commands

| Command | Description |
| ---------------------- | ---------------------------------------- |
| `npm run env:start` | Start the local WordPress environment |
| `npm run env:stop` | Stop the local WordPress environment |
| `npm run env:destroy` | Remove the local environment completely |
| `npm run env:logs` | View container logs |
| `npm run env:cli` | Run WP-CLI commands inside the container |
| `npm run env:clean` | Reset the environment (removes all data) |
| `npm run build` | Build front-end assets for production |
| `npm run dev` | Build front-end assets in watch mode |
| `npm run lint` | Run all linters (PHP, JS, CSS) |
| `npm run lint:php` | Run PHP CodeSniffer |
| `npm run lint:php:fix` | Auto-fix PHP linting issues |
| `npm run lint:js` | Run ESLint on JavaScript files |
| `npm run lint:js:fix` | Auto-fix JS linting issues |
| `npm run lint:style` | Run stylelint on SCSS files |
| `npm run i18n` | Generate translation files |

### Create a Plugin Release Package

Run `npm run package` to create the plugin release in the `/build` directory and package it as `cloudinary-image-management-and-manipulation-in-the-cloud-cdn.zip` in the root directory.
Expand Down
4 changes: 2 additions & 2 deletions cloudinary.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
define( 'CLDN_CORE', __FILE__ );
define( 'CLDN_PATH', plugin_dir_path( __FILE__ ) );

if ( version_compare( phpversion(), '5.6', '>=' ) ) {
if ( version_compare( phpversion(), '7.4', '>=' ) ) {
require_once __DIR__ . '/instance.php';
register_activation_hook( __FILE__, array( 'Cloudinary\Utils', 'install' ) );
} else { // phpcs:ignore Universal.ControlStructures.DisallowLonelyIf.Found
Expand All @@ -60,5 +60,5 @@ function php_version_error() {
* @return string
*/
function php_version_text() {
return __( 'Cloudinary plugin error: Your version of PHP is too old to run this plugin. You must be running PHP 5.6 or higher.', 'cloudinary' );
return __( 'Cloudinary plugin error: Your version of PHP is too old to run this plugin. You must be running PHP 7.4 or higher.', 'cloudinary' );
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"config": {
"platform": {
"php": "5.6.20"
"php": "7.4"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
Expand Down
2 changes: 1 addition & 1 deletion css/cloudinary.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/block-editor.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => 'b2f0bbe921dc49b7d514');
<?php return array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'aab7b2e0606348e43cc2');
2 changes: 1 addition & 1 deletion js/block-editor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/gallery-block.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '98e435d77738ea4c4f99');
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '98f4cd2c29395fad0b1e');
2 changes: 1 addition & 1 deletion js/gallery-block.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/gallery.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '6da83dfb91692f575603');
<?php return array('dependencies' => array('wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'ce273b9408344c97f28b');
2 changes: 1 addition & 1 deletion js/gallery.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/terms-order.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '0085d1c205e96a2bbe85');
<?php return array('dependencies' => array(), 'version' => '2f7f1b83c7516fc1c316');
Loading
Loading