Pirate Rogue, Pirate Crew and GitHub Updater

This commit is contained in:
Jan
2019-06-15 16:55:09 +02:00
committed by JanRei
commit 6fb8ec3762
339 changed files with 106604 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
/*
* crew Shortcode
*/
$out = '';
extract(shortcode_atts(array(
'id' => false
), $atts));
$options = $this->get_options('pirate_crew', $id);
if (!$options) {
$out = '<div class="pirate-crew-error">' . __('Crew not found', 'pirate-crew') . '</div>';
return $out;
}
if (empty($options['memberlist'])) {
$out = '<div class="pirate-crew-error">' . __('No members found', 'pirate-crew') . '</div>';
return $out;
}
$template = $this->settings['plugin_path'] . 'templates/' . $options['team-style'] . '.php';
if (file_exists($template)) {
$teamargs = array(
'orderby' => 'post__in',
'post_type' => 'pirate_crew_member',
'post__in' => $options['memberlist'],
'posts_per_page' => -1 ,
);
$team = new WP_Query($teamargs);
ob_start();
include $template;
$var = ob_get_contents();
ob_end_clean();
// wp_reset_postdata();
$out = $var;
}