PluginProbe
Team Showcase / 1.6
Team Showcase v1.6
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.6, at team.php

193 lines 4.8 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
4 Plugin URI: http://paratheme.com/items/team-responsive-meet-the-team-grid-for-wordpress/
5 Description: Fully responsive and mobile ready meet the team showcase plugin for wordpress.
6 Version: 1.6
7 Author: paratheme
8 Author URI: http://paratheme.com
9 License: GPLv2 or later
10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
12
13 */
14
15 if ( ! defined('ABSPATH')) exit; // if direct access
16
17
18
19
20 define('team_plugin_url', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' );
21 define('team_plugin_dir', plugin_dir_path( __FILE__ ) );
22 define('team_wp_url', 'http://wordpress.org/plugins/team/' );
23 define('team_wp_reviews', 'http://wordpress.org/support/view/plugin-reviews/team' );
24 define('team_pro_url', 'http://paratheme.com/items/team-responsive-meet-the-team-grid-for-wordpress/' );
25 define('team_demo_url', 'http://paratheme.com/items/team-responsive-meet-the-team-grid-for-wordpress/' );
26 define('team_conatct_url', 'http://paratheme.com/contact' );
27 define('team_qa_url', 'http://paratheme.com/qa/' );
28 define('team_plugin_name', 'Team' );
29 define('team_share_url', 'http://wordpress.org/plugins/team/' );
30 define('team_tutorial_video_url', '//www.youtube.com/embed/8OiNCDavSQg?rel=0' );
31
32 require_once( plugin_dir_path( __FILE__ ) . 'includes/team-meta.php');
33 require_once( plugin_dir_path( __FILE__ ) . 'includes/team-functions.php');
34
35
36
37 //Themes php files
38 require_once( plugin_dir_path( __FILE__ ) . 'themes/flat/index.php');
39 require_once( plugin_dir_path( __FILE__ ) . 'themes/flat-bg/index.php');
40 require_once( plugin_dir_path( __FILE__ ) . 'themes/rounded/index.php');
41
42 function team_init_scripts()
43 {
44 wp_enqueue_script('jquery');
45 wp_enqueue_script('team_js', plugins_url( '/js/team-scripts.js' , __FILE__ ) , array( 'jquery' ));
46 wp_localize_script('team_js', 'team_ajax', array( 'team_ajaxurl' => admin_url( 'admin-ajax.php')));
47 wp_enqueue_style('team_style', team_plugin_url.'css/style.css');
48
49
50 wp_enqueue_style( 'wp-color-picker' );
51 wp_enqueue_script( 'team_color_picker', plugins_url('/js/color-picker.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
52
53 //ParaAdmin
54 wp_enqueue_style('ParaAdmin', team_plugin_url.'ParaAdmin/css/ParaAdmin.css');
55 //wp_enqueue_style('ParaIcons', accordions_plugin_url.'ParaAdmin/css/ParaIcons.css');
56 wp_enqueue_script('ParaAdmin', plugins_url( 'ParaAdmin/js/ParaAdmin.js' , __FILE__ ) , array( 'jquery' ));
57
58 // Style for themes
59 wp_enqueue_style('team-style-flat', team_plugin_url.'themes/flat/style.css');
60 wp_enqueue_style('team-style-flat-bg', team_plugin_url.'themes/flat-bg/style.css');
61 wp_enqueue_style('team-style-rounded', team_plugin_url.'themes/rounded/style.css');
62
63
64
65 }
66 add_action("init","team_init_scripts");
67
68
69
70
71
72
73
74 register_activation_hook(__FILE__, 'team_activation');
75
76
77 function team_activation()
78 {
79 load_plugin_textdomain('team', false, basename( dirname( __FILE__ ) ) . '/languages' );
80
81
82 $team_version['current'] = "1.6";
83
84 if(is_array(get_option( 'team_version' )))
85 {
86 $team_version = get_option( 'team_version' );
87 }
88 else
89 {
90 $team_version['previous'] = get_option( 'team_version' );
91 }
92
93
94 update_option('team_version', $team_version); //update plugin version.
95
96
97
98 $team_customer_type= "free"; //customer_type "pro"
99 update_option('team_customer_type', $team_customer_type); //update plugin version.
100
101
102
103
104
105
106 }
107
108
109
110
111
112 function team_display($atts, $content = null ) {
113 $atts = shortcode_atts(
114 array(
115 'id' => "",
116
117 ), $atts);
118
119
120 $post_id = $atts['id'];
121
122 $team_themes = get_post_meta( $post_id, 'team_themes', true );
123
124 $team_display ="";
125
126 if($team_themes== "flat")
127 {
128 $team_display.= team_body_flat($post_id);
129 }
130
131 elseif($team_themes== "flat-bg")
132 {
133 $team_display.= team_body_flat_bg($post_id);
134 }
135 elseif($team_themes== "rounded")
136 {
137 $team_display.= team_body_rounded($post_id);
138 }
139
140 else
141 {
142 $team_display.= team_body_flat($post_id);
143 }
144
145
146 return $team_display;
147
148
149
150 }
151
152 add_shortcode('team', 'team_display');
153
154
155
156 add_action('admin_menu', 'team_menu_init');
157
158 function team_menu_settings(){
159 include('team-settings.php');
160 }
161
162
163 function team_menu_update(){
164 include('team-update.php');
165 }
166
167 function team_menu_init()
168 {
169
170
171
172 add_submenu_page('edit.php?post_type=team', __('Settings','team'), __('Settings','team'), 'manage_options', 'team_menu_settings', 'team_menu_settings');
173
174
175
176 $team_version_ok = get_option( 'team_version_ok' );
177 if($team_version_ok == 'ok')
178 {
179
180 }
181 else
182 {
183 add_submenu_page('edit.php?post_type=team', __('Update','team'), __('Update','team'), 'manage_options', 'team_menu_update', 'team_menu_update');
184 }
185
186
187
188
189 }
190
191
192
193