-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
53 additions
and
46 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,12 @@ | |
* @version 1.0.0 | ||
* | ||
*/ | ||
if ( ! class_exists( 'ULF' ) ) { | ||
class ULF { | ||
if ( ! class_exists( 'ULF_Setup' ) ) { | ||
class ULF_Setup { | ||
|
||
// Default constants | ||
public static $premium = true; | ||
public static $version = '2.2.7'; | ||
public static $version = '2.2.8'; | ||
public static $dir = ''; | ||
public static $url = ''; | ||
public static $css = ''; | ||
|
@@ -39,11 +39,14 @@ class ULF { | |
|
||
private static $instance = null; | ||
|
||
public static function init( $file = __FILE__ ) { | ||
public static function init( $file = __FILE__, $premium = true ) { | ||
|
||
// Set file constant | ||
self::$file = $file; | ||
|
||
// Set file constant | ||
self::$premium = $premium; | ||
|
||
// Set constants | ||
self::constants(); | ||
|
||
|
@@ -375,18 +378,18 @@ public static function include_plugin_url( $file ) { | |
// Include files | ||
public static function includes() { | ||
|
||
// Helpers | ||
// Include common functions | ||
self::include_plugin_file( 'functions/actions.php' ); | ||
self::include_plugin_file( 'functions/helpers.php' ); | ||
self::include_plugin_file( 'functions/sanitize.php' ); | ||
self::include_plugin_file( 'functions/validate.php' ); | ||
|
||
// Includes free version classes | ||
// Include free version classes | ||
self::include_plugin_file( 'classes/abstract.class.php' ); | ||
self::include_plugin_file( 'classes/fields.class.php' ); | ||
self::include_plugin_file( 'classes/admin-options.class.php' ); | ||
|
||
// Includes premium version classes | ||
// Include premium version classes | ||
if ( self::$premium ) { | ||
self::include_plugin_file( 'classes/customize-options.class.php' ); | ||
self::include_plugin_file( 'classes/metabox-options.class.php' ); | ||
|
@@ -560,9 +563,6 @@ public static function add_admin_enqueue_scripts() { | |
return; | ||
} | ||
|
||
// Check for developer mode | ||
$min = ( self::$premium && SCRIPT_DEBUG ) ? '' : '.min'; | ||
|
||
// Admin utilities | ||
wp_enqueue_media(); | ||
|
||
|
@@ -572,12 +572,15 @@ public static function add_admin_enqueue_scripts() { | |
|
||
// Font awesome 4 and 5 loader | ||
if ( apply_filters( 'ulf_fa4', false ) ) { | ||
wp_enqueue_style( 'ulf-fa', 'https://cdn.jsdelivr.net/npm/[email protected]/css/font-awesome'. $min .'.css', array(), '4.7.0', 'all' ); | ||
wp_enqueue_style( 'ulf-fa', 'https://cdn.jsdelivr.net/npm/[email protected]/css/font-awesome.min.css', array(), '4.7.0', 'all' ); | ||
} else { | ||
wp_enqueue_style( 'ulf-fa5', 'https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all'. $min .'.css', array(), '5.15.5', 'all' ); | ||
wp_enqueue_style( 'ulf-fa5-v4-shims', 'https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/v4-shims'. $min .'.css', array(), '5.15.5', 'all' ); | ||
wp_enqueue_style( 'ulf-fa5', 'https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css', array(), '5.15.5', 'all' ); | ||
wp_enqueue_style( 'ulf-fa5-v4-shims', 'https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/v4-shims.min.css', array(), '5.15.5', 'all' ); | ||
} | ||
|
||
// Check for developer mode | ||
$min = ( self::$premium && SCRIPT_DEBUG ) ? '' : '.min'; | ||
|
||
// Main style | ||
wp_enqueue_style( 'ulf', self::include_plugin_url( 'assets/css/style'. $min .'.css' ), array(), self::$version, 'all' ); | ||
|
||
|
@@ -783,4 +786,16 @@ public static function field( $field = array(), $value = '', $unique = '', $wher | |
|
||
} | ||
|
||
ULF::init( __FILE__ ); | ||
ULF_Setup::init( __FILE__, true ); | ||
|
||
/** | ||
* | ||
* Extended Setup Class for Shortland | ||
* | ||
* @since 1.0.0 | ||
* @version 1.0.0 | ||
* | ||
*/ | ||
if ( ! class_exists( 'ULF' ) ) { | ||
class ULF extends ULF_Setup{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/*! WP ULike - v4.6.0 | ||
/*! WP ULike - v4.6.1 | ||
* https://wpulike.com | ||
* TechnoWich 2022; | ||
*/ | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters