PluginProbe
Team Showcase / 1.22.12
Team Showcase v1.22.12
trunk 1.0 1.1 1.11 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.2 1.20 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.22.0 1.22.1 1.22.10 1.22.12 1.22.13 1.22.14 All 49 releases
team / team.php

team.php in Team Showcase 1.22.12, at team.php

162 lines 5.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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.12
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.12');
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
48
49 include_once team_plugin_dir . '/templates/team-showcase/team-showcase-hook.php';
50 include_once team_plugin_dir . '/templates/single-team-member/team-member-hook.php';
51
52 include('includes/functions-layout-element.php');
53
54 include('includes/functions.php');
55
56 add_action('wp_enqueue_scripts', array($this, '_front_scripts'));
57 add_action('admin_enqueue_scripts', array($this, '_admin_scripts'));
58 add_action('plugins_loaded', array($this, '_textdomain'));
59 add_filter('widget_text', 'do_shortcode');
60 register_activation_hook(__FILE__, array($this, '_activation'));
61 register_deactivation_hook(__FILE__, array($this, '_deactivation'));
62 add_filter('cron_schedules', array($this, 'cron_recurrence_interval'));
63
64
65 }
66
67
68 public function _textdomain(){
69
70 $locale = apply_filters('plugin_locale', get_locale(), 'team');
71 load_textdomain('team', WP_LANG_DIR . '/team/team-' . $locale . '.mo');
72
73 load_plugin_textdomain('team', false, plugin_basename(dirname(__FILE__)) . '/languages/');
74 }
75
76
77 public function _activation(){
78
79 // Reset permalink
80 $team_class_post_types = new team_class_post_types();
81 $team_class_post_types->_posttype_team_member();
82 flush_rewrite_rules();
83
84
85 do_action('team_activation');
86
87 }
88
89
90 public function team_uninstall(){
91
92 do_action('team_uninstall');
93 }
94
95 public function _deactivation(){
96
97 wp_clear_scheduled_hook('team_cron_upgrade_settings');
98 wp_clear_scheduled_hook('team_cron_upgrade_team_members');
99 wp_clear_scheduled_hook('team_cron_upgrade_team');
100
101 do_action('team_deactivation');
102 }
103
104
105 function cron_recurrence_interval($schedules){
106
107 $schedules['1minute'] = array(
108 'interval' => 40,
109 'display' => __('1 Minute', 'team')
110 );
111
112
113
114 return $schedules;
115 }
116
117
118 public function _front_scripts(){
119
120 wp_enqueue_script('jquery');
121
122 wp_register_script('masonry', plugins_url('/assets/front/js/masonry.js', __FILE__), array('jquery'));
123 wp_register_script('imagesloaded', plugins_url('/assets/front/js/imagesloaded.js', __FILE__), array('jquery'));
124 wp_register_style('font-awesome-5', team_plugin_url . 'assets/admin/css/fontawesome.css');
125
126 do_action('team_front_scripts');
127 }
128
129 public function _admin_scripts(){
130
131 wp_enqueue_script('jquery');
132 wp_enqueue_script('jquery-ui-core');
133 wp_enqueue_script('jquery-ui-sortable');
134
135
136
137 wp_enqueue_script('wp-color-picker');
138 wp_enqueue_style('wp-color-picker');
139
140 wp_register_script('settings-tabs', team_plugin_url . 'assets/admin/js/settings-tabs.js', array('jquery'));
141 wp_register_style('settings-tabs', team_plugin_url . 'assets/admin/css/settings-tabs.css');
142 wp_register_style('font-awesome-5', team_plugin_url . 'assets/admin/css/fontawesome.css');
143
144 $cm_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/css'));
145
146 wp_localize_script('jquery', 'cm_settings', $cm_settings);
147
148 wp_enqueue_script('wp-theme-plugin-editor');
149 //wp_enqueue_style('wp-codemirror');
150
151 do_action('team_admin_scripts');
152 }
153
154 }
155 }
156
157
158 new Team();
159
160
161
162