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

137 lines 3.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.2
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_plugin_name', 'Team' );
22 define('team_share_url', 'http://wordpress.org/plugins/team/' );
23
24 require_once( plugin_dir_path( __FILE__ ) . 'includes/team-meta.php');
25 require_once( plugin_dir_path( __FILE__ ) . 'includes/team-functions.php');
26
27
28
29 //Themes php files
30 require_once( plugin_dir_path( __FILE__ ) . 'themes/flat/index.php');
31 require_once( plugin_dir_path( __FILE__ ) . 'themes/flat-bg/index.php');
32
33
34
35 function team_init_scripts()
36 {
37 wp_enqueue_script('jquery');
38 wp_enqueue_script('team_js', plugins_url( '/js/team-scripts.js' , __FILE__ ) , array( 'jquery' ));
39 wp_localize_script('team_js', 'team_ajax', array( 'team_ajaxurl' => admin_url( 'admin-ajax.php')));
40 wp_enqueue_style('team_style', team_plugin_url.'css/style.css');
41 wp_enqueue_style('ParaAdmin', team_plugin_url.'css/ParaAdmin.css');
42 wp_enqueue_script('ParaAdmin', plugins_url( '/js/ParaAdmin.js' , __FILE__ ) , array( 'jquery' ));
43
44 wp_enqueue_style( 'wp-color-picker' );
45 wp_enqueue_script( 'team_color_picker', plugins_url('/js/color-picker.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
46
47 wp_enqueue_script('jquery.dotdotdot', plugins_url( '/js/jquery.dotdotdot.js' , __FILE__ ) , array( 'jquery' ));
48
49 // Style for themes
50 wp_enqueue_style('team-style-flat', team_plugin_url.'themes/flat/style.css');
51 wp_enqueue_style('team-style-flat-bg', team_plugin_url.'themes/flat-bg/style.css');
52
53
54 }
55 add_action("init","team_init_scripts");
56
57
58
59
60
61
62
63 register_activation_hook(__FILE__, 'team_activation');
64
65
66 function team_activation()
67 {
68 $team_version= "1.2";
69 update_option('team_version', $team_version); //update plugin version.
70
71 $team_customer_type= "free"; //customer_type "free"
72 update_option('team_customer_type', $team_customer_type); //update plugin version.
73 }
74
75
76 function team_display($atts, $content = null ) {
77 $atts = shortcode_atts(
78 array(
79 'id' => "",
80
81 ), $atts);
82
83
84 $post_id = $atts['id'];
85
86 $team_themes = get_post_meta( $post_id, 'team_themes', true );
87
88 $team_display ="";
89
90 if($team_themes== "flat")
91 {
92 $team_display.= team_body_flat($post_id);
93 }
94
95 elseif($team_themes== "flat-bg")
96 {
97 $team_display.= team_body_flat_bg($post_id);
98 }
99
100
101 return $team_display;
102
103
104
105 }
106
107 add_shortcode('team', 'team_display');
108
109
110
111
112
113 add_action('admin_menu', 'team_menu_init');
114
115
116
117 function team_menu_help(){
118 include('team-help.php');
119 }
120
121 function team_menu_settings(){
122 include('team-settings.php');
123 }
124
125 function team_menu_init()
126 {
127 add_submenu_page('edit.php?post_type=team', __('Settings','menu-team'), __('Settings','menu-team'), 'manage_options', 'team_menu_settings', 'team_menu_settings');
128
129 add_submenu_page('edit.php?post_type=team', __('Help & Upgrade','menu-team'), __('Help & Upgrade','menu-team'), 'manage_options', 'team_menu_help', 'team_menu_help');
130
131 }
132
133
134
135
136
137 ?>