diff --git a/.distignore b/.distignore index a9aebe3..8daf8fd 100644 --- a/.distignore +++ b/.distignore @@ -1,28 +1,49 @@ # A set of files you probably don't want in your WordPress.org distribution +*.sql +*.tar.gz +*.yml +*.zip +.DS_Store +.babelrc +.deployignore .distignore .editorconfig +.env +.env.dist +.env.testing.dist +.eslintignore +.eslintrc .git +.gitattributes +.github .gitignore .gitlab-ci.yml +.idea +.log .travis.yml -.DS_Store +.vscode +.wordpress-org +/docker +/docs +/phpstan +/plugin-build +Gruntfile.js +README.md Thumbs.db behat.yml bin +c3.php circle.yml composer.json composer.lock -Gruntfile.js +multisite.xml +multisite.xml.dist +node_modules package.json +packages +phpcs.xml.dist +phpstan.neon.dist phpunit.xml phpunit.xml.dist -multisite.xml -multisite.xml.dist -phpcs.ruleset.xml -README.md -wp-cli.local.yml tests -node_modules -*.sql -*.tar.gz -*.zip +wp-cli.local.yml diff --git a/.github/workflows/deploy-to-github.yml b/.github/workflows/deploy-to-github.yml index 64ee21a..e921414 100644 --- a/.github/workflows/deploy-to-github.yml +++ b/.github/workflows/deploy-to-github.yml @@ -21,16 +21,15 @@ jobs: - name: Create Artifact run: | - mkdir plugin-build - composer archive -vvv --format=zip --file="plugin-build/wp-graphql-acf" + composer run-script zip - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: wp-graphql-acf - path: plugin-build/wp-graphql-acf.zip + name: wpgraphql-acf + path: plugin-build/wpgraphql-acf.zip - name: Upload release asset to github uses: softprops/action-gh-release@v1 with: - files: plugin-build/wp-graphql-acf.zip + files: plugin-build/wpgraphql-acf.zip diff --git a/.github/workflows/testing-integration.yml b/.github/workflows/testing-integration.yml index da9160a..9808d77 100644 --- a/.github/workflows/testing-integration.yml +++ b/.github/workflows/testing-integration.yml @@ -21,7 +21,7 @@ jobs: php: [ '8.1', '8.0' ] wordpress: [ '6.2', '6.1' ] acf_pro: [ true, false ] - acf_version: [ 5.12.4, 6.1.6 ] + acf_version: [ 5.12.4, 6.1.8 ] include: - php: '8.1' wordpress: '6.1' diff --git a/.wordpress-org/banner-1544x500.png b/.wordpress-org/banner-1544x500.png new file mode 100644 index 0000000..1d06b7f Binary files /dev/null and b/.wordpress-org/banner-1544x500.png differ diff --git a/.wordpress-org/banner-772x250.png b/.wordpress-org/banner-772x250.png new file mode 100644 index 0000000..c98d1f3 Binary files /dev/null and b/.wordpress-org/banner-772x250.png differ diff --git a/.wordpress-org/icon-128x128.png b/.wordpress-org/icon-128x128.png new file mode 100644 index 0000000..b0a7b76 Binary files /dev/null and b/.wordpress-org/icon-128x128.png differ diff --git a/.wordpress-org/icon-256x256.png b/.wordpress-org/icon-256x256.png new file mode 100644 index 0000000..b0f103f Binary files /dev/null and b/.wordpress-org/icon-256x256.png differ diff --git a/.wordpress-org/screenshot-1.jpg b/.wordpress-org/screenshot-1.jpg new file mode 100644 index 0000000..3ebe8b7 Binary files /dev/null and b/.wordpress-org/screenshot-1.jpg differ diff --git a/.wordpress-org/screenshot-2.jpg b/.wordpress-org/screenshot-2.jpg new file mode 100644 index 0000000..220be12 Binary files /dev/null and b/.wordpress-org/screenshot-2.jpg differ diff --git a/CHANGELOG.md b/CHANGELOG.md index abb16cf..d9c8b17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 2.0.0-beta.4.1.0 + +### Chores / Bugfixes + +- [#77](https://github.com/wp-graphql/wpgraphql-acf/pull/77): fix: js error when clone fields are added to a field group. + ## v2.0.0-beta.4.0.0 ### Breaking Changes diff --git a/composer.json b/composer.json index 6509a8b..807e33b 100644 --- a/composer.json +++ b/composer.json @@ -71,6 +71,7 @@ ], "build-app": "@docker-build -a", "build-test": "@docker-build -t", + "build-plugin": "composer install --no-dev && composer run-script zip && composer install", "run-app": "@docker-run -a", "run-test": "@docker-run -t", "lint": "vendor/bin/phpcs", @@ -85,19 +86,12 @@ ], "phpstan": [ "phpstan analyze --ansi --memory-limit=1G" - ] - }, - "archive": { - "exclude": [ - "*.yml", - "!vendor/", - "plugin-build/", - "node_modules/", - "!.wordpress-org/", - "docs/", - "wp-graphql.zip", - "!build", - "packages" + ], + "zip": [ + "mkdir -p plugin-build/wpgraphql-acf", + "rsync -rc --exclude-from=.distignore --exclude=plugin-build . plugin-build/wpgraphql-acf/ --delete --delete-excluded -v", + "cd plugin-build ; zip -r wpgraphql-acf.zip wpgraphql-acf", + "rm -rf plugin-build/wpgraphql-acf/" ] } } diff --git a/readme.txt b/readme.txt index 812e353..e9f8700 100644 --- a/readme.txt +++ b/readme.txt @@ -1,4 +1,4 @@ -=== WPGraphQL for Advanced Custom Fields === +=== WPGraphQL ACF === Contributors: jasonbahl, wpgraphql Tags: GraphQL, ACF, Advanced Custom Fields, API, NextJS, Faust, Headless, Decoupled, React, Vue, Svelte, Vue, Apollo, JSON, REST Requires at least: 6.0 diff --git a/src/assets/admin/js/main.js b/src/assets/admin/js/main.js index a2a3cb4..31f6ce1 100644 --- a/src/assets/admin/js/main.js +++ b/src/assets/admin/js/main.js @@ -33,8 +33,8 @@ $j(document).ready(function () { return; } - var $graphqlFieldName = field.$setting('graphql_field_name'); - var graphqlFieldName = acf.getInstance($graphqlFieldName).getValue(); + var $graphqlFieldName = field?.$setting('graphql_field_name'); + var graphqlFieldName = acf?.getInstance($graphqlFieldName)?.getValue() ?? ''; if ( graphqlFieldName === '' ) { var sanitizedGraphqlFieldName = acf.strCamelCase( acf.strSanitize(name) ); diff --git a/wp-graphql-acf.php b/wp-graphql-acf.php index 59afebf..86073f7 100644 --- a/wp-graphql-acf.php +++ b/wp-graphql-acf.php @@ -1,10 +1,10 @@ insights(); // If the Appsero client has the add_plugin_data method, use it - if ( method_exists( $insights, 'add_plugin_data' ) ) { + if (method_exists($insights, 'add_plugin_data')) { // @phpstan-ignore-next-line $insights->add_plugin_data(); } @@ -77,4 +79,4 @@ function graphql_acf_init_appsero_telemetry() { $insights->init(); } -graphql_acf_init_appsero_telemetry(); +graphql_acf_init_appsero_telemetry(); \ No newline at end of file