Skip to content

Commit

Permalink
Add edd code
Browse files Browse the repository at this point in the history
  • Loading branch information
raftaar1191 committed Oct 18, 2023
1 parent b9bd81f commit e4a847c
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 14 deletions.
19 changes: 19 additions & 0 deletions admin/licenses-update/edd/main.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;

/**
* Add EDD licences into the AcrossWP EDD licences menu
*/
function wordpress_plugin_boilerplate_edd_plugins_licenses( $licenses ) {

$licenses[1000] = array(
'id' => 705,
'key' => WORDPRESS_PLUGIN_BOILERPLATE_PLUGIN_NAME_SLUG,
'version' => WORDPRESS_PLUGIN_BOILERPLATE_VERSION,
'name' => WORDPRESS_PLUGIN_BOILERPLATE_PLUGIN_NAME
);

return $licenses;
}
add_filter( 'acrosswp_edd_plugins_licenses', 'wordpress_plugin_boilerplate_edd_plugins_licenses', 100, 1 );
1 change: 1 addition & 0 deletions admin/licenses-update/plugin-update-checker/main.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"acrosswp/acrosswp-about-us": "dev-main",
"alledia/edd-sl-plugin-updater": "dev-master",
"acrosswp/acrosswp-plugin-edd-licence": "dev-main",
"yahnis-elsts/plugin-update-checker": "dev-master"
"yahnis-elsts/plugin-update-checker": "dev-master",
"acrosswp/acrosswp-plugin-update-checker-github": "dev-main"
},
"support": {
"issues": "https://github.com/acrosswp/wordpress-plugin-boilerplate/issues"
Expand Down
63 changes: 52 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions includes/class-wordpress-plugin-boilerplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,15 @@ final class Wordpress_Plugin_Boilerplate {
*/
public function __construct() {

$this->define_constants();

if ( defined( 'WORDPRESS_PLUGIN_BOILERPLATE_VERSION' ) ) {
$this->version = WORDPRESS_PLUGIN_BOILERPLATE_VERSION;
} else {
$this->version = '1.0.0';
}
$this->plugin_name = 'wordpress-plugin-boilerplate';

$this->define_constants();
$this->plugin_name = 'wordpress-plugin-boilerplate';

$this->load_dependencies();

Expand Down Expand Up @@ -121,6 +122,8 @@ private function define_constants() {
$this->define( 'WORDPRESS_PLUGIN_BOILERPLATE_PLUGIN_BASENAME', plugin_basename( WORDPRESS_PLUGIN_BOILERPLATE_FILES ) );
$this->define( 'WORDPRESS_PLUGIN_BOILERPLATE_PLUGIN_PATH', plugin_dir_path( WORDPRESS_PLUGIN_BOILERPLATE_FILES ) );
$this->define( 'WORDPRESS_PLUGIN_BOILERPLATE_PLUGIN_URL', plugin_dir_url( WORDPRESS_PLUGIN_BOILERPLATE_FILES ) );
$this->define( 'WORDPRESS_PLUGIN_BOILERPLATE_PLUGIN_NAME_SLUG', $this->plugin_name );
$this->define( 'WORDPRESS_PLUGIN_BOILERPLATE_PLUGIN_NAME', 'WordPress Plugin Boilerplate' );

if( ! function_exists( 'get_plugin_data' ) ){
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
Expand Down

0 comments on commit e4a847c

Please sign in to comment.