Skip to content
Snippets Groups Projects
Commit b00f9020 authored by Krzysiek's avatar Krzysiek
Browse files

Merge branch 'devel-plugin-version' into 'devel'

Merge of devel-plugin-version to devel

See merge request wpdesk/plugin-template!7
parents 98bfeeb4 a2c42df9
No related branches found
No related tags found
1 merge request!7Merge of devel-plugin-version to devel
...@@ -18,7 +18,7 @@ final class WPDesk_Plugin_Template_Factory implements WPDesk_Plugin_Factory_1_10 ...@@ -18,7 +18,7 @@ final class WPDesk_Plugin_Template_Factory implements WPDesk_Plugin_Factory_1_10
$wpdesk_plugin_template_plugin_data = array( $wpdesk_plugin_template_plugin_data = array(
'plugin' => plugin_basename( __FILE__ ), 'plugin' => plugin_basename( __FILE__ ),
'product_id' => 'WP Desk Plugin Template', 'product_id' => 'WP Desk Plugin Template',
'version' => '1.0', 'version' => PLUGIN_TEMPLATE_VERSION,
'config_uri' => admin_url( 'edit.php?post_type=inspire_invoice&page=plugin_template' ) 'config_uri' => admin_url( 'edit.php?post_type=inspire_invoice&page=plugin_template' )
); );
......
...@@ -33,6 +33,10 @@ if ( ! defined( 'ABSPATH' ) ) { ...@@ -33,6 +33,10 @@ if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} // Exit if accessed directly } // Exit if accessed directly
$plugin_version = '1.0';
define( 'PLUGIN_TEMPLATE_VERSION', $plugin_version );
require_once( dirname( __FILE__ ) . '/classes/wpdesk/class-requirement-checker.php' ); require_once( dirname( __FILE__ ) . '/classes/wpdesk/class-requirement-checker.php' );
$requirements_checker = new WPDesk_Requirement_Checker_1_10( $requirements_checker = new WPDesk_Requirement_Checker_1_10(
......
...@@ -32,6 +32,9 @@ class Test_WPDesk_Plugin_Template_Factory extends TestCase { ...@@ -32,6 +32,9 @@ class Test_WPDesk_Plugin_Template_Factory extends TestCase {
'return_arg' => 0 'return_arg' => 0
] ); ] );
$plugin_version = '1.0';
define( 'PLUGIN_TEMPLATE_VERSION', $plugin_version );
$factory = new WPDesk_Plugin_Template_Factory(); $factory = new WPDesk_Plugin_Template_Factory();
$this->assertInstanceOf( WPDesk_Plugin_Template_Plugin::class, $factory::build_plugin() ); $this->assertInstanceOf( WPDesk_Plugin_Template_Plugin::class, $factory::build_plugin() );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment