| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: HT Team Member |
| 4 |
* Description: The HT Team Member is a elementor addons, Visul Composer addons, WordPress Widges. |
| 5 |
* Plugin URI: https://htplugins.com/ |
| 6 |
* Author: HT Plugins |
| 7 |
* Author URI: https://htplugins.com/ |
| 8 |
* Version: 1.1.8 |
| 9 |
* License: GPL2 |
| 10 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 11 |
* Text Domain: ht-teammember |
| 12 |
* Domain Path: /languages |
| 13 |
*/ |
| 14 |
|
| 15 |
if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly |
| 16 |
|
| 17 |
define( 'HTTEAM_VERSION', '1.1.8' ); |
| 18 |
define( 'HTTEAM_PL_URL', plugins_url( '/', __FILE__ ) ); |
| 19 |
define( 'HTTEAM_PL_PATH', plugin_dir_path( __FILE__ ) ); |
| 20 |
|
| 21 |
// Required File |
| 22 |
require_once HTTEAM_PL_PATH.'admin/admin-init.php'; |
| 23 |
require_once HTTEAM_PL_PATH.'include/helpers_function.php'; |
| 24 |
require_once HTTEAM_PL_PATH.'include/shortcode.php'; |
| 25 |
require_once HTTEAM_PL_PATH.'include/default_widgets.php'; |
| 26 |
if ( in_array('js_composer/js_composer.php', get_option('active_plugins') ) ){ |
| 27 |
include( HTTEAM_PL_PATH.'include/vc_map.php' ); |
| 28 |
} |
| 29 |
|
| 30 |
function htteammember_elementor_widgets(){ |
| 31 |
include( HTTEAM_PL_PATH.'include/elementor_widgets.php' ); |
| 32 |
} |
| 33 |
add_action('elementor/widgets/widgets_registered','htteammember_elementor_widgets'); |
| 34 |
|
| 35 |
// Options value fetch |
| 36 |
function htteammember_get_option( $option, $section, $default = '' ) { |
| 37 |
$options = get_option( $section ); |
| 38 |
if ( isset( $options[$option] ) ) { |
| 39 |
return $options[$option]; |
| 40 |
} |
| 41 |
return $default; |
| 42 |
} |
| 43 |
|
| 44 |
//Enqueue style |
| 45 |
function htteammember_assests_enqueue() { |
| 46 |
|
| 47 |
wp_enqueue_style('htteam-widgets', HTTEAM_PL_URL . 'assests/css/ht-teammember.css', '', HTTEAM_VERSION ); |
| 48 |
wp_enqueue_style('font-awesome', HTTEAM_PL_URL . 'assests/css/font-awesome.min.css', '', HTTEAM_VERSION ); |
| 49 |
|
| 50 |
// Register Style |
| 51 |
wp_register_style( 'slick', HTTEAM_PL_URL . 'assests/css/slick.min.css', array(), HTTEAM_VERSION ); |
| 52 |
|
| 53 |
// Script register |
| 54 |
wp_register_script( 'slick', HTTEAM_PL_URL . 'assests/js/slick.min.js', array(), HTTEAM_VERSION, TRUE ); |
| 55 |
wp_register_script( 'ht-teammin', HTTEAM_PL_URL . 'assests/js/ht-teammin.js', array('slick'), HTTEAM_VERSION, TRUE ); |
| 56 |
|
| 57 |
} |
| 58 |
add_action( 'wp_enqueue_scripts', 'htteammember_assests_enqueue' ); |
| 59 |
|
| 60 |
// Custom Post type template redirect. |
| 61 |
function htteammember_custom_post_template( $template ) { |
| 62 |
|
| 63 |
if( is_archive( 'htteam_member' ) ) { |
| 64 |
$template = WP_PLUGIN_DIR .'/'. plugin_basename( dirname(__FILE__) ) .'/template/archive-htteam_member.php'; |
| 65 |
} |
| 66 |
|
| 67 |
if( is_singular( 'htteam_member' ) ) { |
| 68 |
$template = WP_PLUGIN_DIR .'/'. plugin_basename( dirname(__FILE__) ) .'/template/single-htteam_member.php'; |
| 69 |
} |
| 70 |
|
| 71 |
return $template; |
| 72 |
} |
| 73 |
add_filter( 'template_include', 'htteammember_custom_post_template' ); |
| 74 |
|
| 75 |
// Add settings link on plugin page. |
| 76 |
function htteammember_pl_setting_links( $htinstagram_links ) { |
| 77 |
$htinstagram_settings_link = '<a href="admin.php?page=htteamoptions">'.esc_html__( 'Settings', 'ht-teammember' ).'</a>'; |
| 78 |
array_unshift( $htinstagram_links, $htinstagram_settings_link ); |
| 79 |
return $htinstagram_links; |
| 80 |
} |
| 81 |
$htteammember_plugin_name = plugin_basename(__FILE__); |
| 82 |
add_filter("plugin_action_links_$htteammember_plugin_name", 'htteammember_pl_setting_links' ); |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
?> |