Title: Ability to use as standalone WP-CLI Package · Issue #39 · gravityforms/gravityformscli · GitHub
Open Graph Title: Ability to use as standalone WP-CLI Package · Issue #39 · gravityforms/gravityformscli
X Title: Ability to use as standalone WP-CLI Package · Issue #39 · gravityforms/gravityformscli
Description: This is the same request as I made a few years ago in #1, which at the time was closed because the official wp-cli "package index" wasn't accepting new submissions. Since then, they have decided to no longer maintain this separate index,...
Open Graph Description: This is the same request as I made a few years ago in #1, which at the time was closed because the official wp-cli "package index" wasn't accepting new submissions. Since then, they have decided to...
X Description: This is the same request as I made a few years ago in #1, which at the time was closed because the official wp-cli "package index" wasn't accepting new submissions. Since then, they h...
Opengraph URL: https://github.com/gravityforms/gravityformscli/issues/39
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ability to use as standalone WP-CLI Package","articleBody":"This is the same request as I made a few years ago in #1, which at the time was closed because the official wp-cli \"package index\" wasn't accepting new submissions. Since then, they have [decided](https://make.wordpress.org/cli/2017/07/18/feature-development-discussion-recap/) to no longer maintain this separate index, and instead simply use any composer source, such as packagist, or a git repo directly.\r\n\r\nI've taken a few minutes to see what changes are needed, and it breaks down like this:\r\n\r\n1. Any check for `defined( 'ABSPATH' )` needs to be removed, or changed to check for `defined( 'WP_CLI' )` as an alternative\r\n2. `add_action` isn't available in the wp-cli bootstrap process, so `GF_CLI_Bootstrap::load_cli()` should be called unconditionally\r\n3. For the same reason, `GF_CLI_Bootstrap::load_addon()` needs to be loaded differently or conditionally\r\n4. Similarly, `plugin_dir_path()` isn't available during bootstrap, but is easily replaced with `dirname()` (and `rtrim()` to be really clean)\r\n\r\nWith these changes made, I can use the plugin as a global wp-cli package without any further issues. The only other small niggle is that the `type` in the composer.json file isn't `wp-cli-package` as [recommended](https://make.wordpress.org/cli/handbook/guides/commands-cookbook/#distribute-as-a-stand-alone-command), but this isn't a strict requirement.","author":{"url":"https://github.com/dotsam","@type":"Person","name":"dotsam"},"datePublished":"2022-02-09T22:15:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/39/gravityformscli/issues/39"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c5403298-238b-c068-1e95-3ce9f13ceade |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BB78:1F8797:115B3FB:1876961:6978C547 |
| html-safe-nonce | 2e5ed3d14e70f37e2a7c2c06ad33797a1e992d9d3d00930be224798ae8ab0db2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjc4OjFGODc5NzoxMTVCM0ZCOjE4NzY5NjE6Njk3OEM1NDciLCJ2aXNpdG9yX2lkIjoiNjQyNzQzNTkyMDQ5MTMzMjkzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0a942cadd4a8c76de47d16bc430e096d2d43496034f10fb1ec4e20555048595b |
| hovercard-subject-tag | issue:1129084895 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gravityforms/gravityformscli/39/issue_layout |
| twitter:image | https://opengraph.githubassets.com/875401f83aabe75a5e5eaa0f9a6e83dee73ed01e2e5b4f69ee7c7ca6e10dfb86/gravityforms/gravityformscli/issues/39 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/875401f83aabe75a5e5eaa0f9a6e83dee73ed01e2e5b4f69ee7c7ca6e10dfb86/gravityforms/gravityformscli/issues/39 |
| og:image:alt | This is the same request as I made a few years ago in #1, which at the time was closed because the official wp-cli "package index" wasn't accepting new submissions. Since then, they have decided to... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dotsam |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8a71ca1f7ab5436216e1df86f398ef7a51ed3152c90e3f7332fc70cf97fcb9d6 |
| turbo-cache-control | no-preview |
| go-import | github.com/gravityforms/gravityformscli git https://github.com/gravityforms/gravityformscli.git |
| octolytics-dimension-user_id | 17036222 |
| octolytics-dimension-user_login | gravityforms |
| octolytics-dimension-repository_id | 57228191 |
| octolytics-dimension-repository_nwo | gravityforms/gravityformscli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 57228191 |
| octolytics-dimension-repository_network_root_nwo | gravityforms/gravityformscli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | eaed570eead52a9920afef75dc3eb6d826fdc5ef |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width