OS : Linux
PHP Version : 7.4.33
Software : ' .
'<' . esc_html($tag) . ' class="cmsmasters_profile_title entry-title">' .
'' . cmsmasters_title($cmsmasters_id, false) . '' .
'' . esc_html($tag) . '>';
if ($sub_title && $sub_title != '') {
$out .= '<' . esc_html($tag_sub) . ' class="cmsmasters_profile_subtitle">' .
esc_html($sub_title) .
'' . esc_html($tag_sub) . '>';
}
$out .= '';
if ($show) {
echo $out;
} else {
return $out;
}
}
/* Get Profiles Heading Without Link Function */
function total_school_profile_title_nolink($cmsmasters_id, $tag = 'h1', $sub_title = false, $tag_sub = 'h5', $show = true) {
$out = '<' . esc_html($tag) . ' class="cmsmasters_profile_title entry-title">' .
cmsmasters_title($cmsmasters_id, false) .
'' . esc_html($tag) . '>';
if ($sub_title && $sub_title != '') {
$out .= '<' . esc_html($tag_sub) . ' class="cmsmasters_profile_subtitle">' .
esc_html($sub_title) .
'' . esc_html($tag_sub) . '>';
}
if ($show) {
echo $out;
} else {
return $out;
}
}
/* Get Profiles Content/Excerpt Function */
function total_school_profile_exc_cont($show = true) {
$out = cmsmasters_divpdel('' . "\n" .
wpautop(theme_excerpt(20, false)) .
'
' . "\n");
if (theme_excerpt(20, false) != '') {
if ($show) {
echo $out;
} else {
return $out;
}
}
}
/* Get Profiles Category Function */
function total_school_get_profile_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' . '_profile_post_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_profile_likes($template_type = 'page', $show = true) {
$out = '';
if ($template_type == 'page') {
$out = cmsmasters_like('cmsmasters_profile_likes');
} elseif ($template_type == 'post') {
$cmsmasters_option = total_school_get_global_options();
if ($cmsmasters_option['total-school' . '_profile_post_like']) {
$out = '' .
'
' . esc_html__('Likes', 'total-school') . ':' . '
' .
'
' .
cmsmasters_like('cmsmasters_profile_likes') .
'
' .
'
';
}
}
if ($show) {
echo $out;
} else {
return $out;
}
}
/* Get Profiles Comments Function */
function total_school_get_profile_comments($template_type = 'page', $show = true) {
$out = '';
if (comments_open()) {
if ($template_type == 'page') {
$out = total_school_get_comments('cmsmasters_profile_comments');
} elseif ($template_type == 'post') {
$cmsmasters_option = total_school_get_global_options();
if ($cmsmasters_option['total-school' . '_profile_post_comment']) {
$out .= '' .
'
' . esc_html__('Comments', 'total-school') . ':' . '
' .
'' .
'
';
}
}
}
if ($show) {
echo $out;
} else {
return $out;
}
}
/* Get Profiles Features Function */
function total_school_get_profile_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="profile_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 Profiles Social Icons Function */
function total_school_profile_social_icons($social_icons, $title_box = false, $tag = 'h2', $show = true) {
if ($social_icons != '') {
$out = '';
if ($title_box) {
$out .= '<' . esc_html($tag) . ' class="profile_social_icons_title">' . esc_html($title_box) . '' . esc_html($tag) . '>';
}
$out .= '
';
$social_icon_styles = '';
foreach($social_icons as $social_icon) {
$social_icon_item = explode('|', $social_icon);
$uniqid = uniqid();
$social_icon_icon = trim($social_icon_item[0]);
$social_icon_link = trim($social_icon_item[1]);
$social_icon_title = trim($social_icon_item[2]);
$social_icon_target = trim($social_icon_item[3]);
$social_icon_color = (isset($social_icon_item[4]) ? trim($social_icon_item[4]) : '');
$social_icon_hover = (isset($social_icon_item[5]) ? trim($social_icon_item[5]) : '');
if (
($social_icon_color != '') ||
($social_icon_hover != '')
) {
$social_icon_color_class = ' cmsmasters_social_icon_color';
} else {
$social_icon_color_class = '';
}
$out .= '- ' .
'' .
'
';
if ($social_icon_color != '') {
$social_icon_styles .= "
#page .cmsmasters_social_icon_color.cmsmasters_social_icon_{$uniqid} {
background-color:{$social_icon_color};
}
";
}
if ($social_icon_hover != '') {
$social_icon_styles .= "
#page .cmsmasters_social_icon_color.cmsmasters_social_icon_{$uniqid}:hover {
background-color:{$social_icon_hover};
}";
}
}
$out .= '
';
if ($social_icon_styles != '') {
echo '';
}
$out .= '
';
if ($show) {
echo $out;
} else {
return $out;
}
}
}