/** * Returns the information to display release information in place of the shortcode. * @return string */ function get_sReleaseBar($release) { global $wpdb; $project = $wpdb->get_row($wpdb->prepare("SELECT * FROM `{$wpdb->prefix}projects` WHERE `id` = '%d'", $release->project_id)); $output = ''; if ($release) { if (file_exists(get_sTemplate('shortcode-download-release.php'))) { include get_sTemplate('shortcode-download-release.php'); } } return $output; }
function template_sProjects($content) { global $wp, $wp_query, $post; $projectDirUrl = wpmanga_get('wpmanga_projectslist_url', 'projects'); if ($wp->query_vars["pagename"] == $projectDirUrl) { if ($wp->query_vars["pid"]) { $template = 'page-projects-details.php'; } else { $template = 'page-projects.php'; } if (file_exists(TEMPLATEPATH . '/' . $template)) { $templatePath = TEMPLATEPATH . '/' . $template; } else { $templatePath = get_sTemplate($template); } include $templatePath; } else { return $content; } }
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); $projectCategory = $instance['projectCategory']; echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } else { echo $before_title . __('Chapters Progress') . $after_title; } if (file_exists(get_sTemplate('widget-chapters-progress.php'))) { include get_sTemplate('widget-chapters-progress.php'); } echo $after_widget; }