Skip to content

Commit

Permalink
Merge pull request #32 from wp-cli/prerelease
Browse files Browse the repository at this point in the history
Remove requires WP >= 2.9 from command.php; tidy up composer.json.
  • Loading branch information
gitlost authored Jan 22, 2018
2 parents eac79e0 + 3ccc023 commit a21b56b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 42 deletions.
29 changes: 18 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,36 @@
"description": "Inspects oEmbed providers, clears embed cache, and more.",
"type": "wp-cli-package",
"homepage": "https://github.com/wp-cli/embed-command",
"support": {
"issues": "https://github.com/wp-cli/embed-command/issues"
},
"license": "MIT",
"authors": [],
"authors": [
{
"name": "Pascal Birchler",
"homepage": "https://pascalbirchler.com/"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"files": [
"embed-command.php"
],
"psr-4": {
"WP_CLI\\Embeds\\": "src/"
}
},
"require": {
"wp-cli/wp-cli": "^1.1.0"
},
"files": [
"embed-command.php"
]
},
"require": {},
"require-dev": {
"behat/behat": "~2.5"
"behat/behat": "~2.5",
"wp-cli/wp-cli": "^1.5"
},
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
},
"bundled": true,
"commands": [
"embed",
"embed fetch",
Expand All @@ -34,7 +42,6 @@
"embed cache clear",
"embed cache find",
"embed cache trigger"
],
"bundled": true
]
}
}
38 changes: 7 additions & 31 deletions embed-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,10 @@
WP_CLI::add_command( 'embed', '\WP_CLI\Embeds\Embeds_Namespace' );
}

WP_CLI::add_command( 'embed fetch', '\WP_CLI\Embeds\Fetch_Command', array(
'before_invoke' => function () {
if ( \WP_CLI\Utils\wp_version_compare( '2.9', '<' ) ) {
WP_CLI::error( 'Requires WordPress 2.9 or greater.' );
}
},
) );

WP_CLI::add_command( 'embed provider', '\WP_CLI\Embeds\Provider_Command', array(
'before_invoke' => function () {
if ( \WP_CLI\Utils\wp_version_compare( '2.9', '<' ) ) {
WP_CLI::error( 'Requires WordPress 2.9 or greater.' );
}
},
) );

WP_CLI::add_command( 'embed handler', '\WP_CLI\Embeds\Handler_Command', array(
'before_invoke' => function () {
if ( \WP_CLI\Utils\wp_version_compare( '2.9', '<' ) ) {
WP_CLI::error( 'Requires WordPress 2.9 or greater.' );
}
},
) );

WP_CLI::add_command( 'embed cache', '\WP_CLI\Embeds\Cache_Command', array(
'before_invoke' => function () {
if ( \WP_CLI\Utils\wp_version_compare( '2.9', '<' ) ) {
WP_CLI::error( 'Requires WordPress 2.9 or greater.' );
}
},
) );
WP_CLI::add_command( 'embed fetch', '\WP_CLI\Embeds\Fetch_Command' );

WP_CLI::add_command( 'embed provider', '\WP_CLI\Embeds\Provider_Command' );

WP_CLI::add_command( 'embed handler', '\WP_CLI\Embeds\Handler_Command' );

WP_CLI::add_command( 'embed cache', '\WP_CLI\Embeds\Cache_Command' );

0 comments on commit a21b56b

Please sign in to comment.