Wordpress Plugin Boilerplate but Powered with examples and a generator!

Overview

WordPress Plugin Boilerplate Powered

Logo

Backers on Open Collective Sponsors on Open Collective

WordPress Plugin Boilerplate Powered is a complete foundation for building your WordPress plugins following PSR-4 standard.
The project history is part of the Wiki that also includes the workflow and how it is organized.

Every experienced WordPress developer uses always the same libraries (or snippets) but at the same time follows best practices.
Choose a library or a snippet and the boilerplate (with the help of the Code Generator) will generate everything without the need of manual copy&paste way or searching on the Internet!

Features

Available Libraries and other stuff

  • Code Generator to start development
  • Sass support and Grunt (not mandatory because the generator can remove them)
  • PSR-4 support by Composer but extended to load classes based on request type and folder structure
  • Tools integrated like GrumpPHP (automatically on commit) and PHPStan
  • GitHub Action and GitLab CI available
  • Many libraries already available (with starter code)
WPBP Libraries Other libraries
WPBP/PointerPlus CMB2/CMB2
WPBP/CronPlus micropackage/requirements
WPBP/Widgets-Helper yoast/i18n-module
WPBP/FakePage origgami/CMB2-grid
WPBP/Template johnbillion/extended-cpts
WPBP/Debug Freemius/wordpress-sdk
WPBP/CPT_Columns wpdesk/wp-notice
WPBP/Language julien731/WP-Review-Me
stevegrunwell/wp-cache-remember
Seravo/wp-custom-bulk-actions
yahnis-elsts/plugin-update-checker
AyeCode/wp-super-duper
decodelabs/tagged

Available Snippets

  • Dashicons as dependency of admin stylesheet
  • Bubble notification on pending CPTs
  • Import/Export settings
  • Custom capabilities with CPTs and taxonomy support
  • wp_localize_script for passing PHP variables to JavaScript on the frontend
  • Class in frontend body with the slug of plugin
  • Shortcode example included
  • WP-CLI support
  • Support for CMB2 in the options page
  • Transient examples with caching

Do you want to see which plugins have been made with this boilerplate? Check out this Wiki page!

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! πŸ™ [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

WordPress Plugin Boilerplate Powered is licensed under the GPL v3 or later; however, if you opt-in to use third-party code that is not compatible with v3, then you may need to switch to using code that is GPL v3 compatible.

Comments
  • pll__ in get_string doesn't work if my plugin call it before Polylang set it

    pll__ in get_string doesn't work if my plugin call it before Polylang set it

    Te lo scrivo in italiano che faccio prima, la funzione get_string non ritorna la stringa tradotta se Γ¨ richiamata prima che questa venga settata da Polylang, se ti viene in mente una soluzione bene, se no comunque ci lavoro io e poi te la passo.

    Un esempio veloce, stessa istanza, in __construct non becca la stringa di pll, in una funzione appesa a wp_footer la becca senza problemi. (Il plugin Γ¨ Italy Cookie Choices, forse anche perchΓ© viene caricato in ordine alfabetico?)

    Al max setto la variabile in una funzione e la appendo prima di wp_footer

    opened by overclokk 14
  • activate/deactivate methods not fired

    activate/deactivate methods not fired

    the activation/deactivation functions are not called any idea why ? the constructor is run

    register_activation_hook(__FILE__, [ $this, 'activate' ]);
    register_deactivation_hook(__FILE__, [ $this, 'deactivate' ]);
    
    question 
    opened by quasiperfect 13
  • Introduce CI

    Introduce CI

    • [x] Fix Composer config #161
    • [x] Set up PHPStan #163
    • [x] Choose a Coding Standard #166
    • [x] Enable CI #168

    I mean CI for this repo, not CI for plugins made from this repo.

    @Mte90 What CS would you follow in PHP code? PSR-12, WPCS, Neutron, other?

    opened by szepeviktor 12
  • Errors when generating / activating a plugin

    Errors when generating / activating a plugin

    Hi, I just generated a standard wpbp.json inside wp-content/plugins/:

    {
      "plugin": {
        "name": "Name",
        "version": "0.1.0"
      },
      "author": {
        "name": "Me",
        "email": "[email protected]",
        "url": "http://[email protected]",
        "license": "GPL 2.0+",
        "copyright": "2019 Me Ltd."
      },
      "public-assets": {
        "js": "true",
        "css": "true"
      },
      "act-deact": {
        "actdeact": "true",
        "uninstall": "true"
      },
      "admin-assets": {
        "admin-js": "true",
        "admin-css": "true",
        "settings-js": "true",
        "settings-css": "true",
        "admin-page": "true"
      },
      "ajax": {
        "public": "true",
        "admin": "true"
      },
      "git-repo": "true",
      "coffeescript": "true",
      "grunt": "true",
      "grumphp": "true",
      "phpcs-standard": "https://raw.githubusercontent.com/CodeAtCode/CodeatCS/master/codeat.xml",
      "unit-test": "true",
      "wpcli": "true",
      "language-files": "true",
      "libraries": [
        "Freemius/wordpress-sdk",
        "julien731/WP-Dismissible-Notices-Handler",
        "julien731/WP-Review-Me",
        "nathanielks/wp-admin-notice",
        "origgami/CMB2-grid",
        "mte90/wp-contextual-help",
        "WebDevStudios/CMB2",
        "johnbillion/extended-cpts",
        "stevegrunwell/wp-cache-remember",
        "WPBP/CPT_Columns",
        "WPBP/CronPlus",
        "WPBP/Debug",
        "WPBP/FakePage",
        "WPBP/Language",
        "WPBP/PointerPlus",
        "WPBP/Requirements",
        "WPBP/Template",
        "WPBP/Widgets-Helper",
        "WPBP/Backbone-Modal-View",
        "Yoast/i18n-module",
        "Yoast/whip"
      ],
      "snippet": {
        "backend": [
          "bubble-notification-pending-cpt",
          "dashboard-activity",
          "donate-link-plugin-list",
          "impexp-settings"
        ],
        "frontend": [
          "body-class",
          "cpt-search-support",
          "wp-localize-script",
          "shortcode",
          "template-system"
        ],
        "system": [
          "capability-system",
          "upgrade-procedure",
          "transient",
          "rest"
        ]
      }
    }
    

    After launching wpbp-generator --dark --dev --verbose I got this error:

    Generating autoload files
    PHP Fatal error:  Class 'Doctrine\Common\Collections\ArrayCollection' not found in /Users/<omitted>/test/wp/wp-content/plugins/name/vendor/phpro/grumphp/src/Collection/ProcessArgumentsCollection.php on line 8
    

    Then, if I try to activate this plugin in /wp-admin, I got this error:

    Warning: require(/app/wp-content/plugins/name/vendor/composer/../myclabs/deep-copy/src/DeepCopy/deep_copy.php): failed to open stream: No such file or directory in /app/wp-content/plugins/name/vendor/composer/autoload_real.php on line 66 Call Stack: 0.0037 422528 1. {main}() /app/wp-admin/plugins.php:0 0.3054 8341088 2. plugin_sandbox_scrape() /app/wp-admin/plugins.php:172 0.3055 8341952 3. include('/app/wp-content/plugins/name/name.php') /app/wp-admin/includes/plugin.php:1909 0.3055 8343208 4. require_once('/app/wp-content/plugins/name/vendor/autoload.php') /app/wp-content/plugins/name/name.php:67 0.3056 8343864 5. ComposerAutoloaderInitfc50f2424edbbe5a2d76f8b8c50df8c3::getLoader() /app/wp-content/plugins/name/vendor/autoload.php:7 0.3056 8347032 6. composerRequirefc50f2424edbbe5a2d76f8b8c50df8c3() /app/wp-content/plugins/name/vendor/composer/autoload_real.php:56 Fatal error: require(): Failed opening required '/app/wp-content/plugins/name/vendor/composer/../myclabs/deep-copy/src/DeepCopy/deep_copy.php' (include_path='.:/usr/local/lib/php') in /app/wp-content/plugins/name/vendor/composer/autoload_real.php on line 66 Call Stack: 0.0037 422528 1. {main}() /app/wp-admin/plugins.php:0 0.3054 8341088 2. plugin_sandbox_scrape() /app/wp-admin/plugins.php:172 0.3055 8341952 3. include('/app/wp-content/plugins/name/name.php') /app/wp-admin/includes/plugin.php:1909 0.3055 8343208 4. require_once('/app/wp-content/plugins/name/vendor/autoload.php') /app/wp-content/plugins/name/name.php:67 0.3056 8343864 5. ComposerAutoloaderInitfc50f2424edbbe5a2d76f8b8c50df8c3::getLoader() /app/wp-content/plugins/name/vendor/autoload.php:7 0.3056 8347032 6. composerRequirefc50f2424edbbe5a2d76f8b8c50df8c3() /app/wp-content/plugins/name/vendor/composer/autoload_real.php:56 
    

    PHP version: 7.2 I run this WordPress project inside Docker containers (with Lando). What am I doing wrong?

    Thanks for your support

    opened by eleftrik 12
  • PHPMD Errors

    PHPMD Errors

    I'm new to PHPMD. Love it.

    Getting the following (cool picture and) errors:

                 β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„
               β–„β–„β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–Œ
             ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄
            β–β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–Œ
           β–β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–Œ
      β–„β–ˆβ–ˆβ–ˆβ–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–Œ
     β–ˆβ–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–Œ
     β–β–ˆβ–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–Œ
       β–€β–ˆβ–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–Œ
         β–€β–€β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–ˆβ–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„
          β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ                       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
         β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€  β–€β–€β–€β–€β–€β–„      β–„β–€β–€β–€β–€β–€     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–€
          β–β–ˆβ–ˆβ–ˆβ–ˆ      β–β–ˆβ–ˆ        β–β–ˆβ–ˆ        β–ˆβ–ˆβ–ˆβ–ˆβ–Œ
          β–ˆβ–ˆβ–ˆβ–ˆβ–Œ                            β–ˆβ–ˆβ–ˆ
           β–Œβ–ˆβ–ˆβ–Œ           β–„β–„ β–„β–„           β–β–ˆβ–ˆβ–ˆ
            β–ˆβ–ˆβ–ˆ       β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„       β–β–ˆβ–ˆβ–ˆ
             β–ˆβ–ˆβ–„ β–β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
            β–ˆβ–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€     β–€β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
              β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
             β–β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
              β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
               β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–ˆβ–ˆβ–€
                β–€ β–β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œ ▐▀
                    β–ˆβ–ˆβ–ˆβ–ˆβ–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€β–β–ˆβ–ˆβ–ˆ
                     β–€β–ˆβ–Œ  β–β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–Œ
                            β–ˆβ–ˆβ–€   ▐▀
    
           β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
           β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–€β–ˆβ–€β–‘β–‘β–‘β–‘β–‘β–‘β–€β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–€β–ˆβ–€β–‘β–‘β–‘β–‘β–‘β–€β–ˆ
           β–ˆβ–‘β–‘β–β–ˆβ–Œβ–‘β–‘β–ˆβ–‘β–‘β–‘β–ˆβ–ˆβ–‘β–‘β–‘β–ˆβ–‘β–‘β–ˆβ–ˆβ–‘β–‘β–‘β–ˆβ–‘β–‘β–‘β–ˆβ–ˆβ–‘β–‘β–ˆ
           β–ˆβ–‘β–‘β–β–ˆβ–Œβ–‘β–‘β–ˆβ–‘β–‘β–‘β–ˆβ–ˆβ–‘β–‘β–‘β–ˆβ–‘β–‘β–ˆβ–ˆβ–‘β–‘β–‘β–ˆβ–‘β–‘β–‘β–ˆβ–ˆβ–‘β–‘β–ˆ
           β–ˆβ–‘β–‘β–β–ˆβ–Œβ–‘β–‘β–ˆβ–‘β–‘β–‘β–ˆβ–ˆβ–‘β–‘β–‘β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–„β–ˆβ–‘β–‘β–„β–„β–„β–„β–„β–ˆ
           β–ˆβ–‘β–‘β–β–ˆβ–Œβ–‘β–‘β–ˆβ–‘β–‘β–‘β–ˆβ–ˆβ–‘β–‘β–‘β–ˆβ–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–ˆ
           β–ˆβ–‘β–‘β–‘β–ˆβ–‘β–‘β–‘β–ˆβ–„β–‘β–‘β–‘β–‘β–‘β–‘β–„β–ˆβ–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–„β–‘β–‘β–‘β–‘β–‘β–„β–ˆ
           β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
    
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/backend/ImpExp.php:57	Avoid using undefined variables such as '$settings' which will lead to PHP notices.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/backend/ImpExp.php:58	Avoid using undefined variables such as '$settings' which will lead to PHP notices.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/backend/ImpExp.php:67	Avoid using undefined variables such as '$settings' which will lead to PHP notices.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/backend/ImpExp.php:116	Missing class import via use statement (line '116', column '7').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/backend/Notices.php:37	Missing class import via use statement (line '37', column '7').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/backend/Pointers.php:30	Missing class import via use statement (line '30', column '7').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/cli/Example.php:44	Avoid using static access to class '\WP_CLI' in method '__construct'.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/cli/Example.php:59	Avoid using static access to class '\WP_CLI' in method 'command_example'.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/cli/Example.php:61	Avoid using static access to class '\WP_CLI' in method 'command_example'.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/cli/Example.php:63	Avoid using static access to class '\WP_CLI' in method 'command_example'.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/cli/Example.php:65	Avoid using static access to class '\WP_CLI' in method 'command_example'.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/cli/Example.php:67	Avoid using static access to class '\WP_CLI' in method 'command_example'.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/cli/Example.php:69	Avoid using static access to class '\WP_CLI' in method 'command_example'.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/cli/Example.php:71	Avoid using static access to class '\WP_CLI' in method 'command_example'.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/engine/Initialize.php:25	Avoid variables with short names like $is. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/engine/Initialize.php:86	Avoid using undefined variables such as '$class' which will lead to PHP notices.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/engine/Initialize.php:88	Missing class import via use statement (line '88', column '17').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/engine/Initialize.php:88	Avoid using undefined variables such as '$class' which will lead to PHP notices.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/engine/Initialize.php:93	Missing class import via use statement (line '93', column '16').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/integrations/CMB.php:53	Missing class import via use statement (line '53', column '19').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/integrations/Cron.php:38	Missing class import via use statement (line '38', column '19').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/integrations/Cron.php:56	Avoid variables with short names like $id. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/integrations/FakePage.php:28	Missing class import via use statement (line '28', column '13').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/integrations/Widgets/My_Recent_Posts_Widget.php:23	The method __construct() has 125 lines of code. Current threshold is set to 100. Avoid really long methods.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/internals/PostTypes.php:32	Missing class import via use statement (line '32', column '23').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/internals/PostTypes.php:50	Missing class import via use statement (line '50', column '23').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/internals/Transient.php:68	Avoid using undefined variables such as '$value' which will lead to PHP notices.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/rest/Example.php:122	Missing class import via use statement (line '122', column '24').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/acceptance/AdminEnqueueCest.php:4	Avoid variables with short names like $I. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/acceptance/AdminEnqueueCest.php:10	Avoid variables with short names like $I. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/acceptance/AdminEnqueueCest.php:17	Avoid variables with short names like $I. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/acceptance/AdminSettingsJsCest.php:4	Avoid variables with short names like $I. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/acceptance/AdminSettingsJsCest.php:9	Avoid variables with short names like $I. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/acceptance/AdminSettingsPageCest.php:Avoid variables with short names like $I. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/acceptance/AdminSettingsPageCest.php:Avoid variables with short names like $I. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/acceptance/AdminSettingsPageCest.php:15	Avoid variables with short names like $I. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/functional/CliCest.php:10	Avoid variables with short names like $I. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/functional/CustomRestRouteCest.php:6	Avoid variables with short names like $I. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/functional/CustomRestRouteCest.php:13Avoid variables with short names like $I. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/functional/CustomRestRouteCest.php:24Avoid variables with short names like $I. Configured minimum length is 3.
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/wpunit/ajax/AdminAjaxTest.php:26	Missing class import via use statement (line '26', column '14').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/wpunit/ajax/AjaxTest.php:24	Missing class import via use statement (line '24', column '14').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/wpunit/engine/InitializeAdminTest.php:27	Missing class import via use statement (line '27', column '14').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/wpunit/engine/InitializeTest.php:27	Missing class import via use statement (line '27', column '14').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/tests/wpunit/public/ExtrasTest.php:26	Missing class import via use statement (line '26', column '14').
    /Users/mikekilmer/Docker/WP/mzmbo/mz-mindbody-classes/uninstall.php:92	Missing class import via use statement (line '92', column '19').
    You have blacklisted keywords in your commit:
    backend/ImpExp.php
      1:20: 95:			wp_die( esc_html__( 'Ple
      2:20: 101:			wp_die( esc_html__( 'Ple
    engine/Initialize.php
      5:20: 132:				wp_die( esc_html__( 'Plu
    mz-mindbody-classes.php
      8:20: 26:	die( 'We\'re sorry, b
    
    

    Do you recommend I ignore some of that in a config file, fix them? Thanks.

    opened by MikeiLL 11
  • Where is Custom Post Type (Demo)?

    Where is Custom Post Type (Demo)?

    Describe the bug I'm not seeing the "demo" PostType

    To Reproduce Steps to reproduce the behavior:

    1. Run the generator
    2. Activate the Plugin
    3. Shouldn't I see a new Demoes post type?

    Thank you and sorry if I'm missing something obvious.

    opened by MikeiLL 8
  • [BUG] Cron job doesn't get created

    [BUG] Cron job doesn't get created

    Describe the bug Cronplus job doesn't run

    To Reproduce Steps to reproduce the behavior:

    1. Leave base Cron class example as it is, or add custom cron job
    2. run wp cron schedule list
    3. The cron job isn't present in scheduled jobs list

    Expected behavior The cron job should be created

    Additional context I run wpbp as a symlinked composer dependency in a local bedrock environment

    bug help wanted 
    opened by LucasDemea 7
  • Fix all PHPStan problems

    Fix all PHPStan problems

    TODO: Add file names for each ignored problem.

    parameters:
        ignoreErrors:
            -
                path: engine/Is_Methods.php
                message: '#^Function is_amp_endpoint not found\.$#'
                count: 1
    
    opened by szepeviktor 7
  • Retrieve Optios Page values

    Retrieve Optios Page values

    Hi, congrats for this great plugin starter, i am using it and cannot find the way to get the demo options page values.

    Do i need to code my own function to get the values or is it included? I cannot find it.

    Thank you very much!

    help wanted question 
    opened by mimomedia 7
  • Anonymous function in includes/language.php

    Anonymous function in includes/language.php

    The anonymous function in language.php was causing an error for a user of a plugin I created using this boilerplate. The error came from line 36 which includes: add_filter( 'cml_my_translations' ...

    Here is how I fixed the code:

    function register_string( $plugin_name_human_format, $string_name, $value ) {
        if ( function_exists( 'icl_register_string' ) ) {
            icl_register_string( $plugin_name_human_format, $string_name, $value );
        } elseif ( has_filter( 'cml_my_translations' ) ) {
            add_filter( 'cml_my_translations', create_function( "$groups, $plugin_name_human_format","
                $plugin_name_human_format_replaced = str_replace( ' ', '-', $plugin_name_human_format );
                CMLTranslations:add( $string_name, $value, $plugin_name_human_format );
                $groups[$plugin_name_human_format_replaced] = $plugin_name_human_format;
                return $groups;"
             ) );
        } elseif ( function_exists( 'pll_register_string' ) ) {
            $plugin_name_human_format_replaced = str_replace( ' ', '-', $plugin_name_human_format );
            pll_register_string( $plugin_name_human_format_replaced, $string_name );
        }
    }
    
    opened by jacobschweitzer 7
  • Develop homepage

    Develop homepage

    I have developed a proposal for a new homepage of the GitHub Page for this project. We have to check all the text to be sure that they are correct.

    For this first issue I'm going to attach only the homepage, if you need plain text to adit the page I can create a Markdown document to make easy to apply modifications. wpbp-home

    enhancement help wanted hacktoberfest 
    opened by AndreaBarghigiani 6
  • [Feature] CMB column example

    [Feature] CMB column example

    So CMB2 has a parameter that let you to show the field (also with a custom callback) in the post type table list. This means that we can remove the CPT_Columns library or in case add the CMB example to use that parameter.

    https://github.com/CMB2/CMB2/wiki/Field-Parameters#column

    opened by Mte90 0
  • [Feature] Custom routing

    [Feature] Custom routing

    Implement a custom route allow to deprecate the Fake_Page library and add something more advanced.

    • https://github.com/Brain-WP/Cortex
    • https://github.com/joanrodas/plubo-routes
    • https://github.com/ssnepenthe/toy-wp-routing
    • https://github.com/downshiftorg/wp-router
    • https://github.com/DevAly/wordpress-routes
    enhancement 
    opened by Mte90 0
  • [Feature] Recipe for github release

    [Feature] Recipe for github release

    Describe the solution you'd like Probably using github workflow for release assets ? to build installable ZIP plugin

    Additional context Basically after initiating the boilerplate, then develop, what im lost is how can i release it to Github, as Github release. Guide / recipe that can integrate with wp.org svn might be cool too

    enhancement hacktoberfest 
    opened by pentatonicfunk 5
  • [Library] BerlinDB

    [Library] BerlinDB

    It would be very interesting to integrate some ORM to this project, like Eloquente or Doctrine, it would be much more productive to develop for the WP, there is even a project that inspired me... https://github.com/steed/steed

    enhancement help wanted hacktoberfest 
    opened by jonathaf 3
  • [Feature] Run codeception tests in a dockerized environment

    [Feature] Run codeception tests in a dockerized environment

    Is your feature request related to a problem? Please describe. It would be nice if we could test our plugin right away without having to rely on a preinstalled wordpress site.

    Describe the solution you'd like I'd like to use the official wordpress docker image to run the tests with a single command that would that care of building the container, launch selenium, and run the tests. It would also allow a better integration in our CI pipelines.

    I'm almost ready with setting up this solution in one of my projects, and would be happy to submit a PR with a generalized solution, if you think that would be an improvement to WPBP.

    hacktoberfest 
    opened by LucasDemea 3
Releases(3.3.0)
  • 3.3.0(Jul 27, 2022)

    • Enhancement: wp-scripts integration
    • Enhancement: Custom block example in React.js
    • Enhancement: JS example with REST and nonce
    • Enhancement: Page-Madness-Detector and Assets package added
    • Enhancement: GitHub Action added Codeception WPunit tests
    • Enhancement: Removed fakepage library
    • Improved: Cli tests better example
    • Removed: Grunt replaced by Webpack

    Many thanks to @erikyo for the work on the new React/block stuff!

    Source code(tar.gz)
    Source code(zip)
  • 3.2.7(Jun 27, 2022)

    • Fix: Activation/Deactivation and capabilities are saved rightly
    • Enhancement: Removed language library
    • Updated: i18n-module to a mte90 fork
    • CI: readme.txt validation added
    Source code(tar.gz)
    Source code(zip)
  • 3.2.6(Apr 21, 2022)

  • 3.2.5(Feb 3, 2022)

  • 3.2.4(Oct 14, 2021)

    • Changes: Now GPLv3 as default
    • Refactor: Is_methods replaced with Context class using inpyside/wpcontext
    • Enhancement: Tagged library added
    • Enhancement: Improved doc for CMB2
    • Enhancement: Updated the dependencies
    Source code(tar.gz)
    Source code(zip)
  • 3.2.3(Jul 14, 2021)

    • Enhancement: Now there are constants for minimum php/wp versions
    • Enhancement: Added wp-super-duper library
    • Updated: CI for latest php versions
    Source code(tar.gz)
    Source code(zip)
  • 3.2.2(Aug 5, 2020)

    • Code is fully checked with new GitHub Action for Static Code analysis (PHPStan), Codee Style (PHPCS) and EditorConfig
    • Now the code is passing everything from PHPStan to PHPCS
    • Fixed example tests cases included
    Source code(tar.gz)
    Source code(zip)
  • 3.2.1(Jun 18, 2020)

    • Enhancement: On .env file some parameters are better with apostrophes
    • Enhancement: Settings now support better the new improvements to WordPress Visual changes of last releases
    • Enhancement: New PHPStan exceptions added
    • Fix: ImpExp class wasn't possible to change the file name exported by generator
    • Fix: Bubble notification is now removed by the generator

    Check major version releases for the major changes https://github.com/WPBP/WordPress-Plugin-Boilerplate-Powered/releases/tag/3.2.0

    Source code(tar.gz)
    Source code(zip)
  • 3.2.0(Jun 11, 2020)

    PSR-4 support

    This migration forced the project to change all the file naming rules to follow the PSR-4 standard and also a custom way to initialize the classes.
    In previous version was required to change manually the https://github.com/WPBP/WordPress-Plugin-Boilerplate-Powered/blob/master/plugin-name/engine/Initialize.php to define the class to load by case (admin/frontend/cli/etc), instead now use the composer autoload to load them if the autoload was optimized (composer dumpautoload -o) otherwise does a scan of the directories to autoload them.

    Sadly PHP compared to other languages doesn't scan the folders on his own but require a hand to achieve it. This system is easy to expand as because auto scan also subdirectories so based on the needs you can create all the folders as namespace that you need.

    Why not a src folder?

    Honestly as WP plugin based on our needs and feedback there wasn't this need because the basic folders are already defined, anyway as this is a boilerplate it is possible to change and altering as you wish (or start a discussion to implement it).

    Wiki

    We are keep improving the wiki https://wpbp.github.io/wiki.html with new stuff but we are opened to any new idea or suggestion -> https://github.com/WPBP/wpbp.github.io

    Generator

    There will be as usual a new version of the generator (https://github.com/WPBP/generator) aligned with the new version.

    Freemius-suite

    This set of Bash scripts integrates in his workflow the support for this boilerplate to generate and upload the various plugin version -> https://github.com/CodeAtCode/freemius-suite

    Changelog

    • Enhancement: Added micropackage/requirements
    • Enhancement: Added yahnis-elsts/plugin-update-checker
    • Enhancement: Improved code style with WPCS
    • Enhancement: Updated example pot files with new folder to exclude
    • Enhancement: PSR-4 support with file and class renaming
    • Enhancement: PHPStan support improved
    • Enhancement: Code optimized with PHPStan help
    • Enhancement: New Initialize class to avoid static class list
    • Removed: mte90/wp-contextual-help
    • Removed: CoffeeScript support
    • Replace: wordpress-admin-notices and WP-Dismissable-Notice-Handler with wpdesk/wp-notice
    Source code(tar.gz)
    Source code(zip)
  • 3.1.2(Aug 29, 2019)

  • 3.1.1(May 28, 2019)

  • 3.1.0(May 10, 2019)

    A new major release with:

    • Added support for phpstan (it is not complete)
    • Scanned the boilerplate with phpstan and fixed some docs issues
    • Improved the Pn_Is class methods
    • Bumped version of few libraries
    • Added phpdoc and phpstan to grumphp
    Source code(tar.gz)
    Source code(zip)
  • 3.0.3(Mar 11, 2019)

  • 3.0.2(Feb 25, 2019)

    • Removed reference to a library for CMB not used anymore
    • Added index.php files in folder where was missing
    • Replace all the reference of CMB2 to the new repo
    Source code(tar.gz)
    Source code(zip)
  • 3.0.1(Feb 22, 2019)

  • 3.0(Oct 22, 2018)

  • 2.2.1(Jan 30, 2018)

  • 2.2.0(Jan 7, 2018)

    • New code for capabilities adding with a upgrade procedure
    • New singleton pattern with filters to disable specific classes and other stuff (in few files no singleton anymore)
    • Removed assets/bin folders from this repo and moved to different ones
    • Updated Composer dependences
    • Removed DOM routing because for plugins is better to create specific files to load by php
    • Removed Custom actions (hooks, filters, shortcode) because is a choice by the dev where to put them
    • New constants for the path of the plugin (used for load/enqueue files)
    • Support for Grunt CoffeeScript 2.0.0
    • Improved the Act/Deact code
    • Updated logo and links on right sidebar box on settings page
    • Added FunctionMocker on tests
    • Removed .php_cs to switch on a parameter to the generator
    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Aug 1, 2017)

    • New css/js file for all the administration and one for the plugin settings page
    • Split tabs in the plugin settings page in different files
    • Improved the quality code and docs with PHPCS
    • Removed At Glance widget for new library that support that
    • New folder and files for AJAX on admin and front-end
    • Replaced CPT-Core, Taxonomy-Core with Extendend-Cpts, Extendend-Taxos
    • Added Whip by Yoast and CMB2 Tabs for post types
    • Replace previous package for custom directories with a new one with less dependencies
    • Remove athlan/custom-fields-permalink-plugin
    • Improving the script wp-boilerplate-version.sh
    Source code(tar.gz)
    Source code(zip)
  • 2.0.5(Mar 17, 2017)

  • 2.0.4(Jan 23, 2017)

  • 2.0.2(Nov 17, 2016)

  • 2.0.0(Oct 10, 2016)

  • 1.2.0(Mar 7, 2016)

    • Added Unit test
    • Added example for transient with external request
    • Improved PHPDoc comment
    • Improved code for shortcode and filter
    • Fixed Apigen and git hook
    • Moved code in class-admin-plugin-name.php in dedicated files
    • Moved activaction and deactivation on specific file in public/includes
    • Moved help-docs in admin/includes
    Source code(tar.gz)
    Source code(zip)
  • 1.1.7(Jan 25, 2016)

    • Support for email template with language detection
    • Added CMB2 Google Maps field
    • Added Freemius SDK
    • Added WP Background Processing
    • Added CoffeeScript files and Grunt configuration
    • Removed CMB2 Shortcode
    • Fix in admin settings CSS
    • Improved uninstall.php page

    Check on https://github.com/Mte90/WordPress-Plugin-Boilerplate-Powered/blob/master/ChangeLog.md for the 1.1.6 changelog

    Source code(tar.gz)
    Source code(zip)
  • 1.1.5(Sep 17, 2015)

  • 1.1.4(Aug 6, 2015)

    • Better comment in the code
    • Pluggable functions added in language.php
    • TextDomain in a dedicated file for better priority
    • Correct parameter for Apigen
    • Integrated CMB2-Grid
    • Removed folder public/views
    • Fix on language.php from overclockk
    • Improvment on PHPDoc
    Source code(tar.gz)
    Source code(zip)
  • 1.1.2(Jun 29, 2015)

    • [Improvement] New code of CMB2 with all of the examples in the settings
    • [Documentation] Better example reference for requirements.php
    • [Snippet] Add custom ctps on the search
    • [Improvement] Change the text for the settings page with the plugin name
    • [Improvement] Right box for custom image or banner in settings page
    • [Library] Added CPT_Columns class with new features
    • Improvement and fixies to fake-page.php
    Source code(tar.gz)
    Source code(zip)
  • 1.1.1(Feb 9, 2015)

Owner
WordPress Plugin Boilerplate Powered
The most adaptable and fast start way to develop a plugin!
WordPress Plugin Boilerplate Powered
GPT-3 powered business idea generator

The idea (lol) is to give you inspiration to make something cool, if you lack inspiration right now. Many ideas might not be perfect but they might give you the spark to start thinking to get to a really good idea further on.

levelsio 17 Feb 9, 2022
WordPress plugin starter/boilerplate.

Howdy WordPress plugin starter. Based on "Service Provider" design pattern. Environment setup composer install npm install Plugin Backend Architecture

CodesVault 18 Jan 3, 2023
A new plugin like EconomyAPI but with a different mode

A new plugin like EconomyAPI but with a different mode

null 1 Dec 13, 2021
Disclaimer: The documentation of this plugin is English at the moment, but I might go for Latin later down the line, just for the fun of it.

Quiritibus Plugin This repository is storing the custom plugin developed for the Quiritibus Latin Magazine website, currently being developed at: http

Alkor AndrΓ‘s 1 Jan 19, 2022
WordPress block that displays a random "powered by" message, generally meant for footers.

X3P0 Powered By A block that generates a random "Powered by" message. It is meant to replace the typical "Powered by Theme/WordPress" message in foote

X3P0 4 Nov 4, 2022
Api.video-wordpress-plugin - The official api.video plugin for WordPress

api.video WordPress Plugin api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managin

api.video 5 Oct 19, 2022
Showing what's new in PHP 8 with examples and tests

#PHP 8 what's new with examples Showing what's new in PHP 8 with examples and tests. I believe that reading about the changes is not enough, so grab t

Grzegorz Bielski 1 Dec 14, 2022
Custom code snippets and examples for SkyVerge-built WooCommerce extensions

SkyVerge WooCommerce Plugins Welcome to the wc-plugins-snippets repository! This repository stores code snippets related to SkyVerge WooCommerce plugi

SkyVerge 255 Nov 16, 2022
Demo serverless applications, examples code snippets and resources for PHP

The Serverless LAMP stack Examples Code example Description AWS blog link 0.1-SimplePhpFunction A very simple implementation of a PHP Lambda function.

AWS Samples 303 Dec 20, 2022
SERP Scraping API code examples for Python, PHP and Node.js

SERP Scraping API List of contents Introduction Authentication Google Baidu Bing Yandex Parameters Targets Languages License Introduction With our SER

Smartproxy 8 Nov 7, 2022
Some Joomla! 4.x Web Services Api Examples and Experiments to raise the level of awareness of the huge potiental of Joomla! 4.x Web Services.

j4x-api-examples WHY? If you are a Joomla! developer or want to become a Joomla! developer there is a new resource for you The Official New Joomla! Ma

Mr Alexandre ELISÉ 11 Nov 29, 2022
Sitepackage for TYPO3 CMS that adheres to the recommended standards, maps all conceivable functional areas and contains examples for common use cases.

TYPO3 CMS Sitepackage This sitepackage sticks as closely as possible to the recommended standard and maps all conceivable functional areas. There are

Eric Bode 3 Dec 18, 2022
the examples of head first object oriented analysis & design - in PHP

Head First object oriented analysis & design in (PHP) after cloning the repository, you have to install the project's dependancies by running the foll

Muhammed ElFeqy 3 Oct 16, 2021
Design Pattern Examples in PHP

Design Patterns in PHP This repository is part of the Refactoring.Guru project. It contains PHP examples for all classic GoF design patterns. Each pat

Refactoring.Guru 909 Dec 22, 2022
Mvc - Phalcon MVC Examples

Phalcon MVC Examples These are examples of MVC file structures you can employ using Phalcon >= 3.0.x For further documentation, check out the Phalcon

The Phalcon PHP Framework 804 Jan 3, 2023
Examples of some common design patterns implemented in php

What is a Design Pattern? Design patterns are typical solutions to common problems in software design. Each pattern is like a blueprint that you can c

Bakhtiyor Bahritidinov 4 Feb 11, 2022
PHP examples - Refactoring by Martin Fowler

Refatoração - segunda edição - Exemplos em PHP https://www.youtube.com/watch?v=TBHehDRuVCs PrefÑcio: Case de refatoração x entregas e prazos O que é r

Eduardo Lourenço 3 Jul 20, 2022
Learn how to run WordPress with Docker. Read about our experiences and start off with an easy boilerplate.

Hi! We're Dan and Jay. We're a two person team with a passion for open source products. We created Server Side Up to help share what we learn. Find us

Server Side Up 7 Sep 17, 2022