Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
Update wpo-ips-default-templates.php
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmigf committed Nov 28, 2024
1 parent 2a18263 commit f7aa2ce
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions wpo-ips-default-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,24 @@
* License URI: License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}

const WPO_IPS_DEFAULT_TEMPLATES_VERSION = '1.0.2';

$plugin_path = plugin_dir_path( __FILE__ );
$plugin_directory_name = basename( $plugin_path );
$plugin_file = $plugin_directory_name . '/wpo-ips-default-templates.php';
$github_updater_file = $plugin_path . 'GitHubUpdater.php';

// Load the updater
if ( file_exists( $github_updater_file ) ) {
if ( ! class_exists( '\\WPO\\GitHubUpdater\\GitHubUpdater' ) && file_exists( $github_updater_file ) ) {
require_once $github_updater_file;
$gitHubUpdater = new \WPO\GitHubUpdater\GitHubUpdater( $plugin_directory_name . '/wpo-ips-default-templates.php' );
}

// Load the updater
if ( class_exists( '\\WPO\\GitHubUpdater\\GitHubUpdater' ) ) {
$gitHubUpdater = new \WPO\GitHubUpdater\GitHubUpdater( $plugin_file );
$gitHubUpdater->setChangelog( 'CHANGELOG.md' );
$gitHubUpdater->add();
}
Expand Down

0 comments on commit f7aa2ce

Please sign in to comment.