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

160 lines 4.2 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.4
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 if ( ! defined('ABSPATH')) exit; // if direct access
14
15 define('team_plugin_url', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' );
16 define('team_plugin_dir', plugin_dir_path( __FILE__ ) );
17 define('team_wp_url', 'http://wordpress.org/plugins/team/' );
18 define('team_pro_url', 'http://paratheme.com/items/team-responsive-meet-the-team-grid-for-wordpress/' );
19 define('team_demo_url', 'http://paratheme.com/items/team-responsive-meet-the-team-grid-for-wordpress/' );
20 define('team_conatct_url', 'http://paratheme.com/contact' );
21 define('team_qa_url', 'http://paratheme.com/qa/' );
22 define('team_plugin_name', 'Team' );
23 define('team_share_url', 'https://wordpress.org/plugins/team/' );
24 define('team_tutorial_video_url', '//www.youtube.com/embed/8OiNCDavSQg?rel=0' );
25
26 require_once( plugin_dir_path( __FILE__ ) . 'includes/team-meta.php');
27 require_once( plugin_dir_path( __FILE__ ) . 'includes/team-functions.php');
28
29
30
31 //Themes php files
32 require_once( plugin_dir_path( __FILE__ ) . 'themes/flat/index.php');
33 require_once( plugin_dir_path( __FILE__ ) . 'themes/flat-bg/index.php');
34 require_once( plugin_dir_path( __FILE__ ) . 'themes/rounded/index.php');
35
36
37
38 function team_init_scripts()
39 {
40 wp_enqueue_script('jquery');
41 wp_enqueue_script('team_js', plugins_url( '/js/team-scripts.js' , __FILE__ ) , array( 'jquery' ));
42 wp_localize_script('team_js', 'team_ajax', array( 'team_ajaxurl' => admin_url( 'admin-ajax.php')));
43 wp_enqueue_style('team_style', team_plugin_url.'css/style.css');
44
45 //ParaAdmin
46 wp_enqueue_style('ParaAdmin', team_plugin_url.'ParaAdmin/css/ParaAdmin.css');
47 wp_enqueue_style('ParaIcons', team_plugin_url.'ParaAdmin/css/ParaIcons.css');
48 wp_enqueue_script('ParaAdmin', plugins_url( 'ParaAdmin/js/ParaAdmin.js' , __FILE__ ) , array( 'jquery' ));
49
50
51
52 wp_enqueue_style( 'wp-color-picker' );
53 wp_enqueue_script( 'team_color_picker', plugins_url('/js/color-picker.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
54
55 wp_enqueue_script('jquery.dotdotdot', plugins_url( '/js/jquery.dotdotdot.js' , __FILE__ ) , array( 'jquery' ));
56
57
58
59
60
61 // Style for themes
62 wp_enqueue_style('team-style-flat', team_plugin_url.'themes/flat/style.css');
63 wp_enqueue_style('team-style-flat-bg', team_plugin_url.'themes/flat-bg/style.css');
64 wp_enqueue_style('team-style-rounded', team_plugin_url.'themes/rounded/style.css');
65
66 }
67 add_action("init","team_init_scripts");
68
69
70
71
72
73
74
75 register_activation_hook(__FILE__, 'team_activation');
76
77
78 function team_activation()
79 {
80 $team_version= "1.4";
81 update_option('team_version', $team_version); //update plugin version.
82
83 $team_customer_type= "free"; //customer_type "free"
84 update_option('team_customer_type', $team_customer_type); //update plugin version.
85
86
87
88
89
90
91
92 }
93
94
95 function team_display($atts, $content = null ) {
96 $atts = shortcode_atts(
97 array(
98 'id' => "",
99
100 ), $atts);
101
102
103 $post_id = $atts['id'];
104
105 $team_themes = get_post_meta( $post_id, 'team_themes', true );
106
107 $team_display ="";
108
109 if($team_themes== "flat")
110 {
111 $team_display.= team_body_flat($post_id);
112 }
113
114 elseif($team_themes== "flat-bg")
115 {
116 $team_display.= team_body_flat_bg($post_id);
117 }
118 elseif($team_themes== "rounded")
119 {
120 $team_display.= team_body_rounded($post_id);
121 }
122
123
124
125 return $team_display;
126
127
128
129 }
130
131 add_shortcode('team', 'team_display');
132
133
134
135
136
137 add_action('admin_menu', 'team_menu_init');
138
139
140
141 function team_menu_help(){
142 include('team-help.php');
143 }
144
145 function team_menu_settings(){
146 include('team-settings.php');
147 }
148
149 function team_menu_init()
150 {
151 add_submenu_page('edit.php?post_type=team', __('Settings','menu-team'), __('Settings','menu-team'), 'manage_options', 'team_menu_settings', 'team_menu_settings');
152
153
154 }
155
156
157
158
159
160 ?>