| 1 |
<?php |
| 2 |
|
| 3 |
/* |
| 4 |
* @Author ParaTheme |
| 5 |
* @Folder Team/Includes |
| 6 |
* @version 3.0.5 |
| 7 |
|
| 8 |
* Copyright: 2015 ParaTheme |
| 9 |
*/ |
| 10 |
|
| 11 |
if ( ! defined('ABSPATH')) exit; // if direct access |
| 12 |
|
| 13 |
|
| 14 |
class class_team_shortcodes { |
| 15 |
|
| 16 |
|
| 17 |
public function __construct() |
| 18 |
{ |
| 19 |
|
| 20 |
add_shortcode( 'team', array( $this, 'team_display' ) ); |
| 21 |
//add_action( 'admin_menu', array( $this, 'admin_menu' ), 12 ); |
| 22 |
//add_action('admin_menu', array($this, 'create_menu')); |
| 23 |
} |
| 24 |
|
| 25 |
public function team_display($atts, $content = null ) { |
| 26 |
$atts = shortcode_atts( |
| 27 |
array( |
| 28 |
'id' => "", |
| 29 |
|
| 30 |
), $atts); |
| 31 |
|
| 32 |
$html = ''; |
| 33 |
$post_id = $atts['id']; |
| 34 |
|
| 35 |
$team_themes = get_post_meta( $post_id, 'team_themes', true ); |
| 36 |
|
| 37 |
$class_team_functions = new class_team_functions(); |
| 38 |
$team_themes_dir = $class_team_functions->team_themes_dir(); |
| 39 |
$team_themes_url = $class_team_functions->team_themes_url(); |
| 40 |
|
| 41 |
//var_dump($team_themes_url); |
| 42 |
|
| 43 |
|
| 44 |
echo '<link type="text/css" media="all" rel="stylesheet" href="'.$team_themes_url[$team_themes].'/style.min.css" >'; |
| 45 |
|
| 46 |
include $team_themes_dir[$team_themes].'/index.php'; |
| 47 |
|
| 48 |
return $html; |
| 49 |
|
| 50 |
|
| 51 |
} |
| 52 |
|
| 53 |
} |
| 54 |
|
| 55 |
|
| 56 |
new class_team_shortcodes(); |
| 57 |
|
| 58 |
|