├── .distignore ├── .env.testing ├── .lando.yml ├── LICENSE ├── README.md ├── assets ├── css │ ├── bea-csf-admin-add.css │ ├── bea-csf-admin-edit.css │ ├── bea-csf-admin-notifications.css │ └── bea-csf-admin.css └── js │ ├── bea-csf-admin-add.js │ ├── bea-csf-admin-client.js │ ├── bea-csf-admin-notifications.js │ └── lou-multi-select │ ├── LICENSE.txt │ ├── README.markdown │ ├── bower.json │ ├── css │ └── multi-select.css │ ├── img │ └── switch.png │ ├── js │ └── jquery.multi-select.js │ └── multi-select.jquery.json ├── bea-content-sync-fusion.php ├── classes ├── addons │ ├── advanced-custom-fields-exclusion.php │ ├── advanced-custom-fields.php │ ├── events-calendar-series.php │ ├── gutenberg.php │ ├── multisite-clone-duplicator.php │ ├── polylang.php │ ├── post-types-order.php │ ├── revisionize.php │ ├── woocommerce.php │ ├── woocommerce │ │ ├── product-attributes.php │ │ ├── product-variation.php │ │ └── product.php │ └── yoast-seo.php ├── admin │ ├── admin-blog.php │ ├── admin-client-metaboxes.php │ ├── admin-dashboard-widgets.php │ ├── admin-list.php │ ├── admin-metaboxes.php │ ├── admin-notifications.php │ ├── admin-restrictions.php │ ├── admin-synchronizations-network.php │ ├── admin-terms-metaboxes.php │ └── admin-terms.php ├── cli │ ├── _helper.php │ ├── flush.php │ ├── migration.php │ ├── queue.php │ ├── relation.php │ └── resync.php ├── client-relations.php ├── client.php ├── client │ ├── attachment.php │ ├── p2p.php │ ├── post_type.php │ └── taxonomy.php ├── media.php ├── models │ ├── async.php │ ├── relations.php │ ├── synchronization.php │ └── synchronizations.php ├── multisite.php ├── plugin.php ├── query.php ├── seo.php └── server │ ├── attachment.php │ ├── p2p.php │ ├── post_type.php │ └── taxonomy.php ├── codeception.dist.yml ├── composer.json ├── composer.lock ├── cron └── cronjob.sh ├── functions ├── api.php └── template.php ├── grumphp.yml ├── languages ├── bea-content-sync-fusion-fr_FR.mo ├── bea-content-sync-fusion-fr_FR.po └── bea-content-sync-fusion.pot ├── views └── admin │ ├── blog-widget-list.php │ ├── blog-widget-status.php │ ├── client-metabox.php │ ├── client-page-settings-notification.php │ ├── client-terms-form.php │ ├── server-metabox-attachment.php │ ├── server-metabox-auto.php │ ├── server-metabox-manual.php │ ├── server-page-add.php │ ├── server-page-queue.php │ ├── server-page-settings.php │ └── server-term-metabox-manual.php └── wp-cli.yml /.distignore: -------------------------------------------------------------------------------- 1 | .git 2 | .github 3 | .gitignore 4 | bin 5 | .idea 6 | .distignore 7 | .DS_Store 8 | .stickler.yml 9 | composer.json 10 | composer.lock 11 | README.md 12 | tests -------------------------------------------------------------------------------- /.env.testing: -------------------------------------------------------------------------------- 1 | TEST_SITE_DB_DSN=mysql:host=test;dbname=test 2 | TEST_SITE_DB_HOST=test 3 | TEST_SITE_DB_NAME=test 4 | TEST_SITE_DB_USER=test 5 | TEST_SITE_DB_PASSWORD=test 6 | TEST_SITE_TABLE_PREFIX=wp_ 7 | TEST_SITE_ADMIN_USERNAME=admin 8 | TEST_SITE_ADMIN_PASSWORD=admin 9 | TEST_SITE_WP_ADMIN_PATH=/wp-admin 10 | WP_ROOT_FOLDER=/app/wordpress/ 11 | TEST_DB_NAME=test 12 | TEST_DB_HOST=test 13 | TEST_DB_USER=test 14 | TEST_DB_PASSWORD=test 15 | TEST_TABLE_PREFIX=wp_ 16 | TEST_SITE_WP_URL=https://bea-content-sync-fusion.lndo.site 17 | TEST_SITE_WP_DOMAIN=bea-content-sync-fusion.lndo.site 18 | TEST_SITE_ADMIN_EMAIL=admin@admin.fr 19 | -------------------------------------------------------------------------------- /.lando.yml: -------------------------------------------------------------------------------- 1 | name: bea-content-sync-fusion 2 | recipe: wordpress 3 | config: 4 | webroot: ./wordpress/ 5 | env: 6 | - .env.testing 7 | services: 8 | appserver: 9 | run_as_root: 10 | - ln -s /app/ /app/wordpress/wp-content/plugins/bea-content-sync-fusion 11 | test: 12 | type: mysql:5.7 13 | portforward: true 14 | creds: 15 | user: test 16 | password: test 17 | database: test 18 | events: 19 | # Runs composer install and a custom php script before your app starts 20 | pre-start: 21 | - appserver: cd $LANDO_MOUNT && composer install 22 | tooling: 23 | setup: 24 | service: appserver 25 | description: 'Setup env' 26 | cmd: 27 | - echo "➡️ Reset DB ?" 28 | - if [ -f /app/wordpress/wp-config.php ]; then echo "wp-config exists reset DB" && wp db reset --yes --path=/app/wordpress ; else echo "No wp-config.php, no reset" ; fi 29 | - echo "➡️ Reset config" 30 | - if [ -f /app/wordpress/wp-config.php ]; then echo "wp-config exists deleting it" && rm -f /app/wordpress/wp-config.php; else echo "No wp-config.php, no rm" ; fi 31 | - echo "➡️ Create config" 32 | - wp config create --dbname=wordpress --dbuser=wordpress --dbpass=wordpress --dbhost=database --path=/app/wordpress 33 | - echo "➡️ Install WP" 34 | - wp core multisite-install --url=https://bea-content-sync-fusion.lndo.site --title="Content sync fusion" --admin_password=admin --admin_email=admin@admin.fr --path=wordpress --skip-email 35 | - echo "➡️ Install query monitor" 36 | - wp plugin install --activate-network query-monitor 37 | - echo "➡️ Activate plugin" 38 | - wp plugin activate --network bea-content-sync-fusion 39 | - echo "➡️ Add new sites" 40 | - wp site create --slug=site-1 --title="Site 1" 41 | - wp site create --slug=site-2 --title="Site 2" 42 | - wp site create --slug=site-3 --title="Site 3" 43 | - wp site create --slug=site-4 --title="Site 4" 44 | - echo "➡️ Copye .htaccess" 45 | - cp /app/tests/bin/htaccess /app/wordpress/.htaccess 46 | test-unit: 47 | service: appserver 48 | cmd: composer test-unit 49 | description: Run our PHPunit tests 50 | test-wpunit: 51 | service: appserver 52 | cmd: composer test-wpunit 53 | description: Run our wpunit tests 54 | test-acceptance: 55 | service: appserver 56 | cmd: composer test-acceptance 57 | description: Run our acceptance tests 58 | test-functional: 59 | service: appserver 60 | cmd: composer test-functional 61 | description: Run our functional tests -------------------------------------------------------------------------------- /assets/css/bea-csf-admin-add.css: -------------------------------------------------------------------------------- 1 | /* Multiselect JS helper */ 2 | .ms-container { width:100%; } 3 | .custom-header { text-align: center;font-weight:700;} 4 | 5 | /* Form */ 6 | form p label { font-size:17px;display:block; margin:0 0 5px; } 7 | form p { padding:5px 0;border-bottom:1px solid #ccc; } 8 | .description { display:block; margin:5px 0; } -------------------------------------------------------------------------------- /assets/css/bea-csf-admin-edit.css: -------------------------------------------------------------------------------- 1 | .locked-content a { 2 | color: #333; 3 | cursor: default; 4 | } -------------------------------------------------------------------------------- /assets/css/bea-csf-admin-notifications.css: -------------------------------------------------------------------------------- 1 | /* Multiselect JS helper */ 2 | .ms-container { width:100%; } 3 | .custom-header { text-align: center;font-weight:700;} -------------------------------------------------------------------------------- /assets/css/bea-csf-admin.css: -------------------------------------------------------------------------------- 1 | .bea-csf-acf-exclusion { 2 | display: block; 3 | text-align: right; 4 | float: right; 5 | } -------------------------------------------------------------------------------- /assets/js/bea-csf-admin-add.js: -------------------------------------------------------------------------------- 1 | jQuery('.multiple-helper').multiSelect({ 2 | selectableHeader: "