| 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.8 |
| 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 |
Copyright: 2015 ParaTheme |
| 13 |
|
| 14 |
*/ |
| 15 |
|
| 16 |
if ( ! defined('ABSPATH')) exit; // if direct access |
| 17 |
|
| 18 |
|
| 19 |
class Team{ |
| 20 |
|
| 21 |
public function __construct(){ |
| 22 |
|
| 23 |
define('team_plugin_url', plugins_url('/', __FILE__) ); |
| 24 |
define('team_plugin_dir', plugin_dir_path( __FILE__ ) ); |
| 25 |
define('team_wp_url', 'http://wordpress.org/plugins/team/' ); |
| 26 |
define('team_wp_reviews', 'http://wordpress.org/support/view/plugin-reviews/team' ); |
| 27 |
define('team_pro_url', 'http://paratheme.com/items/team-responsive-meet-the-team-grid-for-wordpress/' ); |
| 28 |
define('team_demo_url', 'http://paratheme.com/items/team-responsive-meet-the-team-grid-for-wordpress/' ); |
| 29 |
define('team_conatct_url', 'http://paratheme.com/contact' ); |
| 30 |
define('team_qa_url', 'http://paratheme.com/qa/' ); |
| 31 |
define('team_plugin_name', 'Team' ); |
| 32 |
define('team_plugin_version', '1.8' ); |
| 33 |
define('team_customer_type', 'free' ); // pro & free |
| 34 |
define('team_share_url', 'http://wordpress.org/plugins/team/' ); |
| 35 |
define('team_tutorial_video_url', '//www.youtube.com/embed/8OiNCDavSQg?rel=0' ); |
| 36 |
define('team_tutorial_doc_url', 'http://paratheme.com/documentation/documentation/team/' ); |
| 37 |
|
| 38 |
include( 'includes/class-post-types.php' ); |
| 39 |
include( 'includes/class-post-meta.php' ); |
| 40 |
include( 'includes/class-settings.php' ); |
| 41 |
include( 'includes/class-functions.php' ); |
| 42 |
include( 'includes/class-shortcodes.php' ); |
| 43 |
|
| 44 |
include( 'includes/team-functions.php' ); |
| 45 |
include( 'includes/Mobile_Detect.php' ); |
| 46 |
//include( 'includes/mobble.php' ); |
| 47 |
|
| 48 |
add_action( 'wp_enqueue_scripts', array( $this, 'team_front_scripts' ) ); |
| 49 |
add_action( 'admin_enqueue_scripts', array( $this, 'team_admin_scripts' ) ); |
| 50 |
//add_action( 'admin_footer', array( $this, 'colorpickersjs' ) ); |
| 51 |
//add_action( 'admin_enqueue_scripts', 'wptuts_add_color_picker' ); |
| 52 |
|
| 53 |
register_activation_hook( __FILE__, array( $this, 'team_install' ) ); |
| 54 |
register_deactivation_hook( __FILE__, array( $this, 'team_deactivation' ) ); |
| 55 |
//register_uninstall_hook( __FILE__, array( $this, 'team_uninstall' ) ); |
| 56 |
|
| 57 |
add_action( 'plugins_loaded', array( $this, 'team_load_textdomain' )); |
| 58 |
} |
| 59 |
|
| 60 |
|
| 61 |
public function team_load_textdomain() { |
| 62 |
load_plugin_textdomain( 'team', false, plugin_basename( dirname( __FILE__ ) ) . '/languages/' ); |
| 63 |
} |
| 64 |
|
| 65 |
|
| 66 |
public function team_install(){ |
| 67 |
|
| 68 |
team_update_team_member_social_field(); |
| 69 |
|
| 70 |
do_action( 'team_action_install' ); |
| 71 |
|
| 72 |
} |
| 73 |
|
| 74 |
public function team_uninstall(){ |
| 75 |
|
| 76 |
do_action( 'team_action_uninstall' ); |
| 77 |
} |
| 78 |
|
| 79 |
public function team_deactivation(){ |
| 80 |
|
| 81 |
do_action( 'team_action_deactivation' ); |
| 82 |
} |
| 83 |
|
| 84 |
|
| 85 |
public function team_front_scripts(){ |
| 86 |
|
| 87 |
wp_enqueue_script('jquery'); |
| 88 |
wp_enqueue_script('team_front_js', plugins_url( '/js/scripts.js' , __FILE__ ) , array( 'jquery' )); |
| 89 |
wp_localize_script('team_front_js', 'team_ajax', array( 'team_ajaxurl' => admin_url( 'admin-ajax.php'))); |
| 90 |
|
| 91 |
//wp_enqueue_style('team_front_style', team_plugin_url.'css/style.css'); //ssl issue |
| 92 |
wp_enqueue_style('team_front_style', plugins_url( 'css/style.css', __FILE__ )); |
| 93 |
|
| 94 |
//wp_enqueue_style('owl.carousel', plugins_url( 'css/owl.carousel.css', __FILE__ )); |
| 95 |
//wp_enqueue_style('owl.theme', plugins_url( 'css/owl.theme.css', __FILE__ )); |
| 96 |
//wp_enqueue_style('owl.carousel', team_plugin_url.'css/owl.carousel.css'); //ssl issue |
| 97 |
//wp_enqueue_style('owl.theme', team_plugin_url.'css/owl.theme.css'); //ssl issue |
| 98 |
|
| 99 |
|
| 100 |
//wp_enqueue_script('owl.carousel', plugins_url( '/js/owl.carousel.js' , __FILE__ ) , array( 'jquery' )); |
| 101 |
|
| 102 |
//wp_enqueue_script('jquery.mixitup.min', plugins_url( '/js/jquery.mixitup.min.js' , __FILE__ ) , array( 'jquery' )); |
| 103 |
//wp_enqueue_script('jquery.mixitup-pagination', plugins_url( '/js/jquery.mixitup-pagination.js' , __FILE__ ) , array( 'jquery' )); |
| 104 |
wp_enqueue_script('masonry.pkgd.min', plugins_url( '/js/masonry.pkgd.min.js' , __FILE__ ) , array( 'jquery' )); |
| 105 |
|
| 106 |
//wp_enqueue_script('isotope.pkgd.min', plugins_url( '/js/isotope.pkgd.min.js' , __FILE__ ) , array( 'jquery' )); |
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
do_action('team_action_front_scripts'); |
| 111 |
} |
| 112 |
|
| 113 |
public function team_admin_scripts(){ |
| 114 |
|
| 115 |
wp_enqueue_script('jquery'); |
| 116 |
wp_enqueue_script('jquery-ui-core'); |
| 117 |
wp_enqueue_script('jquery-ui-sortable'); |
| 118 |
//wp_enqueue_script('jquery-ui-droppable'); |
| 119 |
|
| 120 |
wp_enqueue_script('team_admin_js', plugins_url( '/js/scripts-admin.js' , __FILE__ ) , array( 'jquery' )); |
| 121 |
wp_localize_script('team_admin_js', 'team_admin_ajax', array( 'team_admin_ajaxurl' => admin_url( 'admin-ajax.php'))); |
| 122 |
|
| 123 |
wp_enqueue_style('team_admin_style', plugins_url( 'css/style-admin.css', __FILE__ )); |
| 124 |
//wp_enqueue_style('team_admin_style', team_plugin_url.'css/style-admin.css'); //ssl issue |
| 125 |
|
| 126 |
|
| 127 |
//wp_enqueue_script('jquery.tablednd', plugins_url( '/js/jquery.tablednd.js' , __FILE__ ) , array( 'jquery' )); |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
//wp_enqueue_script( 'wp-color-picker' ); |
| 132 |
wp_enqueue_style( 'wp-color-picker' ); |
| 133 |
wp_enqueue_script( 'color-picker', plugins_url('/js/color-picker.js', __FILE__ ), array( 'wp-color-picker' ), true, true ); |
| 134 |
|
| 135 |
|
| 136 |
//ParaAdmin |
| 137 |
//wp_enqueue_style('ParaAdmin', team_plugin_url.'ParaAdmin/css/ParaAdmin.css'); //ssl issue |
| 138 |
wp_enqueue_style('ParaAdmin', plugins_url( 'ParaAdmin/css/ParaAdmin.css', __FILE__ )); |
| 139 |
wp_enqueue_script('ParaAdmin', plugins_url( 'ParaAdmin/js/ParaAdmin.js' , __FILE__ ) , array( 'jquery' )); |
| 140 |
|
| 141 |
|
| 142 |
do_action('team_action_admin_scripts'); |
| 143 |
} |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
} |
| 151 |
|
| 152 |
new Team(); |
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|