OS : Linux
PHP Version : 7.4.33
Software : ' .
'<' . esc_html($tag) . ' class="cmsmasters_project_title entry-title">' .
'' . cmsmasters_title($cmsmasters_id, false) . '' .
'' . esc_html($tag) . '>' .
'';
if ($show) {
echo $out;
} else {
return $out;
}
}
/* Get Projects Heading Without Link Function */
function total_school_project_title_nolink($cmsmasters_id, $tag = 'h1', $show = true) {
$out = '<' . esc_html($tag) . ' class="cmsmasters_project_title entry-title">' .
cmsmasters_title($cmsmasters_id, false) .
'' . esc_html($tag) . '>';
if ($show) {
echo $out;
} else {
return $out;
}
}
/* Get Projects Content/Excerpt Function */
function total_school_project_exc_cont($show = true) {
$out = cmsmasters_divpdel('' . "\n" .
wpautop(theme_excerpt(20, false)) .
'
' . "\n");
if ($show) {
echo $out;
} else {
return $out;
}
}
/* Check Projects Content/Excerpt Not Empty Function */
function total_school_project_check_exc_cont() {
$exc = total_school_project_exc_cont(false);
$no_tags_exc = strip_tags($exc);
$trim_exc = trim($no_tags_exc);
if ($trim_exc != '') {
return true;
} else {
return false;
}
}
/* Get Projects Category Function */
function total_school_get_project_category($cmsmasters_id, $taxonomy, $template_type = 'page', $show = true) {
$out = '';
if (get_the_terms($cmsmasters_id, $taxonomy)) {
if ($template_type == 'page') {
$out = '' .
total_school_get_the_category_list($cmsmasters_id, $taxonomy, ', ') .
'';
} elseif ($template_type == 'post') {
$cmsmasters_option = total_school_get_global_options();
if ($cmsmasters_option['total-school' . '_portfolio_project_cat']) {
$out .= '' .
'
' . esc_html__('Categories', 'total-school') . ':' . '
' .
'
' .
'' .
total_school_get_the_category_list($cmsmasters_id, $taxonomy, ', ') .
'' .
'
' .
'
';
}
}
}
if ($show) {
echo $out;
} else {
return $out;
}
}
/* Get Projects Like Function */
function total_school_get_project_likes($template_type = 'page', $show = true) {
$out = '';
if ($template_type == 'page') {
$out = cmsmasters_like('cmsmasters_project_likes');
} elseif ($template_type == 'post') {
$cmsmasters_option = total_school_get_global_options();
if ($cmsmasters_option['total-school' . '_portfolio_project_like']) {
$out = '' .
'
' . esc_html__('Likes', 'total-school') . ':' . '
' .
'
' .
cmsmasters_like('cmsmasters_project_likes') .
'
' .
'
';
}
}
if ($show) {
echo $out;
} else {
return $out;
}
}
/* Get Projects Comments Function */
function total_school_get_project_comments($template_type = 'page', $show = true) {
$out = '';
if (comments_open()) {
if ($template_type == 'page') {
$out = total_school_get_comments('cmsmasters_project_comments');
} elseif ($template_type == 'post') {
$cmsmasters_option = total_school_get_global_options();
if ($cmsmasters_option['total-school' . '_portfolio_project_comment'] && comments_open()) {
$out = '' .
'
' . esc_html__('Comments', 'total-school') . ':' . '
' .
'' .
'
';
}
}
}
if ($show) {
echo $out;
} else {
return $out;
}
}
/* Get Projects Date Function */
function total_school_get_project_date($template_type = 'page', $show = true) {
if ($template_type == 'page') {
$out = '' .
esc_html(get_the_date()) .
'' .
'' .
esc_html(get_the_modified_date()) .
'';
} elseif ($template_type == 'post') {
$cmsmasters_option = total_school_get_global_options();
$out = '';
if ($cmsmasters_option['total-school' . '_portfolio_project_date']) {
$out .= '' .
'
' . esc_html__('Date', 'total-school') . ':' . '
' .
'
' .
'
' .
esc_html(get_the_date()) .
'' .
'
' .
esc_html(get_the_modified_date()) .
'' .
'
' .
'
';
}
}
if ($show) {
echo $out;
} else {
return $out;
}
}
/* Get Projects Author Function */
function total_school_get_project_author($template_type = 'page', $show = true) {
if ($template_type == 'page') {
$out = '' .
esc_html__('By', 'total-school') . ' ' .
'' . esc_html(get_the_author_meta('display_name')) . '' .
'';
} elseif ($template_type == 'post') {
$cmsmasters_option = total_school_get_global_options();
$out = '';
if ($cmsmasters_option['total-school' . '_portfolio_project_author']) {
$out .= '' .
'
' . esc_html__('Author', 'total-school') . ':' . '
' .
'
' .
'
';
}
}
if ($show) {
echo $out;
} else {
return $out;
}
}
/* Get Projects Tags Function */
function total_school_get_project_tags($cmsmasters_id, $taxonomy, $show = true) {
if (get_the_terms($cmsmasters_id, $taxonomy)) {
$cmsmasters_option = total_school_get_global_options();
$out = '';
if ($cmsmasters_option['total-school' . '_portfolio_project_tag']) {
$out = '' .
'
' . esc_html__('Tags', 'total-school') . ':' . '
' .
'
' .
'' .
get_the_term_list($cmsmasters_id, $taxonomy, '', ', ', '') .
'' .
'
' .
'
';
}
if ($show) {
echo $out;
} else {
return $out;
}
}
}
/* Get Projects Features Function */
function total_school_get_project_features($features_position = 'features', $features = '', $features_title = false, $tag = 'h2', $show = true) {
if (
(
!empty($features[0][0]) &&
!empty($features[0][1])
) || (
!empty($features[1][0]) &&
!empty($features[1][1])
)
) {
$out = '';
if ($features_position == 'features') {
$out .= '' .
($features_title ? '<' . esc_html($tag) . ' class="project_features_title">' . esc_html($features_title) . '' . esc_html($tag) . '>' : '');
}
foreach ($features as $feature) {
if ($feature[0] != '' && $feature[1] != '') {
$feature_lists = explode("\n", $feature[1]);
$out .= '
' .
'
' . esc_html($feature[0]) . '
' .
'
';
foreach ($feature_lists as $feature_list) {
$out .= trim($feature_list);
}
$out .= '
' .
'
';
}
}
if ($features_position == 'features') {
$out .= '
';
}
if ($show) {
echo $out;
} else {
return $out;
}
}
}
/* Get Projects Link Function */
function total_school_project_link($link_text, $link_url, $link_target, $show = true) {
$cmsmasters_option = total_school_get_global_options();
$out = '';
if (
$cmsmasters_option['total-school' . '_portfolio_project_link'] &&
$link_text != '' &&
$link_url != ''
) {
$out = '' .
'
' . esc_html__('Project Link', 'total-school') . ':' . '
' .
'
' .
'
';
}
if ($show) {
echo $out;
} else {
return $out;
}
}