├── .editorconfig ├── .eslintignore ├── .eslintrc.json ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ └── feature_request.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .nvmrc ├── .prettierrc.json ├── .release-it.json ├── .stylelintignore ├── .stylelintrc ├── .travis.yml ├── .version ├── LICENSE ├── README.md ├── assets ├── banner-1544x500.jpg ├── banner-772x250.jpg ├── icon-128x128.png ├── icon-256x256.png ├── screenshot-1.jpg ├── screenshot-10.jpg ├── screenshot-11.jpg ├── screenshot-12.jpg ├── screenshot-2.jpg ├── screenshot-3.jpg ├── screenshot-4.jpg ├── screenshot-5.jpg ├── screenshot-6.jpg ├── screenshot-7.jpg ├── screenshot-8.jpg └── screenshot-9.jpg ├── cloudinary.php ├── composer.json ├── composer.lock ├── css ├── cloudinary.css ├── fonts │ ├── cloudinary.3b839e5145ad58edde0191367a5a96f0.woff │ ├── cloudinary.d1a91c7f695026fd20974570349bc540.eot │ └── cloudinary.d8de6736f15e12f71ac22a2d374002e5.ttf ├── front-overlay.css ├── gallery-block-rtl.css ├── gallery-block.css ├── gallery-ui.css ├── images │ ├── academy-icon.svg │ ├── academy.jpg │ ├── arrow.svg │ ├── bandwidth.svg │ ├── circular-loader.svg │ ├── cloud.svg │ ├── cloudinary.svg │ ├── confetti.png │ ├── connection-string.png │ ├── crop.svg │ ├── dam-icon.svg │ ├── document.svg │ ├── documentation.jpg │ ├── gallery.svg │ ├── image.svg │ ├── learn.svg │ ├── loading.svg │ ├── logo-icon.svg │ ├── logo.svg │ ├── report.jpg │ ├── request.jpg │ ├── requests.svg │ ├── responsive.svg │ ├── sample.webp │ ├── star.svg │ ├── transformation.svg │ ├── units-plus.svg │ ├── units.svg │ ├── upload.svg │ ├── video.svg │ └── wizard-welcome.jpg ├── syntax-highlight.css └── video.css ├── gruntfile.js ├── instance.php ├── js ├── asset-edit.js ├── asset-manager.js ├── block-editor.asset.php ├── block-editor.js ├── breakpoints-preview.js ├── cloudinary.js ├── deactivate.asset.php ├── deactivate.js ├── front-overlay.js ├── gallery-block-rtl.css ├── gallery-block.asset.php ├── gallery-block.css ├── gallery-block.js ├── gallery-init.asset.php ├── gallery-init.js ├── gallery-ui.js ├── gallery.asset.php ├── gallery.js ├── inline-loader.asset.php ├── inline-loader.js ├── lazy-load.asset.php ├── lazy-load.js ├── lazyload-preview.js ├── media-modal.asset.php ├── media-modal.js ├── syntax-highlight.js ├── terms-order.asset.php ├── terms-order.js ├── video-init.asset.php ├── video-init.js ├── video.js └── wp-color-picker-alpha.js ├── languages └── cloudinary.pot ├── package-lock.json ├── package.json ├── package ├── package.php └── package.sh ├── php ├── assets │ └── class-rest-assets.php ├── cache │ ├── class-cache-point.php │ └── class-file-system.php ├── class-admin.php ├── class-assets.php ├── class-cache.php ├── class-cli-vip.php ├── class-cli.php ├── class-connect.php ├── class-cron.php ├── class-dashboard.php ├── class-deactivation.php ├── class-delivery-feature.php ├── class-delivery.php ├── class-exception.php ├── class-extension.php ├── class-extensions.php ├── class-media-library.php ├── class-media.php ├── class-meta-box.php ├── class-plugin.php ├── class-relate.php ├── class-report.php ├── class-rest-api.php ├── class-settings-component.php ├── class-settings.php ├── class-special-offer.php ├── class-string-replace.php ├── class-svg.php ├── class-sync.php ├── class-url.php ├── class-utils.php ├── component │ ├── class-assets.php │ ├── class-config.php │ ├── class-notice.php │ ├── class-settings.php │ └── class-setup.php ├── connect │ └── class-api.php ├── cron │ ├── class-lock-file.php │ └── class-lock-object.php ├── delivery │ ├── class-bypass.php │ ├── class-lazy-load.php │ └── class-responsive-breakpoints.php ├── integrations │ ├── class-integrations.php │ └── class-wpml.php ├── media │ ├── class-filter.php │ ├── class-gallery.php │ ├── class-global-transformations.php │ ├── class-upgrade.php │ ├── class-video.php │ └── class-woocommercegallery.php ├── misc │ └── class-image-sizes-no-textdomain.php ├── relate │ └── class-relationship.php ├── settings │ ├── class-setting.php │ └── storage │ │ ├── class-options.php │ │ ├── class-post-meta.php │ │ ├── class-storage.php │ │ └── class-transient.php ├── sync │ ├── class-delete-sync.php │ ├── class-download-sync.php │ ├── class-push-sync.php │ ├── class-storage.php │ ├── class-sync-queue.php │ ├── class-unsync.php │ └── class-upload-sync.php ├── templates │ ├── blank-template.php │ ├── connection-string.php │ ├── settings-footer.php │ ├── settings-header.php │ ├── settings-section.php │ ├── settings-tabs.php │ ├── special-offer.php │ ├── taxonomy-term-transformation-fields.php │ ├── taxonomy-transformation-fields.php │ ├── transformation-preview-video.php │ └── transformation-preview.php ├── traits │ ├── trait-cli.php │ ├── trait-params.php │ ├── trait-relation.php │ └── trait-singleton.php ├── ui │ ├── class-branch.php │ ├── class-component.php │ ├── class-state.php │ └── component │ │ ├── class-asset-preview.php │ │ ├── class-asset.php │ │ ├── class-breakpoints-preview.php │ │ ├── class-button.php │ │ ├── class-cache-status.php │ │ ├── class-chart-stat.php │ │ ├── class-checkbox.php │ │ ├── class-color.php │ │ ├── class-column.php │ │ ├── class-connect.php │ │ ├── class-cron.php │ │ ├── class-crops.php │ │ ├── class-data.php │ │ ├── class-debug.php │ │ ├── class-file-folder.php │ │ ├── class-folder-table.php │ │ ├── class-frame.php │ │ ├── class-group.php │ │ ├── class-html.php │ │ ├── class-icon-toggle.php │ │ ├── class-image-preview.php │ │ ├── class-info-box.php │ │ ├── class-lazyload-preview.php │ │ ├── class-line-stat.php │ │ ├── class-link.php │ │ ├── class-media-status.php │ │ ├── class-meta-box.php │ │ ├── class-notice.php │ │ ├── class-number.php │ │ ├── class-on-off.php │ │ ├── class-opt-level.php │ │ ├── class-page-header.php │ │ ├── class-page.php │ │ ├── class-panel-short.php │ │ ├── class-panel.php │ │ ├── class-plan-details.php │ │ ├── class-plan-status.php │ │ ├── class-plan.php │ │ ├── class-progress-bar.php │ │ ├── class-progress-ring.php │ │ ├── class-progress-sync.php │ │ ├── class-radio.php │ │ ├── class-react.php │ │ ├── class-referrer-link.php │ │ ├── class-row.php │ │ ├── class-select.php │ │ ├── class-submit.php │ │ ├── class-switch-cloud.php │ │ ├── class-sync.php │ │ ├── class-system.php │ │ ├── class-table.php │ │ ├── class-tabs.php │ │ ├── class-tag.php │ │ ├── class-tags-input.php │ │ ├── class-text.php │ │ ├── class-textarea.php │ │ └── class-video-preview.php └── url │ ├── class-cloudinary.php │ ├── class-url-object.php │ └── class-wordpress.php ├── phpcs.xml.dist ├── postcss.config.js ├── readme.txt ├── src ├── css │ ├── _variables.scss │ ├── components │ │ ├── _brand.scss │ │ ├── _global_transformations.scss │ │ ├── _media_library.scss │ │ ├── _settings.scss │ │ ├── _sync.scss │ │ ├── _terms_order.scss │ │ ├── _ui.scss │ │ ├── _widget.scss │ │ └── ui │ │ │ ├── _asset-table.scss │ │ │ ├── _charts.scss │ │ │ ├── _cron.scss │ │ │ ├── _gallery.scss │ │ │ ├── _grid.scss │ │ │ ├── _group.scss │ │ │ ├── _import.scss │ │ │ ├── _input.scss │ │ │ ├── _links.scss │ │ │ ├── _loading.scss │ │ │ ├── _media.scss │ │ │ ├── _modal.scss │ │ │ ├── _notice.scss │ │ │ ├── _page.scss │ │ │ ├── _panel.scss │ │ │ ├── _plan.scss │ │ │ ├── _sidebar.scss │ │ │ ├── _sizes-preview.scss │ │ │ ├── _tables.scss │ │ │ ├── _tabs.scss │ │ │ ├── _tooltips.scss │ │ │ ├── _ui-components.scss │ │ │ ├── _wizard.scss │ │ │ ├── controls │ │ │ ├── _excluded_types.scss │ │ │ ├── _icon-toggle.scss │ │ │ ├── _input-tags.scss │ │ │ ├── _on-off.scss │ │ │ ├── _radio-checkbox.scss │ │ │ ├── _select.scss │ │ │ └── _text.scss │ │ │ ├── panels │ │ │ ├── _infobox.scss │ │ │ ├── _legacy.scss │ │ │ ├── _optimize.scss │ │ │ ├── _panel-short.scss │ │ │ └── _submit-switch-cloud.scss │ │ │ └── wizard │ │ │ ├── _complete.scss │ │ │ ├── _connect.scss │ │ │ ├── _intro.scss │ │ │ ├── _optimize.scss │ │ │ └── _tabs.scss │ ├── fonts │ │ ├── cloudinary.eot │ │ ├── cloudinary.svg │ │ ├── cloudinary.ttf │ │ └── cloudinary.woff │ ├── front-overlay.scss │ ├── gallery-ui.scss │ ├── gallery.scss │ ├── images │ │ ├── academy-icon.svg │ │ ├── academy.jpg │ │ ├── arrow.svg │ │ ├── bandwidth.svg │ │ ├── chart-placeholder.svg │ │ ├── circle.svg │ │ ├── circular-loader.svg │ │ ├── cloud.svg │ │ ├── cloudinary.svg │ │ ├── confetti.png │ │ ├── connection-string.png │ │ ├── crop.svg │ │ ├── dam-icon.svg │ │ ├── document.svg │ │ ├── documentation.jpg │ │ ├── gallery.svg │ │ ├── image.svg │ │ ├── learn.svg │ │ ├── loading.svg │ │ ├── logo-icon.svg │ │ ├── logo.svg │ │ ├── report.jpg │ │ ├── request.jpg │ │ ├── requests.svg │ │ ├── responsive.svg │ │ ├── sample.webp │ │ ├── star.svg │ │ ├── transformation.svg │ │ ├── units-plus.svg │ │ ├── units.svg │ │ ├── upload.svg │ │ ├── video.svg │ │ ├── warning.svg │ │ └── wizard-welcome.jpg │ ├── main.scss │ └── video.scss └── js │ ├── asset-edit.js │ ├── asset-manager.js │ ├── blocks.js │ ├── breakpoints-preview.js │ ├── components │ ├── asset-editor.js │ ├── asset-preview.js │ ├── crops-sizes.js │ ├── extensions.js │ ├── featured-image.js │ ├── gallery-init.js │ ├── global-transformations.js │ ├── media-library.js │ ├── media-modal.js │ ├── modal.js │ ├── notices.js │ ├── onoff.js │ ├── progress.js │ ├── restricted-types.js │ ├── settings-gallery.js │ ├── settings-page.js │ ├── states.js │ ├── storage.js │ ├── suffix-value.js │ ├── tabs.js │ ├── tags-input.js │ ├── taxonomies.js │ ├── terms-inspector.js │ ├── ui.js │ ├── video.js │ └── wizard.js │ ├── deactivate.js │ ├── front-overlay.js │ ├── gallery-block │ ├── attributes.json │ ├── controls.js │ ├── deprecated.js │ ├── edit.js │ ├── icons.js │ ├── index.js │ ├── options.js │ ├── radio.js │ ├── save.js │ └── utils.js │ ├── inline-loader.js │ ├── lazy-load.js │ ├── lazyload-preview.js │ ├── main.js │ ├── syntax-highlight.js │ ├── terms-order.js │ ├── video-init.js │ └── wp-color-picker-alpha.js ├── ui-definitions ├── components │ ├── header.php │ ├── media-library.php │ ├── page.php │ ├── settings.php │ └── wizard.php ├── settings-image.php ├── settings-metaboxes.php ├── settings-pages.php ├── settings-sidebar.php └── settings-video.php └── webpack.config.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # See https://make.wordpress.org/core/handbook/coding-standards/ 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | indent_style = tab 10 | indent_size = 4 11 | 12 | [*.{yml,json}] 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.md] 17 | trim_trailing_whitespace = false 18 | 19 | [{.version,.editorconfig}] 20 | insert_final_newline = false -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | **/*.min.js 2 | **/node_modules/** 3 | **/vendor/** 4 | **/js/*.js 5 | build/* 6 | built/* -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true 4 | }, 5 | "globals": { 6 | "cloudinary": "readonly", 7 | "jQuery": "readonly", 8 | "$": "readonly", 9 | "CLDN": "readonly", 10 | "CLDLB": "readonly", 11 | "CLD_GLOBAL_TRANSFORMATIONS": "readonly", 12 | "samplePlayer": "readonly", 13 | "CLDCACHE": "readonly", 14 | "cldData": "readonly", 15 | "CLD_METADATA": "readonly" 16 | }, 17 | "extends": [ 18 | "plugin:@wordpress/eslint-plugin/recommended" 19 | ], 20 | "rules": { 21 | "no-alert": "off", 22 | "no-console": "off", 23 | "no-unused-vars": "off", 24 | "no-nested-ternary": "off", 25 | "jsx-a11y/click-events-have-key-events": "off", 26 | "react-hooks/rules-of-hooks": "error", 27 | "react-hooks/exhaustive-deps": "warn" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Report an issue with the plugin 4 | 5 | --- 6 | 7 | ## Bug Description 8 | 9 | 10 | 11 | ## Expected Behaviour 12 | 13 | 14 | 15 | ## Steps to reproduce 16 | 17 | 18 | 19 | 1. Go to '...' 20 | 2. Click on '....' 21 | 3. Scroll down to '....' 22 | 4. See error 23 | 24 | ## Screenshots 25 | 26 | 27 | 28 | ## Additional context 29 | 30 | 31 | 32 | - WordPress version: 33 | - Plugin version: 34 | - Gutenberg plugin version (if applicable): 35 | - PHP version: 36 | - Plugin settings: 37 | 38 | 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | 3 | contact_links: 4 | 5 | - name: Cloudinary Support 6 | url: https://support.cloudinary.com/hc/en-us/requests/new 7 | about: If you’re encountering an issue or struggling to get the plugin to work, open a ticket to contact our support team. 8 | 9 | - name: WordPress Plugin Support 10 | url: https://wordpress.org/support/plugin/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/ 11 | about: Please ask and answer questions here. 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for the plugin 4 | 5 | --- 6 | 7 | ## Feature description 8 | 9 | 10 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | Fixes #123 3 | 4 | 5 | ## Approach 6 | 7 | - Describe the approach and the suggested implementation. 8 | 9 | 10 | ## QA notes 11 | 12 | - Detail the steps needed to verify the PR. 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | wp-config.php 3 | wp-content/advanced-cache.php 4 | wp-content/backup-db/ 5 | wp-content/backups/ 6 | wp-content/blogs.dir/ 7 | wp-content/cache/ 8 | wp-content/upgrade/ 9 | wp-content/uploads/ 10 | wp-content/mu-plugins/ 11 | wp-content/wp-cache-config.php 12 | wp-content/plugins/hello.php 13 | 14 | /.htaccess 15 | /license.txt 16 | /readme.html 17 | /sitemap.xml 18 | /sitemap.xml.gz 19 | 20 | .DS_Store 21 | 22 | # Grunt 23 | /build/ 24 | /node_modules/ 25 | npm-debug.log 26 | 27 | # Dev 28 | /vendor/ 29 | /dev-lib/ 30 | phpcs.xml 31 | css/*.map 32 | js/*.map 33 | /bin 34 | 35 | # Tests 36 | tests/data/ 37 | tests/includes/ 38 | coverage/html/ 39 | 40 | # ENV files 41 | .env 42 | 43 | # wp-env 44 | .wp-env.json 45 | 46 | # IDE 47 | .vscode 48 | 49 | # Testing packages 50 | cloudinary-image-management-and-manipulation-in-the-cloud-cdn 51 | cloudinary-image-management-and-manipulation-in-the-cloud-cdn.zip 52 | cloudinary-wordpress-v2.zip 53 | cloudinary-wordpress-v3.zip 54 | package/dist 55 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "workaround for deprecated jsxBracketSameLine set on @wordpress/prettier-config", 3 | "bracketSameLine": false 4 | } 5 | -------------------------------------------------------------------------------- /.release-it.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": { 3 | "@release-it/bumper": { 4 | "in": ".version" 5 | } 6 | }, 7 | "git": { 8 | "requireBranch": "master", 9 | "commitMessage": "Version ${version}", 10 | "tagName": "${version}", 11 | "tagAnnotation": "Version ${version}" 12 | }, 13 | "github": { 14 | "release": true, 15 | "releaseName": "Version ${version}", 16 | "draft": true, 17 | "tokenRef": "GITHUB_TOKEN" 18 | }, 19 | "npm": { 20 | "publish": false 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | **/css/*.css 2 | **/vendor/** 3 | **/node_modules/** 4 | **/js/*.css 5 | -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "customSyntax": "postcss-scss", 3 | "rules": { 4 | "selector-class-pattern": null 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: xenial 2 | 3 | language: php 4 | 5 | before_install: 6 | - nvm install 7 | - nvm use 8 | 9 | install: 10 | - npm ci 11 | 12 | jobs: 13 | 14 | include: 15 | 16 | - php: "5.6" 17 | script: 18 | - npm run lint 19 | - npm run build 20 | 21 | - php: "7.4" 22 | script: 23 | - npm run lint 24 | - npm run build 25 | 26 | notifications: 27 | email: false 28 | 29 | cache: 30 | npm: true 31 | directories: 32 | - "$HOME/.composer/cache" 33 | -------------------------------------------------------------------------------- /.version: -------------------------------------------------------------------------------- 1 | 3.2.8 -------------------------------------------------------------------------------- /assets/banner-1544x500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/banner-1544x500.jpg -------------------------------------------------------------------------------- /assets/banner-772x250.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/banner-772x250.jpg -------------------------------------------------------------------------------- /assets/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/icon-128x128.png -------------------------------------------------------------------------------- /assets/icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/icon-256x256.png -------------------------------------------------------------------------------- /assets/screenshot-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/screenshot-1.jpg -------------------------------------------------------------------------------- /assets/screenshot-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/screenshot-10.jpg -------------------------------------------------------------------------------- /assets/screenshot-11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/screenshot-11.jpg -------------------------------------------------------------------------------- /assets/screenshot-12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/screenshot-12.jpg -------------------------------------------------------------------------------- /assets/screenshot-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/screenshot-2.jpg -------------------------------------------------------------------------------- /assets/screenshot-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/screenshot-3.jpg -------------------------------------------------------------------------------- /assets/screenshot-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/screenshot-4.jpg -------------------------------------------------------------------------------- /assets/screenshot-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/screenshot-5.jpg -------------------------------------------------------------------------------- /assets/screenshot-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/screenshot-6.jpg -------------------------------------------------------------------------------- /assets/screenshot-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/screenshot-7.jpg -------------------------------------------------------------------------------- /assets/screenshot-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/screenshot-8.jpg -------------------------------------------------------------------------------- /assets/screenshot-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/assets/screenshot-9.jpg -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cloudinary/cloudinary-image-management-and-manipulation-in-the-cloud-cdn", 3 | "homepage": "https://wordpress.org/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/", 4 | "type": "wordpress-plugin", 5 | "license": "GPL-2.0-or-later", 6 | "require": { 7 | "ext-json": "*" 8 | }, 9 | "require-dev": { 10 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", 11 | "phpcompatibility/phpcompatibility-wp": "dev-master", 12 | "phpcompatibility/php-compatibility": "dev-develop as 9.99.99", 13 | "automattic/vipwpcs": "^3.0", 14 | "wp-coding-standards/wpcs": "^3.0" 15 | }, 16 | "config": { 17 | "platform": { 18 | "php": "5.6.20" 19 | }, 20 | "allow-plugins": { 21 | "dealerdirect/phpcodesniffer-composer-installer": true 22 | } 23 | }, 24 | "scripts": { 25 | "lint": [ 26 | "phpcs" 27 | ], 28 | "fix": [ 29 | "phpcbf" 30 | ] 31 | }, 32 | "minimum-stability": "dev" 33 | } 34 | -------------------------------------------------------------------------------- /css/fonts/cloudinary.3b839e5145ad58edde0191367a5a96f0.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/css/fonts/cloudinary.3b839e5145ad58edde0191367a5a96f0.woff -------------------------------------------------------------------------------- /css/fonts/cloudinary.d1a91c7f695026fd20974570349bc540.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/css/fonts/cloudinary.d1a91c7f695026fd20974570349bc540.eot -------------------------------------------------------------------------------- /css/fonts/cloudinary.d8de6736f15e12f71ac22a2d374002e5.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/css/fonts/cloudinary.d8de6736f15e12f71ac22a2d374002e5.ttf -------------------------------------------------------------------------------- /css/front-overlay.css: -------------------------------------------------------------------------------- 1 | .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity;white-space:normal}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}.overlay-tag{border-radius:0 0 4px 0;color:#fff;font-size:.8rem;padding:10px;position:absolute;text-align:right;z-index:9999}.overlay-tag.wp-tag{background-color:#dd2c00}.overlay-tag.cld-tag{background-color:#3448c5}[data-tippy-root] .tippy-box{max-width:none!important}[data-tippy-root] .tippy-content{background-color:#333;min-width:250px;width:auto}[data-tippy-root] .tippy-content div{border-bottom:1px solid #555;display:flex;justify-content:space-between;margin-bottom:4px;padding:4px 0}[data-tippy-root] .tippy-content .title{margin-right:50px}[data-tippy-root] .tippy-content .edit-link{color:#fff;text-align:right;width:100%} -------------------------------------------------------------------------------- /css/gallery-block-rtl.css: -------------------------------------------------------------------------------- 1 | .radio-select{align-items:center;background:none;border:none;cursor:pointer;display:flex;margin:12px 0}.radio-select:focus{color:#007cba;outline:none}.radio-select--active{color:#007cba}.radio-select--active g{fill:#007cba!important}.radio-select__label{font-size:14px;margin-left:7px}.loading-spinner-container{align-items:center;background-color:hsla(0,0%,100%,.8);display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.components-placeholder__fieldset{justify-content:start}.colorpalette-color-label{align-items:center;display:flex;margin:8px 0}.wp-block-cloudinary-gallery .block-editor-media-placeholder .components-placeholder__label .dashicon{margin-right:8px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender{margin-bottom:11px;margin-top:11px;min-height:auto;padding:11px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-button{margin-bottom:0} -------------------------------------------------------------------------------- /css/gallery-block.css: -------------------------------------------------------------------------------- 1 | .radio-select{align-items:center;background:none;border:none;cursor:pointer;display:flex;margin:12px 0}.radio-select:focus{color:#007cba;outline:none}.radio-select--active{color:#007cba}.radio-select--active g{fill:#007cba!important}.radio-select__label{font-size:14px;margin-left:7px}.loading-spinner-container{align-items:center;background-color:hsla(0,0%,100%,.8);display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.components-placeholder__fieldset{justify-content:start}.colorpalette-color-label{align-items:center;display:flex;margin:8px 0}.wp-block-cloudinary-gallery .block-editor-media-placeholder .components-placeholder__label .dashicon{margin-right:8px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender{margin-bottom:11px;margin-top:11px;min-height:auto;padding:11px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-button{margin-bottom:0} -------------------------------------------------------------------------------- /css/images/academy-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 13 | -------------------------------------------------------------------------------- /css/images/academy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/css/images/academy.jpg -------------------------------------------------------------------------------- /css/images/arrow.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/images/bandwidth.svg: -------------------------------------------------------------------------------- 1 | 2 | 16 | -------------------------------------------------------------------------------- /css/images/circular-loader.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/images/cloud.svg: -------------------------------------------------------------------------------- 1 | 2 | 14 | -------------------------------------------------------------------------------- /css/images/confetti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/css/images/confetti.png -------------------------------------------------------------------------------- /css/images/connection-string.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/css/images/connection-string.png -------------------------------------------------------------------------------- /css/images/crop.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/images/dam-icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/images/document.svg: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /css/images/documentation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/css/images/documentation.jpg -------------------------------------------------------------------------------- /css/images/gallery.svg: -------------------------------------------------------------------------------- 1 | 2 | 14 | -------------------------------------------------------------------------------- /css/images/image.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/images/learn.svg: -------------------------------------------------------------------------------- 1 | 2 | 19 | -------------------------------------------------------------------------------- /css/images/logo-icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/images/report.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/css/images/report.jpg -------------------------------------------------------------------------------- /css/images/request.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/css/images/request.jpg -------------------------------------------------------------------------------- /css/images/requests.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/images/sample.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/css/images/sample.webp -------------------------------------------------------------------------------- /css/images/star.svg: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /css/images/units-plus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/images/units.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/images/upload.svg: -------------------------------------------------------------------------------- 1 | 2 | 12 | -------------------------------------------------------------------------------- /css/images/video.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/images/wizard-welcome.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/css/images/wizard-welcome.jpg -------------------------------------------------------------------------------- /css/video.css: -------------------------------------------------------------------------------- 1 | .cld-video-player{max-width:100%} -------------------------------------------------------------------------------- /instance.php: -------------------------------------------------------------------------------- 1 | setup_cloudinary( $plugin_instance ); 42 | \WP_CLI::add_command( 'cloudinary', $cli ); 43 | } 44 | -------------------------------------------------------------------------------- /js/block-editor.asset.php: -------------------------------------------------------------------------------- 1 | array('react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => 'acdb83aa5cf9c0e8d936'); 2 | -------------------------------------------------------------------------------- /js/deactivate.asset.php: -------------------------------------------------------------------------------- 1 | array(), 'version' => '9b53a10d854ad5c7f5db'); 2 | -------------------------------------------------------------------------------- /js/gallery-block-rtl.css: -------------------------------------------------------------------------------- 1 | .radio-select{align-items:center;background:none;border:none;cursor:pointer;display:flex;margin:12px 0}.radio-select:focus{color:#007cba;outline:none}.radio-select--active{color:#007cba}.radio-select--active g{fill:#007cba!important}.radio-select__label{font-size:14px;margin-right:7px}.loading-spinner-container{align-items:center;background-color:hsla(0,0%,100%,.8);display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;width:100%}.components-placeholder__fieldset{justify-content:start}.colorpalette-color-label{align-items:center;display:flex;margin:8px 0}.wp-block-cloudinary-gallery .block-editor-media-placeholder .components-placeholder__label .dashicon{margin-left:8px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender{margin-bottom:11px;margin-top:11px;min-height:auto;padding:11px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-button{margin-bottom:0} -------------------------------------------------------------------------------- /js/gallery-block.asset.php: -------------------------------------------------------------------------------- 1 | array('react', 'react-dom', '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' => 'ea4c3028b39e34cf467e'); 2 | -------------------------------------------------------------------------------- /js/gallery-block.css: -------------------------------------------------------------------------------- 1 | .radio-select{align-items:center;background:none;border:none;cursor:pointer;display:flex;margin:12px 0}.radio-select:focus{color:#007cba;outline:none}.radio-select--active{color:#007cba}.radio-select--active g{fill:#007cba!important}.radio-select__label{font-size:14px;margin-left:7px}.loading-spinner-container{align-items:center;background-color:hsla(0,0%,100%,.8);display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.components-placeholder__fieldset{justify-content:start}.colorpalette-color-label{align-items:center;display:flex;margin:8px 0}.wp-block-cloudinary-gallery .block-editor-media-placeholder .components-placeholder__label .dashicon{margin-right:8px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender{margin-bottom:11px;margin-top:11px;min-height:auto;padding:11px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-button{margin-bottom:0} -------------------------------------------------------------------------------- /js/gallery-init.asset.php: -------------------------------------------------------------------------------- 1 | array(), 'version' => '9059e1b247b2da07446d'); 2 | -------------------------------------------------------------------------------- /js/gallery-init.js: -------------------------------------------------------------------------------- 1 | (()=>{const{galleryWidget:e}=cloudinary;window.addEventListener("load",(function(){document.querySelector(".woocommerce-page")&&CLD_GALLERY_CONFIG&&CLD_GALLERY_CONFIG?.mediaAssets?.length&&e(CLD_GALLERY_CONFIG).render()}))})(); -------------------------------------------------------------------------------- /js/gallery-ui.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/js/gallery-ui.js -------------------------------------------------------------------------------- /js/gallery.asset.php: -------------------------------------------------------------------------------- 1 | array('react', 'react-dom', 'react-jsx-runtime', 'wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'e75fb83a26e8f73a40ea'); 2 | -------------------------------------------------------------------------------- /js/inline-loader.asset.php: -------------------------------------------------------------------------------- 1 | array(), 'version' => 'e82dd225edea94edf605'); 2 | -------------------------------------------------------------------------------- /js/lazy-load.asset.php: -------------------------------------------------------------------------------- 1 | array(), 'version' => 'f89102869f47abf4e354'); 2 | -------------------------------------------------------------------------------- /js/media-modal.asset.php: -------------------------------------------------------------------------------- 1 | array(), 'version' => 'a833cdbcaab9d93c37cf'); 2 | -------------------------------------------------------------------------------- /js/terms-order.asset.php: -------------------------------------------------------------------------------- 1 | array(), 'version' => 'e790e76b04c6884f87d1'); 2 | -------------------------------------------------------------------------------- /js/video-init.asset.php: -------------------------------------------------------------------------------- 1 | array(), 'version' => 'aefe496c15539471a301'); 2 | -------------------------------------------------------------------------------- /js/video-init.js: -------------------------------------------------------------------------------- 1 | !function(){if("undefined"!=typeof cldVideos){cldVideos=JSON.parse(cldVideos);for(const e in cldVideos){const d=cldVideos[e],o="cloudinary-video-"+e;cld.videoPlayer(o,d)}window.addEventListener("load",(function(){for(const e in cldVideos){const d="cloudinary-video-"+e;let o=document.getElementById(d).getElementsByTagName("video");1===o.length&&(o=o[0],o.style.width="100%",videoFreeForm&&-1===o.src.indexOf(videoFreeForm)&&!cldVideos[e].overwrite_transformations&&(o.src=o.src.replace("upload/","upload/"+videoFreeForm+"/")))}}))}}(); -------------------------------------------------------------------------------- /js/video.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudinary/cloudinary_wordpress/5cc3d20aef81e6cf155ebe1c7ff786500a42c956/js/video.js -------------------------------------------------------------------------------- /package/package.php: -------------------------------------------------------------------------------- 1 | no_update ) ) { 39 | if ( ! empty( $data->no_update[ $slug ] ) ) { 40 | $data->no_update[ $slug ]->package = $file; 41 | $data->no_update[ $slug ]->new_version = $version; 42 | $data->response[ $slug ] = $data->no_update[ $slug ]; 43 | unset( $data->no_update[ $slug ] ); 44 | deactivate_plugins( $this_plugin ); 45 | } 46 | } 47 | // Add if available. 48 | if ( ! empty( $data->response ) ) { 49 | $slug = 'cloudinary-image-management-and-manipulation-in-the-cloud-cdn/cloudinary.php'; 50 | if ( ! empty( $data->response[ $slug ] ) ) { 51 | $data->response[ $slug ]->package = $file; 52 | $data->response[ $slug ]->new_version = $version; 53 | $data->response[ $slug ] = $data->response[ $slug ]; 54 | deactivate_plugins( $this_plugin ); 55 | } 56 | } 57 | 58 | return $data; 59 | } 60 | 61 | add_filter( 'pre_set_site_transient_update_plugins', 'cld_test_check_update', 100 ); 62 | 63 | /** 64 | * Delete the update transient on activation. 65 | */ 66 | function cld_test_init_update() { 67 | delete_site_transient( 'update_plugins' ); 68 | } 69 | 70 | register_activation_hook( __FILE__, 'cld_test_init_update' ); 71 | -------------------------------------------------------------------------------- /package/package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Set the working directory to the repository root. 4 | PROJECT_ROOT_DIR="$(git rev-parse --show-toplevel)" 5 | 6 | # Set the working directory to the package root. 7 | PACKAGE_DIR="$PROJECT_ROOT_DIR/package" 8 | 9 | # Set the working directory to dist root. 10 | DIST_DIR="$PACKAGE_DIR/dist" 11 | 12 | # Set the working directory to the update tester. 13 | TESTER_DIR="$DIST_DIR/cloudinary-update-tester" 14 | 15 | # Get started. 16 | echo -e "\033[1;32m>> Start new build package.\033[0m" 17 | 18 | # Ensure we start from scratch. 19 | rm -rf "$DIST_DIR" 20 | mkdir -p "$TESTER_DIR" 21 | 22 | # Prepare the update tester plugin. 23 | cp "$PACKAGE_DIR/package.php" "$TESTER_DIR/cloudinary-update-tester.php" 24 | 25 | # Change to project root directory. 26 | cd "$PROJECT_ROOT_DIR" || exit 27 | 28 | # Build the release. 29 | npm install 30 | npm run package:build 31 | 32 | # All good. 33 | echo -e "☁️ \033[1;32mNew build package files is complete.\033[0m ☀️" 34 | -------------------------------------------------------------------------------- /php/class-cli-vip.php: -------------------------------------------------------------------------------- 1 | queries = array(); 30 | if ( is_object( $wp_object_cache ) ) { 31 | $wp_object_cache->group_ops = array(); 32 | $wp_object_cache->stats = array(); 33 | $wp_object_cache->memcache_debug = array(); 34 | $wp_object_cache->cache = array(); 35 | if ( method_exists( $wp_object_cache, '__remoteset' ) ) { 36 | $wp_object_cache->__remoteset(); 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /php/class-exception.php: -------------------------------------------------------------------------------- 1 | plugin = $plugin; 34 | } 35 | 36 | /** 37 | * Register assets to be used for the class. 38 | */ 39 | public function register_assets() { 40 | } 41 | 42 | /** 43 | * Enqueue Assets 44 | */ 45 | public function enqueue_assets() { 46 | } 47 | 48 | /** 49 | * Check if the extension is active on the page (for assets to be loaded). 50 | * 51 | * @return bool|void 52 | */ 53 | public function is_active() { 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /php/class-media-library.php: -------------------------------------------------------------------------------- 1 | handle = add_menu_page( 42 | __( 'Cloudinary Media Library', 'cloudinary' ), 43 | __( 'Cloudinary DAM', 'cloudinary' ), 44 | Utils::user_can( 'manage_dam' ) ? 'exist' : false, 45 | self::MEDIA_LIBRARY_SLUG, 46 | array( $this, 'render' ), 47 | 'dashicons-cloudinary-dam', 48 | '81.6' 49 | ); 50 | } 51 | 52 | /** 53 | * Render the page template. 54 | */ 55 | public function render() { 56 | require CLDN_PATH . 'ui-definitions/components/media-library.php'; 57 | } 58 | 59 | /** 60 | * Check if this class is active. 61 | * 62 | * @return bool True if active False if not. 63 | */ 64 | public function is_active() { 65 | $screen = get_current_screen(); 66 | 67 | return $screen instanceof WP_Screen && $screen->base === $this->handle; 68 | } 69 | 70 | /** 71 | * Register assets to be used for the class. 72 | */ 73 | public function register_assets() { 74 | } 75 | 76 | /** 77 | * Enqueue Assets 78 | */ 79 | public function enqueue_assets() { 80 | $media = $this->plugin->get_component( 'media' ); 81 | wp_enqueue_script( 'cloudinary' ); 82 | 83 | $params = array( 84 | 'fetch_url' => Utils::rest_url( REST_API::BASE . '/asset' ), 85 | 'nonce' => wp_create_nonce( 'wp_rest' ), 86 | ); 87 | 88 | $this->plugin->add_script_data( 'dam', $params ); 89 | $media->editor_assets(); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /php/component/class-assets.php: -------------------------------------------------------------------------------- 1 | get_lock_file_name( $file ) ); 32 | } 33 | 34 | /** 35 | * Get the lock name. 36 | * 37 | * @param string|null $file_name The name of the transient. 38 | * 39 | * @return mixed|string|null 40 | */ 41 | public function get_lock_file_name( $file_name = null ) { 42 | if ( null === $file_name ) { 43 | $file_name = 'cron-run'; 44 | } 45 | 46 | return $file_name; 47 | } 48 | 49 | /** 50 | * Check if a lock is in place. 51 | * 52 | * @param string|null $file The lock name. 53 | * 54 | * @return bool 55 | */ 56 | public function has_lock_file( $file = null ) { 57 | return ! empty( $this->get_lock_file( $file ) ); 58 | } 59 | 60 | /** 61 | * Set a lock. 62 | * 63 | * @param string|null $file The name to set. 64 | * @param mixed $data The data to set. 65 | * 66 | * @return mixed|string 67 | */ 68 | public function set_lock_file( $file = null, $data = null ) { 69 | $time = time(); 70 | $bits = $data ? json_decode( $data, true ) : uniqid( $time ); 71 | if ( ! $this->has_lock_file( $file ) ) { 72 | set_transient( self::PREFIX . $this->get_lock_file_name( $file ), $bits, Cron::$daemon_watcher_interval ); 73 | } 74 | 75 | return $bits; 76 | } 77 | 78 | /** 79 | * Delete a lock. 80 | * 81 | * @param string|null $file The name to set. 82 | */ 83 | public function delete_lock_file( $file = null ) { 84 | delete_transient( self::PREFIX . $this->get_lock_file_name( $file ) ); 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /php/integrations/class-integrations.php: -------------------------------------------------------------------------------- 1 | can_enable() ) { 30 | return; 31 | } 32 | 33 | $this->plugin = $plugin; 34 | $this->register_hooks(); 35 | } 36 | 37 | /** 38 | * Check if the integration can be enabled. 39 | * 40 | * @return bool 41 | */ 42 | abstract public function can_enable(); 43 | 44 | /** 45 | * Register hooks for the integration. 46 | */ 47 | abstract public function register_hooks(); 48 | } 49 | -------------------------------------------------------------------------------- /php/misc/class-image-sizes-no-textdomain.php: -------------------------------------------------------------------------------- 1 | __( 'Thumbnail' ), 29 | 'medium' => __( 'Medium' ), 30 | 'medium_large' => __( 'Medium Large' ), 31 | 'large' => __( 'Large' ), 32 | 'full' => __( 'Full Size' ), 33 | // phpcs:enable WordPress.WP.I18n.MissingArgDomain 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /php/settings/storage/class-options.php: -------------------------------------------------------------------------------- 1 | prefix( $slug ), $this->get( $slug ), false ); 39 | } 40 | 41 | /** 42 | * Delete the data from storage source. 43 | * 44 | * @param string $slug The slug of the setting storage to delete. 45 | * 46 | * @return bool 47 | */ 48 | public function delete( $slug ) { 49 | return delete_option( $this->prefix( $slug ) ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /php/settings/storage/class-post-meta.php: -------------------------------------------------------------------------------- 1 | media = $plugin->get_component( 'media' ); 37 | } 38 | 39 | /** 40 | * Load the data from storage source. 41 | * 42 | * @param string $prefixed_slug The slug to load. 43 | * 44 | * @return mixed 45 | */ 46 | protected function load( $prefixed_slug ) { 47 | $post = get_post(); 48 | $data = null; 49 | 50 | if ( $post instanceof WP_Post ) { 51 | $data = $this->media->get_post_meta( $post->ID, $prefixed_slug, true ); 52 | } 53 | 54 | return $data; 55 | } 56 | 57 | /** 58 | * Save the data to storage source. 59 | * 60 | * @param string $slug The slug of the setting storage to save. 61 | * 62 | * @return bool 63 | */ 64 | public function save( $slug ) { 65 | $save = false; 66 | $post = get_post(); 67 | 68 | if ( $post instanceof WP_Post ) { 69 | $save = $this->media->update_post_meta( $post->ID, $this->prefix( $slug ), $this->get( $slug ) ); 70 | } 71 | 72 | return $save; 73 | } 74 | 75 | /** 76 | * Delete the data from storage source. 77 | * 78 | * @param string $slug The slug of the setting storage to delete. 79 | * 80 | * @return bool 81 | */ 82 | public function delete( $slug ) { 83 | $delete = false; 84 | $post = get_post(); 85 | 86 | if ( $post instanceof WP_Post ) { 87 | $delete = $this->media->delete_post_meta( $post->ID, $this->prefix( $slug ) ); 88 | } 89 | 90 | return $delete; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /php/settings/storage/class-transient.php: -------------------------------------------------------------------------------- 1 | prefix( $slug ); 39 | if ( empty( $this->data[ $prefixed_slug ] ) ) { 40 | return $this->delete( $prefixed_slug ); 41 | } 42 | 43 | return set_transient( $prefixed_slug, $this->get( $slug ) ); 44 | } 45 | 46 | /** 47 | * Delete the data from storage source. 48 | * 49 | * @param string $slug The slug of the setting storage to delete. 50 | * 51 | * @return bool 52 | */ 53 | public function delete( $slug ) { 54 | return delete_transient( $this->prefix( $slug ) ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /php/templates/blank-template.php: -------------------------------------------------------------------------------- 1 | dir_url; 9 | ?> 10 | 11 |
15 | ', 23 | esc_attr__( 'Create here a free Cloudinary account', 'cloudinary' ) 24 | ), 25 | '' 26 | ) 27 | ); 28 | ?> 29 |
30 |',
48 | '
',
49 | '