| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: Team Showcase by PickPlugins |
| 4 |
Plugin URI: http://www.pickplugins.com/item/team-responsive-meet-the-team-grid-for-wordpress/?ref=dashboard |
| 5 |
Description: Fully responsive and mobile ready meet the team showcase plugin for wordpress. |
| 6 |
Version: 1.22.14 |
| 7 |
Author: PickPlugins |
| 8 |
Author URI: http://pickplugins.com |
| 9 |
Text Domain: team |
| 10 |
License: GPLv2 or later |
| 11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
| 12 |
|
| 13 |
|
| 14 |
*/ |
| 15 |
|
| 16 |
if ( ! defined('ABSPATH')) exit; // if direct access |
| 17 |
|
| 18 |
if( ! class_exists( 'team' ) ) { |
| 19 |
class Team{ |
| 20 |
|
| 21 |
public function __construct(){ |
| 22 |
|
| 23 |
define('team_plugin_url', plugins_url('/', __FILE__)); |
| 24 |
define('team_plugin_dir', plugin_dir_path(__FILE__)); |
| 25 |
define('team_plugin_name', 'Team'); |
| 26 |
define('team_plugin_version', '1.22.14'); |
| 27 |
|
| 28 |
include('includes/functions-data-upgrade.php'); |
| 29 |
|
| 30 |
include('includes/class-post-meta-team.php'); |
| 31 |
include('includes/class-post-meta-team-hook.php'); |
| 32 |
|
| 33 |
include('includes/class-post-types.php'); |
| 34 |
include('includes/class-settings.php'); |
| 35 |
include('includes/class-functions.php'); |
| 36 |
include('includes/class-shortcodes.php'); |
| 37 |
|
| 38 |
include('includes/class-settings-tabs.php'); |
| 39 |
include('includes/functions-settings-hook.php'); |
| 40 |
include('includes/functions-layout-hook.php'); |
| 41 |
|
| 42 |
include('includes/class-post-meta-team-layout.php'); |
| 43 |
include('includes/class-post-meta-team-layout-hook.php'); |
| 44 |
include('includes/class-post-meta-team-member.php'); |
| 45 |
include('includes/class-post-meta-team-member-hook.php'); |
| 46 |
include('includes/class-admin-notices.php'); |
| 47 |
include('includes/class-settings-tabs-reviews.php'); |
| 48 |
|
| 49 |
|
| 50 |
include_once team_plugin_dir . '/templates/team-showcase/team-showcase-hook.php'; |
| 51 |
include_once team_plugin_dir . '/templates/single-team-member/team-member-hook.php'; |
| 52 |
|
| 53 |
include('includes/functions-layout-element.php'); |
| 54 |
|
| 55 |
include('includes/functions.php'); |
| 56 |
|
| 57 |
add_action('wp_enqueue_scripts', array($this, '_front_scripts')); |
| 58 |
add_action('admin_enqueue_scripts', array($this, '_admin_scripts')); |
| 59 |
add_action('plugins_loaded', array($this, '_textdomain')); |
| 60 |
add_filter('widget_text', 'do_shortcode'); |
| 61 |
register_activation_hook(__FILE__, array($this, '_activation')); |
| 62 |
register_deactivation_hook(__FILE__, array($this, '_deactivation')); |
| 63 |
add_filter('cron_schedules', array($this, 'cron_recurrence_interval')); |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
$args = array( |
| 68 |
'title' => 'Hope you enjoy <b>Team Showcase</b> plugin ', |
| 69 |
'option' => 'team_plugin_info', |
| 70 |
'review_link' => 'https://wordpress.org/support/plugin/team/reviews/#new-post', |
| 71 |
'support_link' => 'https://www.pickplugins.com/forum/', |
| 72 |
'documentation_link' => 'https://www.pickplugins.com/documentation/team/', |
| 73 |
'tutorials_link' => 'https://www.youtube.com/watch?v=SOe0D-Og3nQ&list=PL0QP7T2SN94atYZswlnBMhDuIYoqlmlxy', |
| 74 |
); |
| 75 |
|
| 76 |
new settings_tabs_reviews($args); |
| 77 |
|
| 78 |
|
| 79 |
} |
| 80 |
|
| 81 |
|
| 82 |
public function _textdomain(){ |
| 83 |
|
| 84 |
$locale = apply_filters('plugin_locale', get_locale(), 'team'); |
| 85 |
load_textdomain('team', WP_LANG_DIR . '/team/team-' . $locale . '.mo'); |
| 86 |
|
| 87 |
load_plugin_textdomain('team', false, plugin_basename(dirname(__FILE__)) . '/languages/'); |
| 88 |
} |
| 89 |
|
| 90 |
|
| 91 |
public function _activation(){ |
| 92 |
|
| 93 |
// Reset permalink |
| 94 |
$team_class_post_types = new team_class_post_types(); |
| 95 |
$team_class_post_types->_posttype_team_member(); |
| 96 |
flush_rewrite_rules(); |
| 97 |
|
| 98 |
|
| 99 |
do_action('team_activation'); |
| 100 |
|
| 101 |
} |
| 102 |
|
| 103 |
|
| 104 |
public function team_uninstall(){ |
| 105 |
|
| 106 |
do_action('team_uninstall'); |
| 107 |
} |
| 108 |
|
| 109 |
public function _deactivation(){ |
| 110 |
|
| 111 |
wp_clear_scheduled_hook('team_cron_upgrade_settings'); |
| 112 |
wp_clear_scheduled_hook('team_cron_upgrade_team_members'); |
| 113 |
wp_clear_scheduled_hook('team_cron_upgrade_team'); |
| 114 |
|
| 115 |
do_action('team_deactivation'); |
| 116 |
} |
| 117 |
|
| 118 |
|
| 119 |
function cron_recurrence_interval($schedules){ |
| 120 |
|
| 121 |
$schedules['1minute'] = array( |
| 122 |
'interval' => 40, |
| 123 |
'display' => __('1 Minute', 'team') |
| 124 |
); |
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
return $schedules; |
| 129 |
} |
| 130 |
|
| 131 |
|
| 132 |
public function _front_scripts(){ |
| 133 |
|
| 134 |
wp_enqueue_script('jquery'); |
| 135 |
|
| 136 |
wp_register_script('masonry', plugins_url('/assets/front/js/masonry.js', __FILE__), array('jquery')); |
| 137 |
wp_register_script('imagesloaded', plugins_url('/assets/front/js/imagesloaded.js', __FILE__), array('jquery')); |
| 138 |
wp_register_style('font-awesome-5', team_plugin_url . 'assets/admin/css/fontawesome.css'); |
| 139 |
|
| 140 |
do_action('team_front_scripts'); |
| 141 |
} |
| 142 |
|
| 143 |
public function _admin_scripts(){ |
| 144 |
|
| 145 |
wp_enqueue_script('jquery'); |
| 146 |
wp_enqueue_script('jquery-ui-core'); |
| 147 |
wp_enqueue_script('jquery-ui-sortable'); |
| 148 |
|
| 149 |
wp_register_script('team_scripts', team_plugin_url . 'assets/admin/js/scripts.js', array('jquery')); |
| 150 |
wp_localize_script('team_scripts', 'team_ajax', array('team_ajaxurl' => admin_url('admin-ajax.php'))); |
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
wp_enqueue_script('wp-color-picker'); |
| 155 |
wp_enqueue_style('wp-color-picker'); |
| 156 |
|
| 157 |
wp_register_script('settings-tabs', team_plugin_url . 'assets/admin/js/settings-tabs.js', array('jquery')); |
| 158 |
wp_register_style('settings-tabs', team_plugin_url . 'assets/admin/css/settings-tabs.css'); |
| 159 |
wp_register_style('font-awesome-5', team_plugin_url . 'assets/admin/css/fontawesome.css'); |
| 160 |
|
| 161 |
wp_register_script('jquery.lazy', team_plugin_url . 'assets/admin/js/jquery.lazy.js', array('jquery')); |
| 162 |
wp_enqueue_script( 'jquery.lazy' ); |
| 163 |
|
| 164 |
wp_enqueue_script( 'team_scripts' ); |
| 165 |
|
| 166 |
|
| 167 |
$cm_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/css')); |
| 168 |
|
| 169 |
wp_localize_script('jquery', 'cm_settings', $cm_settings); |
| 170 |
|
| 171 |
wp_enqueue_script('wp-theme-plugin-editor'); |
| 172 |
//wp_enqueue_style('wp-codemirror'); |
| 173 |
|
| 174 |
do_action('team_admin_scripts'); |
| 175 |
} |
| 176 |
|
| 177 |
} |
| 178 |
} |
| 179 |
|
| 180 |
|
| 181 |
new Team(); |
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|