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

139 lines 3.5 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:
5 Description: Fully responsive and mobile ready meet the team showcase plugin for wordpress.
6 Version: 1.1
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;
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://paratheme.com/items/team-responsive-meet-the-team-grid-for-wordpress/' );
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/scripts.js' , __FILE__ ) , array( 'jquery' ));
39
40 wp_localize_script('team_js', 'team_ajax', array( 'team_ajaxurl' => admin_url( 'admin-ajax.php')));
41 wp_enqueue_style('team_style', team_plugin_url.'css/style.css');
42
43 wp_enqueue_style( 'wp-color-picker' );
44 wp_enqueue_script( 'team_color_picker', plugins_url('/js/color-picker.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
45
46
47
48 // Style for themes
49 wp_enqueue_style('team-style-flat', team_plugin_url.'themes/flat/style.css');
50 wp_enqueue_style('team-style-flat-bg', team_plugin_url.'themes/flat-bg/style.css');
51
52
53 }
54 add_action("init","team_init_scripts");
55
56
57
58
59
60
61
62 register_activation_hook(__FILE__, 'team_activation');
63
64
65 function team_activation()
66 {
67 $team_version= "1.1";
68 update_option('team_version', $team_version); //update plugin version.
69
70 $team_customer_type= "free"; //customer_type "free"
71 update_option('team_customer_type', $team_customer_type); //update plugin version.
72 }
73
74
75 function team_display($atts, $content = null ) {
76 $atts = shortcode_atts(
77 array(
78 'id' => "",
79
80 ), $atts);
81
82
83 $post_id = $atts['id'];
84
85 $team_themes = get_post_meta( $post_id, 'team_themes', true );
86
87 $team_display ="";
88
89 if($team_themes== "flat")
90 {
91 $team_display.= team_body_flat($post_id);
92 }
93
94 elseif($team_themes== "flat-bg")
95 {
96 $team_display.= team_body_flat_bg($post_id);
97 }
98
99
100 return $team_display;
101
102
103
104 }
105
106 add_shortcode('team', 'team_display');
107
108
109
110
111
112 add_action('admin_menu', 'team_menu_init');
113
114
115
116 function team_menu_help(){
117 include('team-help.php');
118 }
119
120
121 function team_menu_settings(){
122 include('team-settings.php');
123 }
124
125
126
127 function team_menu_init()
128 {
129 //add_submenu_page('edit.php?post_type=team', __('Settings','menu-wpt'), __('Settings','menu-wpt'), 'manage_options', 'team_menu_settings', 'team_menu_settings');
130
131 add_submenu_page('edit.php?post_type=team', __('Help & Upgrade','menu-wpt'), __('Help & Upgrade','menu-wpt'), 'manage_options', 'team_menu_help', 'team_menu_help');
132
133 }
134
135
136
137
138
139 ?>