function sc_gallery_filter($prm1, $atts) { if (in_shortcode_blogger()) { return ' '; } if (get_custom_option('substitute_gallery_layout') == 'no') { return ''; } extract(shortcode_atts(array("columns" => 0, "order" => "asc", "orderby" => "", "link" => "attachment", "include" => "", "exclude" => "", "ids" => ""), $atts)); $post = get_post(); static $instance = 0; $instance++; $post_id = $post ? $post->ID : 0; if (empty($orderby)) { $orderby = 'post__in'; } else { $orderby = sanitize_sql_orderby($orderby); } if (!empty($include)) { $_attachments = get_posts(array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby)); $attachments = array(); foreach ($_attachments as $key => $val) { $attachments[$val->ID] = $_attachments[$key]; } } elseif (!empty($exclude)) { $attachments = get_children(array('post_parent' => $post_id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby)); } else { $attachments = get_children(array('post_parent' => $post_id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby)); } if (empty($attachments)) { return ''; } if (empty($columns) || $columns < 2) { $columns = 3; } //count($attachments); $columns = max(2, min(5, intval($columns))); $thumb_sizes = getThumbSizes(array('thumb_size' => 'classic' . min(4, $columns), 'thumb_crop' => true, 'sidebar' => false)); $output = '<div id="sc_gallery_' . $instance . '" class="sc_gallery columnsWrap">'; $i = 0; foreach ($attachments as $id => $attachment) { $thumb = getResizedImageTag(-$id, $thumb_sizes['w'], $thumb_sizes['h']); $full = wp_get_attachment_url($id); $url = get_permalink($id); $output .= ' <div class="columns1_' . $columns . '"> <div class="galleryPic"> ' . ($link == 'file' ? '<div class="thumb hoverIncrease" data-image="' . esc_attr($full) . '" data-title="' . esc_attr($attachment->post_excerpt) . '"> ' . $thumb . ' </div>' : '<div class="thumb"> <a href="' . $url . '">' . $thumb . '</a> </div>') . ' <h4>' . esc_attr($attachment->post_excerpt) . '</h4> </div> </div>'; } $output .= '</div>'; return $output; }
function end_lvl(&$output, $depth = 0, $args = array()) { $parent = $this->item_data; $menu_view = $parent->top_menu_view; $show_ul = true; $df = get_option('date_format'); $indent = str_repeat("\t", $depth); if ($menu_view == 'thumb') { if ($depth >= 1) { $show_ul = false; } } else { if ($menu_view == 'thumb_title') { if ($depth >= 2) { $show_ul = false; } } } if ($show_ul) { $output .= "{$indent}</ul>\n"; } $type_depth = 1; if ($menu_view == 'thumb') { $type_depth = 0; } $item = $this->level_holder; if ($depth == $type_depth) { /******* Making the placeholder ********/ if (!empty($this->level_holder)) { $item_id = $this->level_holder->object_id; $top_item = $this->item_data; $item = $this->level_holder; $thumb_size = getThumbSizes(array('thumb_size' => $this->top_menu_view == 'thumb_title' ? 'portfolio4' : 'image_large')); $width = $thumb_size['w']; $height = $thumb_size['h']; $item_thumb = getResizedImageUrl($item_id, $width, $height); if (empty($item_thumb)) { $item_thumb_url = $this->level_holder->item_thumb; $item_thumb = getResizedImageUrl($item_thumb_url, $width, $height); } $item_icon = $item->item_icon_class; if ($item->object != 'custom') { $post_id = $item->object_id; $item_pubdate = get_the_time($df, $post_id); $post_obj = get_post($post_id); if (is_object($post_obj)) { $author_id = $post_obj->post_author; $author_data = get_userdata($author_id); $author_url = get_author_posts_url($author_id); $author_name = $author_data->display_name; } else { $author_name = ''; } $post_comments = wp_count_comments($post_id); $comment_count = $post_comments->approved; $post_title = get_the_title($post_id); $post_link = $item->url; $vis_width = $width; $vis_height = $height; } if ($top_item->top_menu_view == 'thumb_title') { $output .= '<div class="item_placeholder"> <div class="thumb_wrap"><img src="' . $item_thumb . '" alt="" width="' . $vis_width . '" height="' . $vis_height . '" /></div> <div class="item_info"> <div class="item_pubdate"><span>' . __('Posted', 'themerex') . '</span> <em>' . $item_pubdate . '</em></div> <div class="item_comments"><span class="icon icon-comment-1"></span> <em>' . $comment_count . '</em></div> </div> </div>'; } else { if ($top_item->top_menu_view == 'thumb') { $this->thumb_placeholder = '<div class="item_placeholder"> <div class="thumb_wrap"><img src="' . $item_thumb . '" alt="" width="' . $vis_width . '" height="' . $vis_height . '" /></div> <h4 class="item_title"><a href="' . $post_link . '">' . $post_title . '</a></h4> <div class="item_info"> <div class="item_pubdate"><span>' . __('Posted', 'themerex') . '</span> <em>' . $item_pubdate . '</em></div> ' . (!empty($author_name) ? '<div class="item_author"><span>' . __('by', 'themerex') . '</span> <em>' . $author_name . '</em></div>' : '') . ' </div> </div>'; } } } } if (!empty($this->thumb_placeholder)) { if ($depth == $type_depth) { $output .= $this->thumb_placeholder; } } if ($depth == 0 && $menu_view != 'default') { $output .= '</li></ul>'; } }
function sc_text($atts, $content = null) { if (in_shortcode_blogger()) { return ''; } extract(shortcode_atts(array("id" => "", "align" => "left", "weight" => "inherit", "color" => "", "spacing" => "", "uppercase" => "", "height" => "", "class" => "", "size" => "", "position" => "inline", "box_style" => "none", "bg_color" => "", "icon_color" => "", "icon" => "", "icon_image" => "", "image_url" => "", "top" => "", "bottom" => "", "left" => "", "right" => ""), $atts)); $factor = array('inherit' => 1, 'small' => 0.35, 'medium' => 0.55, 'large' => 1.2, 'huge' => 2); $image_url = getAttachmentID($image_url); $font_size = $size; $style_icon = $icon != '' || $bg_color != '' ? 'icon' : ($image_url != '' || $icon_image != '' ? 'image' : ''); $block_size = getThumbSizes(array('thumb_size' => 'cub_mini', 'thumb_crop' => true, 'sidebar' => false)); $image_url = $image_url !== '' ? getResizedImageURL($image_url, $block_size['w'], $block_size['h']) : ''; $s = ($top !== '' ? 'margin-top:' . $top . 'px;' : '') . ($bottom !== '' ? 'margin-bottom:' . $bottom . 'px;' : '') . ($left !== '' ? 'margin-left:' . $left . 'px;' : '') . ($right !== '' ? 'margin-right:' . $right . 'px;' : '') . ($weight && $weight != 'inherit' ? 'font-weight:' . $weight . ';' : '') . ($color !== '' ? 'color:' . $color . ';' : '') . ($spacing !== '' ? 'letter-spacing: ' . $spacing . 'px;' : '') . ($uppercase == 'yes' || $uppercase == 'on' ? 'text-transform: uppercase;' : '') . ($size !== '' ? 'font-size: ' . $size . 'px;' : '') . ($height !== '' ? 'line-height: ' . $height . 'px;' : ''); $c = ($style_icon !== '' ? ' sc_text_style_' . $style_icon : '') . ($align !== '' ? ' sc_text_' . $align : '') . ($box_style !== '' && $box_style !== 'none' && $style_icon !== '' ? ' sc_text_icon_box_' . $box_style : '') . ($class !== '' ? ' ' . $class : ''); $c_ico = ' sc_icon_size_' . $size . ($position !== '' ? ' sc_icon_' . $position : ' sc_icon_inline') . ($box_style !== 'none' || $bg_color != '' ? ' sc_icon_box sc_icon_box_' . $box_style : '') . ($icon !== '' && $icon !== 'none' ? ' ' . $icon : ''); $s_ico = ($style_icon == 'icon' ? 'font-size: ' . $font_size . 'px; line-height: ' . $font_size . 'px; ' . ($icon_color !== '' ? 'color:' . $icon_color . ';' : '') : '') . ($style_icon == 'image' ? 'background-image:url(' . ($image_url !== '' ? $image_url : ($icon_image !== '' ? get_template_directory_uri() . '/images/icons/' . $icon_image . '.png' : '')) . ');' : '') . ('width: ' . $font_size . 'px;') . ('height: ' . $font_size . 'px;') . ($bg_color !== '' ? 'background-color: ' . $bg_color . ';' : ''); $icons = $style_icon !== '' ? '<span class="sc_icon ' . $c_ico . '" ' . ($s_ico != '' ? 'style="' . $s_ico . '"' : '') . '></span>' : ''; $icon_left_top = $icon_right = ''; if ($position == 'left' || $position == 'top' || $position == 'inline') { $icon_left_top = $icons; } else { if ($position == 'right') { $icon_right = $icons; } } return '<p ' . ($id ? ' id="sc_text_' . $id . '"' : '') . ' class="sc_text ' . $c . '"' . ($s != '' ? ' style="' . $s . '"' : '') . '>' . $icon_left_top . do_shortcode($content) . $icon_right . '</p>'; }
<article class="isotopeItem <?php echo 'post_format_' . $post_data['post_format'] . ($opt['number'] % 2 == 0 ? ' even' : ' odd') . ($opt['number'] == 0 ? ' first' : '') . ($opt['number'] == $opt['posts_on_page'] ? ' last' : '') . ($opt['add_view_more'] ? ' viewmore' : '') . (get_custom_option('show_filters') == 'yes' ? ' flt_' . join(' flt_', get_custom_option('filter_taxonomy') == 'categories' ? $post_data['post_categories_ids'] : $post_data['post_tags_ids']) : ''); ?> " data-postid="<?php echo esc_attr($post_data['post_id']); ?> "> <div class="isotopeItemWrap"> <?php //thumb if ($post_data['post_thumb']) { ?> <div class="thumb"> <?php $thumb_crop = array('portfolio_big' => '1', 'portfolio_medium' => '2', 'portfolio_mini' => '3'); $thumb_sizes = getThumbSizes(array('thumb_size' => getThumbColumns('cub', $thumb_crop[$post_data['post_layout']]), 'thumb_crop' => true, 'sidebar' => false)); $thumb_img = getResizedImageURL($post_data['post_attachment'], $thumb_sizes['w'], $thumb_sizes['h']); ?> <img src="<?php echo esc_url($thumb_img); ?> " alt="<?php echo esc_attr($post_data['post_title']); ?> "> </div> <?php } else { if ($post_data['post_gallery']) { echo balanceTags($post_data['post_gallery']); } else {
<div class="post_text_area"> <?php // Post content if ($post_data['post_protected']) { echo balanceTags($post_data['post_excerpt']); } else { echo balanceTags($post_data['post_content']); wp_link_pages(array('before' => '<div class="nav_pages_parts"><span class="pages">' . __('Pages:', 'themerex') . '</span>', 'after' => '</div>', 'link_before' => '<span class="page_num">', 'link_after' => '</span>')); } ?> </div> <div class="attachmentThumb"> <?php $thumb_sizes = getThumbSizes(array('thumb_size' => 'image_large', 'thumb_crop' => true, 'sidebar' => false)); $thumb_img = getResizedImageURL($post_data['post_attachment'], $thumb_sizes['w'], $thumb_sizes['h']); ?> <a href="<?php echo esc_url($post_data['post_attachment']); ?> " class="attachmentImg"><img alt="" src="<?php echo esc_url($thumb_img); ?> "></a> <?php $post = get_post(); $attachments = array_values(get_children(array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID'))); foreach ($attachments as $k => $attachment) { if ($attachment->ID == $post->ID) { break;
function getPostData(&$opt, $post_obj = null) { $opt = getPostDataOptions($opt); if (empty($opt['layout'])) { $opt['layout'] = !empty($opt['thumb_size']) ? $opt['thumb_size'] : 'excerpt'; } global $post, $wp_query; $old_post = null; if (!empty($post) && is_object($post)) { $old_post = clone $post; } if ($post_obj != null) { $post = $post_obj; setup_postdata($post); } $cur_post = clone $post; $post_id = get_the_ID(); $post_protected = post_password_required(); $post_format = get_post_format(); if (empty($post_format)) { $post_format = 'standard'; } $post_icon = getPostFormatIcon($post_format); $post_type = get_post_type(); $post_flags = array('sticky' => is_sticky()); $post_link = get_permalink(); $post_comments_link = get_comments_link(); $post_date_sql = get_the_date('Y-m-d H:i:s'); $post_date_stamp = get_the_date('U'); $post_date = getDateOrDifference($post_date_sql); if (!empty($opt['date_format'])) { $parts = explode('+', $opt['date_format']); $post_date_part1 = empty($parts[0]) ? '' : date($parts[0], $post_date_stamp); $post_date_part2 = empty($parts[1]) ? '' : date($parts[1], $post_date_stamp); if ($post_date_part1 . $post_date_part2 != '') { $post_date = $post_date_part1 . ($post_date_part2 != '' ? ' ' . $post_date_part2 : ''); } $post_date_part1 = get_the_date('j M'); } $post_comments = $post_views = $post_likes = 0; if ($opt['counters'] != 'none') { $post_comments = get_comments_number(); $post_views = getPostViews($post_id); $post_likes = getPostLikes($post_id); } $post_reviews_author = $post_reviews_users = 0; if ($opt['reviews']) { $post_reviews_author = ''; $post_reviews_users = ''; } $post_author = get_the_author(); $post_author_id = get_the_author_meta('ID'); $post_author_url = get_author_posts_url($post_author_id, ''); // Is user can edit and/or delete this post? $allow_editor = get_theme_option("allow_editor") == 'yes'; $post_edit_enable = $allow_editor && ($post_type == 'post' && current_user_can('edit_posts', $post_id) || $post_type == 'page' && current_user_can('edit_pages', $post_id)); $post_delete_enable = $allow_editor && ($post_type == 'post' && current_user_can('delete_posts', $post_id) || $post_type == 'page' && current_user_can('delete_pages', $post_id)); // Post content global $more; $old_more = $more; $more = -1; $post_content_original = trim(chop($post->post_content)); $post_content_plain = trim(chop(get_the_content())); $more = $old_more; $post_content = trim(chop(get_the_content($opt['more_tag'], $opt['strip_teaser']))); // Substitute WP [gallery] shortcode $thumb_sizes = getThumbSizes(array('thumb_size' => $opt['thumb_size'], 'thumb_crop' => $opt['thumb_crop'], 'sidebar' => $opt['sidebar'])); if ($opt['content']) { if ($opt['substitute_gallery']) { $post_content = substituteGallery($post_content, $post_id, $thumb_sizes['w'], $thumb_sizes['h_crop'], 'none', true); } $post_content = apply_filters('the_content', $post_content); if ($post_id != get_the_ID()) { // Fix bug in the WPML $post = $cur_post; setup_postdata($post); } if ($opt['substitute_video']) { $post_content = substituteVideo($post_content, $thumb_sizes['w'], $thumb_sizes['h_crop']); } if ($opt['substitute_audio']) { $post_content = substituteAudio($post_content); } } // Post excerpt $post_excerpt_original = $post->post_excerpt; $post_excerpt = has_excerpt() || $post_protected ? get_the_excerpt() : ''; if (empty($post_excerpt)) { if (($more_pos = themerex_strpos($post_content_plain, '<span id="more-')) !== false) { $post_excerpt = themerex_substr($post_content_plain, 0, $more_pos); } else { $post_excerpt = in_array($post_format, array('quote', 'link')) ? $post_content : strip_shortcodes(strip_tags(get_the_excerpt())); } } if ($opt['substitute_gallery']) { $post_excerpt = substituteGallery($post_excerpt, $post_id, $thumb_sizes['w'], $thumb_sizes['h_crop']); } $post_excerpt = apply_filters('themerex_sc_clear_around', $post_excerpt); $post_excerpt = apply_filters('the_excerpt', $post_excerpt); $post_excerpt = apply_filters('themerex_p_clear_around', $post_excerpt); if ($post_id != get_the_ID()) { // Fix bug in the WPML $post = $cur_post; setup_postdata($post); } if ($opt['substitute_video']) { $post_excerpt = substituteVideo($post_excerpt, $thumb_sizes['w'], $thumb_sizes['h_crop']); } if ($opt['substitute_audio']) { $post_excerpt = substituteAudio($post_excerpt); } $post_excerpt = trim(chop(str_replace(array('[...]', '[…]'), array('', ''), $post_excerpt))); // Post Title $post_title = $post_title_plain = trim(chop(get_the_title())); $post_title = apply_filters('the_title', $post_title); if ($post_id != get_the_ID()) { // Fix bug in the WPML $post = $cur_post; setup_postdata($post); } // Prepare dedicated content $opt['dedicated'] = get_dedicated_content(); //$opt['location'] = !empty($opt['location']) ? $opt['location'] : get_custom_option('dedicated_location'); $opt['location'] = !empty($opt['location']) ? $opt['location'] : 'left'; if (empty($opt['location']) || $opt['location'] == 'default') { $opt['location'] = get_custom_option('dedicated_location', '', $post_id); } if ($opt['location'] == 'alter' && !is_single() && (!is_page() || isset($wp_query->is_posts_page) && $wp_query->is_posts_page == 1)) { $loc = array('center', 'right', 'left'); $opt['location'] = $loc[($opt['number'] - 1) % count($loc)]; } if (!empty($opt['dedicated'])) { $class = getTagAttrib($opt['dedicated'], '<div class="sc_section>', 'class'); if ($opt['location'] == 'default') { if (($pos = themerex_strpos($class, 'sc_align')) !== false) { $pos += 8; $pos2 = themerex_strpos($class, ' ', $pos); $opt['location'] = $pos2 === false ? themerex_substr($class, $pos) : themerex_substr($class, $pos, $pos2 - $pos); } if ($opt['location'] == '' || $opt['location'] == 'default') { $opt['location'] = 'center'; } } if (!is_singular() || in_shortcode_blogger(true) || themerex_strpos($class, 'sc_align') !== false && themerex_strpos($class, 'columns') === false) { $class = str_replace(array('sc_alignright', 'sc_alignleft', 'sc_aligncenter'), array('', '', ''), $class) . ' sc_align' . $opt['location']; if ($opt['location'] == 'center' && themerex_strpos($class, 'columns2_3') === false && $opt['sidebar']) { $class = str_replace('columns', '_columns', $class) . ' columns2_3'; } else { if (($opt['location'] == 'left' || $opt['location'] == 'right') && themerex_strpos($class, 'columns1_2') === false) { // && $opt['sidebar']) $class = str_replace('columns', '_columns', $class) . ' columns1_2'; } } $opt['dedicated'] = setTagAttrib($opt['dedicated'], '<div class="sc_section>', 'class', $class); } } //else if ($opt['location']=='' || $opt['location']=='default') //$opt['location'] = 'center'; //if ($opt['location']=='default') $opt['location']='center'; $opt['post_class'] = themerex_strtoproper($opt['location']); // Substitute <video> tags to <iframe> in dedicated content if ($opt['substitute_video']) { $opt['dedicated'] = substituteVideo($opt['dedicated'], $thumb_sizes['w'], $thumb_sizes['h_crop']); } // Substitute <audio> tags with src from soundcloud to <iframe> if ($opt['substitute_audio']) { $opt['dedicated'] = substituteAudio($opt['dedicated']); } // Extract gallery, video and audio from full post content $post_thumb = $post_attachment = $post_gallery = $post_video = $post_audio = $post_url = $post_url_target = ''; if (themerex_substr($opt['layout'], 0, 6) == 'single') { $post_thumb = getResizedImageTag($post_id, $thumb_sizes['w'], $thumb_sizes['h'], null, false, false, true); } else { $post_thumb = getResizedImageTag($post_id, $thumb_sizes['w'], $post_type == 'product' && get_theme_option('crop_product_thumb') == 'no' ? null : $thumb_sizes['h']); } $post_attachment = wp_get_attachment_url(get_post_thumbnail_id($post_id)); if ($post_format == 'gallery') { $post_gallery = buildGalleryTag(getPostGallery($post_content_plain, $post_id, max(2, get_custom_option('gallery_max_slides'))), $thumb_sizes['w'], $thumb_sizes['h_crop'], false, get_custom_option('substitute_slider_engine') != 'flex' ? '' : $post_link); } else { if ($post_format == 'video') { $post_video = getPostVideo($post_content_original, false); if ($post_video == '') { $src = getVideoPlayerURL(getPostVideo($post_content_original, true), $post_thumb != ''); if ($src) { $post_video = substituteVideo('<video src="' . $src . '">', $thumb_sizes['w'], round($thumb_sizes['w'] / 16 * 9), false); } //$thumb_sizes['h_crop']); } if ($post_video != '' && $opt['substitute_video']) { $src = getVideoPlayerURL(getPostVideo($post_video), $post_thumb != ''); if ($src) { $post_video = substituteVideo('<video src="' . $src . '">', $thumb_sizes['w'], round($thumb_sizes['w'] / 16 * 9), false); } //$thumb_sizes['h_crop']); } } else { if ($post_format == 'audio') { $post_audio = getPostAudio($post_content_original, false); if ($post_audio == '') { $src = getPostAudio($post_content_original, true); if ($src) { $post_audio = substituteAudio('<audio src="' . $src . '"></audio>'); } } if ($post_audio != '' && $opt['substitute_audio'] == 'yes') { $src = getPostAudio($post_audio); $tag_t = getTagAttrib($post_audio, '[trx_audio]', 'title'); $tag_t = $tag_t == '' ? getTagAttrib($post_audio, '[audio]', 'title') : $tag_t; $tag_at = getTagAttrib($post_audio, '[trx_audio]', 'author'); $tag_at = $tag_at == '' ? getTagAttrib($post_audio, '[audio]', 'author') : $tag_at; if ($src) { $post_audio = substituteAudio('<audio title="' . $tag_t . '" author="' . $tag_at . '" src="' . $src . '"></audio>'); } } } } } if ($post_format == 'image' && !$post_thumb) { if (($src = getPostImage($post_content_original)) != '') { $post_thumb = getResizedImageTag($src, $thumb_sizes['w'], $thumb_sizes['h_crop']); } } if ($post_format == 'link') { $post_url_data = getPostLink($post_content_original, false); $post_link = $post_url = $post_url_data['url']; $post_url_target = $post_url_data['target']; } // Get all post's categories $post_categories_list = array(); $post_categories_ids = array(); $post_categories_slugs = array(); $post_categories_links = ''; $post_root_category = ''; if ($opt['categories_list']) { $post_categories_list = getCategoriesByPostId($post_id); $ex_cats = explode(',', get_theme_option('exclude_cats')); for ($i = 0; $i < count($post_categories_list); $i++) { if (in_array($post_categories_list[$i]['term_id'], $ex_cats)) { continue; } if ($post_root_category == '') { if (get_theme_option('close_category') == 'parental') { $parent_cat = getParentCategory($post_categories_list[$i]['term_id'], $opt['parent_cat_id']); if ($parent_cat) { $post_root_category = $parent_cat['name']; } } else { $post_root_category = $post_categories_list[$i]['name']; } } $post_categories_ids[] = $post_categories_list[$i]['term_id']; $post_categories_slugs[] = $post_categories_list[$i]['slug']; $post_categories_links .= '<a class="cat_link" href="' . $post_categories_list[$i]['link'] . '">' . $post_categories_list[$i]['name'] . ($i < count($post_categories_list) - 1 ? ',' : '') . '</a> '; } if ($post_root_category == '' && count($post_categories_list) > 0) { $post_root_category = $post_categories_list[0]['name']; } } // Get all post's tags $post_tags_list = array(); $post_tags_ids = array(); $post_tags_slugs = array(); $post_tags_links = ''; if ($opt['tags_list']) { if (($post_tags_list = get_the_tags()) != 0) { $tag_number = 0; foreach ($post_tags_list as $tag) { $tag_number++; $post_tags_links .= '<a class="tag_link" href="' . get_tag_link($tag->term_id) . '">' . $tag->name . ($tag_number == count($post_tags_list) ? '' : ',') . '</a> '; $post_tags_ids[] = $tag->term_id; $post_tags_slugs[] = $tag->slug; } } else { if (!is_array($post_tags_list)) { $post_tags_list = array(); } } } if ($old_post != null) { $post = $old_post; setup_postdata($post); } $post_data = compact('post_id', 'post_protected', 'post_type', 'post_format', 'post_flags', 'post_icon', 'post_link', 'post_comments_link', 'post_date_sql', 'post_date_stamp', 'post_date', 'post_date_part1', 'post_date_part2', 'post_comments', 'post_views', 'post_likes', 'post_reviews_author', 'post_reviews_users', 'post_author', 'post_author_id', 'post_author_url', 'post_title', 'post_title_plain', 'post_content_plain', 'post_content_original', 'post_content', 'post_excerpt_original', 'post_excerpt', 'post_thumb', 'post_attachment', 'post_gallery', 'post_video', 'post_audio', 'post_url', 'post_url_target', 'post_categories_list', 'post_categories_slugs', 'post_categories_ids', 'post_categories_links', 'post_root_category', 'post_tags_list', 'post_tags_ids', 'post_tags_slugs', 'post_tags_links', 'post_edit_enable', 'post_delete_enable'); return apply_filters('themerex_get_post_data', $post_data, $opt, $post_obj); }