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