Refactor plugin structure: replace master-file.php with siti-google-shopping-feed.php and update release workflow paths
All checks were successful
Build & Release Plugin / release (push) Successful in 8s
All checks were successful
Build & Release Plugin / release (push) Successful in 8s
This commit is contained in:
54
siti-google-shopping-feed.php
Normal file
54
siti-google-shopping-feed.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: Siti Google Shopping Feed
|
||||
*
|
||||
* @package PluginPackage
|
||||
* @author Roberto Guagliardo | SitiWeb
|
||||
* @copyright 2019 Roberto Guagliardo | SitiWeb
|
||||
* @license GPL-2.0-or-later
|
||||
*
|
||||
* @wordpress-plugin
|
||||
* Plugin Name: Siti Google Shopping Feed
|
||||
* Plugin URI: https://plugins.robert.ooo/plugin/
|
||||
* Description: Generate a Google Shopping Feed for your WooCommerce store.
|
||||
* Version: 1.0.0
|
||||
* Requires at least: 5.2
|
||||
* Requires PHP: 7.2
|
||||
* Author: Roberto Guagliardo | SitiWeb
|
||||
* Author URI: https://sitiweb.nl/
|
||||
* Text Domain: siti-google-shopping-feed
|
||||
* License: GPL v2 or later
|
||||
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
define( 'SITI_GOOGLE_SHOPPING_FEED_SLUG', 'siti-google-shopping-feed' );
|
||||
if ( ! defined( 'SITI_GOOGLE_SHOPPING_FEED_VERSION' ) ) {
|
||||
$plugin_data = get_file_data(
|
||||
__FILE__,
|
||||
[
|
||||
'Version' => 'Version',
|
||||
],
|
||||
false
|
||||
);
|
||||
|
||||
$plugin_version = isset( $plugin_data['Version'] ) && $plugin_data['Version'] ? $plugin_data['Version'] : '1.0.0';
|
||||
define( 'SITI_GOOGLE_SHOPPING_FEED_VERSION', $plugin_version );
|
||||
}
|
||||
|
||||
if( ! class_exists( 'SitiWebUpdater2' ) ){
|
||||
include_once( plugin_dir_path( __FILE__ ) . 'includes/SitiWebUpdater2.php' );
|
||||
}
|
||||
|
||||
$updater = new SitiWebUpdater2( __FILE__ );
|
||||
$updater->set_owner( 'roberto' );
|
||||
$updater->set_repository( SITI_GOOGLE_SHOPPING_FEED_SLUG );
|
||||
$updater->initialize();
|
||||
|
||||
include_once plugin_dir_path( __FILE__ ) . 'includes/SitiGoogleShoppingFeed.php';
|
||||
|
||||
register_activation_hook( __FILE__, array( 'SitiGoogleShoppingFeed', 'activate' ) );
|
||||
register_deactivation_hook( __FILE__, array( 'SitiGoogleShoppingFeed', 'deactivate' ) );
|
||||
|
||||
SitiGoogleShoppingFeed::init();
|
||||
Reference in New Issue
Block a user