| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Service Showcase |
| 4 |
* Plugin URI: https://weblizar.com/service-showcase/ |
| 5 |
* Description: Service Showcase plugin is display the service box on wordpress website pages and posts. It come with 6 different layouts and create unlimited service showcases with ulimited color scheme. |
| 6 |
* Version: 3.2 |
| 7 |
* Author: Weblizar |
| 8 |
* Author URI: https://weblizar.com |
| 9 |
* Text Domain: service-showcase |
| 10 |
*/ |
| 11 |
|
| 12 |
defined('ABSPATH') || die(); |
| 13 |
if (!defined('WLSBP_PLUGIN_URL')) { |
| 14 |
define('WLSBP_PLUGIN_URL', plugin_dir_url(__FILE__)); |
| 15 |
} |
| 16 |
|
| 17 |
if (!defined('WLSBP_PLUGIN_DIR_PATH')) { |
| 18 |
define('WLSBP_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__)); |
| 19 |
} |
| 20 |
|
| 21 |
add_action('plugins_loaded', 'wlsbp_textdomain'); |
| 22 |
function wlsbp_textdomain() { |
| 23 |
load_plugin_textdomain('service-showcase', false, dirname(plugin_basename(__FILE__)) . '/languages/'); |
| 24 |
} |
| 25 |
|
| 26 |
final class WLSBP_Service_Showcase { |
| 27 |
private static $instance = null; |
| 28 |
|
| 29 |
private function __construct() { |
| 30 |
$this->initialize_hooks(); |
| 31 |
} |
| 32 |
public static function get_instance() { |
| 33 |
if (is_null(self::$instance)) { |
| 34 |
self::$instance = new self(); |
| 35 |
} |
| 36 |
return self::$instance; |
| 37 |
} |
| 38 |
private function initialize_hooks() { |
| 39 |
if (is_admin()) { |
| 40 |
if ( file_exists( WLSBP_PLUGIN_DIR_PATH . 'admin/admin.php' ) ) { |
| 41 |
require_once WLSBP_PLUGIN_DIR_PATH . 'admin/admin.php'; |
| 42 |
} else { |
| 43 |
// Log error or handle missing file |
| 44 |
} |
| 45 |
} |
| 46 |
if ( file_exists( WLSBP_PLUGIN_DIR_PATH . 'public/public.php' ) ) { |
| 47 |
require_once WLSBP_PLUGIN_DIR_PATH . 'public/public.php'; |
| 48 |
} else { |
| 49 |
// Log error or handle missing file |
| 50 |
} |
| 51 |
} |
| 52 |
} |
| 53 |
WLSBP_Service_Showcase::get_instance(); |