Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
plugin-template
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
Library
plugin-template
Merge requests
!40
feature(core): plugin template changes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
feature(core): plugin template changes
feature/upgrade-template
into
master
Overview
0
Commits
7
Changes
1
Merged
Krzysztof Dyszczyk
requested to merge
feature/upgrade-template
into
master
2 years ago
Overview
0
Commits
7
Changes
1
0
0
Merge request reports
Viewing commit
fd437c10
Prev
Next
Show latest version
1 file
+
1
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
fd437c10
feature(core): codeception tests - fixing
· fd437c10
Sebastian Pisula
authored
2 years ago
plugin-template.php
+
50
−
38
View file @ fd437c10
Edit in single-file editor
Open in Web IDE
<?php
/**
Plugin Name: WP Desk Plugin Template
Plugin URI: https://www.wpdesk.net/products/plugin-template/
Description: WP Desk Plugin Template
Product: WP Desk Plugin Template
Version: 1.0
Author: WP Desk
Author URI: https://www.wpdesk.net/
Text Domain: plugin-template
Domain Path: /lang/
@package \WPDesk\PluginTemplate
Copyright 2021 WP Desk Ltd.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Plugin Name: WP Desk Plugin Template
* Plugin URI: https://www.wpdesk.net/products/plugin-template/
* Description: WP Desk Plugin Template
* Product: WP Desk Plugin Template
* Version: 1.0
* Author: WP Desk
* Author URI: https://www.wpdesk.net/
* Text Domain: plugin-template
* Domain Path: /lang/
*
* Requires at least: 5.7
* Tested up to: 6.0
* WC requires at least: 6.6
* WC tested up to: 7.0
* Requires PHP: 7.2
*
* @package \WPDesk\PluginTemplate
*
* Copyright 2022 WP Desk Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
if
(
!
defined
(
'ABSPATH'
)
)
{
exit
;
}
// Exit if accessed directly
use
WPDesk\PluginTemplate\Plugin
;
defined
(
'ABSPATH'
)
||
exit
;
require_once
__DIR__
.
'/vendor/autoload.php'
;
/* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
$plugin_version
=
'1.0.0'
;
$plugin_name
=
'WP Desk Plugin Template'
;
$plugin_class_name
=
'\WPDesk\PluginTemplate\Plugin'
;
$plugin_class_name
=
Plugin
::
class
;
$plugin_text_domain
=
'plugin-template'
;
$product_id
=
'
p
lugin
-t
emplate'
;
$product_id
=
'
WP Desk P
lugin
T
emplate'
;
$plugin_file
=
__FILE__
;
$plugin_dir
=
dirname
(
__FILE__
);
$plugin_dir
=
__DIR__
;
// todo: only for paid plugins.
$plugin_shops
=
[
'default'
=>
'https://www.wpdesk.net/'
,
];
$requirements
=
[
'php'
=>
'7.
0
'
,
'wp'
=>
'5.
0
'
,
'php'
=>
'7.
2
'
,
'wp'
=>
'5.
7
'
,
'plugins'
=>
[
[
'name'
=>
'woocommerce/woocommerce.php'
,
'nice_name'
=>
'WooCommerce'
,
'version'
=>
'
4.7
'
,
'version'
=>
'
6.6
'
,
],
],
];
require
__DIR__
.
'/vendor_prefixed/wpdesk/wp-plugin-flow/src/plugin-init-php52.php'
;
// todo: only for free plugins.
require
__DIR__
.
'/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/plugin-init-php52-free.php'
;
Loading