$number)); $date_format = isset($data['date_format']) ? $data['date_format'] : $date_format; $post_type = fansub_horriblesubs_get_post_type(); $option_data = fansub_horriblesubs_get_option(); $query_vars = $query->query_vars; $post_not_in = isset($query->query_vars['post__not_in']) ? $query->query_vars['post__not_in'] : array(); $refresh_text = fansub_get_value_by_key($option_data, 'refresh_text'); $clear_text = fansub_get_value_by_key($option_data, 'clear_text'); ob_start(); ?>

    have_posts()) { $query->the_post(); $post = get_post(get_the_ID()); $post_not_in[] = $post->ID; $post_title = $post->post_title; $post_link = '#'; $suffix = ''; $parts = array(); if ('episode' == $post->post_type) { $parts = fansub_horriblesubs_convert_post_title_to_parts($post->post_title); array_shift($parts); $parts = array_map('trim', $parts); $animation_id = get_post_meta($post->ID, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { $post_title = $animation->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $suffix = '' . ' - ' . $part . ''; } } } elseif ('batch' == $post->post_type) { $parts = fansub_horriblesubs_convert_post_title_to_parts($post->post_title); array_shift($parts); $parts = array_map('trim', $parts); $episode_id = get_post_meta($post->ID, 'episode', true); if (is_numeric($episode_id) && $episode_id > 0) { $animation_id = get_post_meta($episode_id, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { $post_title = $animation->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $tmp_part = array_pop($parts); if (!empty($tmp_part)) { $part = $tmp_part . '-' . $part; } $suffix = '' . ' - ' . $part . ''; } } } else { $animation_id = get_post_meta($post->ID, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { $post_title = $animation->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $tmp_part = array_pop($parts); if (!empty($tmp_part)) { //$part = $tmp_part . '-' . $part; } $suffix = '' . ' - ' . $part . ''; } } } $post_title = $post->post_title; } else { $post_title = $post->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $post->ID); } $link_html = new FANSUB_HTML('a'); $link_html->set_href($post_link); $link_html->set_text($post_title); $link_html->set_class('post-title-link'); $saved_suffix = get_post_meta($post->ID, 'suffix', true); if ('batch' == $post->post_type) { $suffix = ''; } if (!empty($saved_suffix)) { $suffix = '' . ' - ' . $saved_suffix . ''; } $qs = fansub_ph_get_qualities_and_servers(get_the_ID()); $qualities = $qs['qualities']; $servers = $qs['servers']; ?>
  • post_type)); ?>>
    • output(); ?>
      • ID, $file_name_key, true); if (empty($file_name)) { if ('episode' == $post->post_type) { $ep_am_id = get_post_meta($post->ID, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } elseif ('batch' == $post->post_type) { $bt_ep_id = get_post_meta($post->ID, 'episode', true); if (fansub_id_number_valid($bt_ep_id)) { $ep_am_id = get_post_meta($bt_ep_id, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } else { $ep_am_id = get_post_meta($post->ID, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } } } else { if (!fansub_string_contain($file_name, $quality)) { //$file_name .= ' [' . $quality . ']'; } } $quality_item_class = 'quality quality-' . $quality; $server_items_html = '
      • ' . $file_name . '
      • '; $server_items_html .= fansub_ph_servers_loop($servers, $quality, $post, $quality_item_class); fansub_ph_quality_item_html($quality, $quality_item_class, $server_items_html); ?>
post_type) { if ('private' == $animation->post_status) { return ''; } $defaults = fansub_horriblesubs_get_option_defaults(); $option_data = fansub_horriblesubs_get_option(); $option_data = shortcode_atts($defaults, $option_data); $option_data = shortcode_atts($option_data, $atts); $single_batch_title = fansub_get_value_by_key($option_data, 'single_batch_title'); $single_episode_title = fansub_get_value_by_key($option_data, 'single_episode_title'); $post_number = fansub_get_value_by_key($option_data, 'posts_per_page'); $date_format = fansub_get_value_by_key($option_data, 'date_format'); $single_page = fansub_get_value_by_key($option_data, 'single_page'); $release_box_search_placeholder = fansub_get_value_by_key($option_data, 'release_box_search_placeholder'); $single_search_placeholder = fansub_get_value_by_key($option_data, 'single_search_placeholder'); $data = $option_data; $post_not_in = isset($query->query_vars['post__not_in']) ? $query->query_vars['post__not_in'] : array(); $refresh_text = fansub_get_value_by_key($option_data, 'refresh_text'); $clear_text = fansub_get_value_by_key($option_data, 'clear_text'); $episode = fansub_query_post_by_meta('animation', $animation->ID, array( 'post_type' => 'episode', 'posts_per_page' => $post_number ), 'numeric'); $batch = new WP_Query(array('post_type' => 'batch', 'posts_per_page' => $post_number)); $batches = array(); if ($episode->have_posts()) { foreach ($episode->posts as $apost) { $saved = get_post_meta($apost->ID, 'batches', true); if (fansub_array_has_value($saved)) { $batches = array_merge($batches, $saved); } } } $am_batches = get_post_meta($animation->ID, 'batches', true); if (is_array($batches) && is_array($am_batches)) { $batches = array_merge($batches, $am_batches); } $batches = fansub_sanitize_array($batches); if (fansub_array_has_value($batches)) { $batch_args = array( 'post_type' => 'batch', 'post__in' => $batches, 'posts_per_page' => -1 ); $batch = fansub_query($batch_args); } if (!$batch->have_posts() || !$episode->have_posts()) { $batches = get_post_meta($animation->ID, 'batches', true); $batches = fansub_sanitize_array($batches); $batch_args = array( 'post_type' => 'batch', 'post__in' => $batches, 'posts_per_page' => -1 ); $batch = fansub_query($batch_args); } $post_content = apply_filters('the_content', $animation->post_content); ob_start(); ?>
false, 'bfi_thumb' => false, 'post_id' => $animation->ID )); ?>

have_posts() && 1 == 2) : ?>
have_posts()) : ?>
    have_posts()) { $query_vars = $query->query_vars; while ($query->have_posts()) { $query->the_post(); $post = get_post(get_the_ID()); $post_not_in[] = $post->ID; $post_title = $post->post_title; $post_link = '#'; $suffix = ''; if (!$have_batch) { $saved_ep = get_post_meta($post->ID, 'episode', true); $saved_am = get_post_meta($saved_ep, 'animation', true); if ($saved_am == $animation->ID) { $have_batch = true; } else { $saved_am = get_post_meta($post->ID, 'animation', true); if ($saved_am == $animation->ID) { $have_batch = true; } else { continue; } } } $parts = array(); if ('episode' == $post->post_type) { $parts = fansub_horriblesubs_convert_post_title_to_parts($post->post_title); array_shift($parts); $parts = array_map('trim', $parts); $animation_id = get_post_meta($post->ID, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $suffix = '' . ' - ' . $part . ''; } } } elseif ('batch' == $post->post_type) { $parts = fansub_horriblesubs_convert_post_title_to_parts($post->post_title); array_shift($parts); $parts = array_map('trim', $parts); $episode_id = get_post_meta($post->ID, 'episode', true); if (is_numeric($episode_id) && $episode_id > 0) { $animation_id = get_post_meta($episode_id, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $tmp_part = array_pop($parts); if (!empty($tmp_part)) { $part = $tmp_part . '-' . $part; } $suffix = '' . ' - ' . $part . ''; } } } else { $animation_id = get_post_meta($post->ID, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $tmp_part = array_pop($parts); if (!empty($tmp_part)) { $part = $tmp_part . '-' . $part; } $suffix = '' . ' - ' . $part . ''; } } } } else { $post_title = $post->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $post->ID); } if (fansub_array_has_value($parts)) { } $link_html = new FANSUB_HTML('span'); $link_html->set_text($post_title); $link_html->set_class('post-title-link'); $saved_suffix = get_post_meta($post->ID, 'suffix', true); if (!empty($saved_suffix)) { $suffix = '' . ' - ' . $saved_suffix . ''; } $qs = fansub_ph_get_qualities_and_servers(get_the_ID()); $qualities = $qs['qualities']; $servers = $qs['servers']; ?>
  • post_type)); ?>>
    • output(); ?>
      • ID, $file_name_key, true); if (empty($file_name)) { if ('episode' == $post->post_type) { $ep_am_id = get_post_meta($post->ID, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } elseif ('batch' == $post->post_type) { $bt_ep_id = get_post_meta($post->ID, 'episode', true); if (fansub_id_number_valid($bt_ep_id)) { $ep_am_id = get_post_meta($bt_ep_id, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } else { $ep_am_id = get_post_meta($post->ID, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } } } else { if (!fansub_string_contain($file_name, $quality)) { //$file_name .= ' [' . $quality . ']'; } } $quality_item_class = 'quality quality-' . $quality; $server_items_html = '
      • ' . $file_name . '
      • '; $server_items_html .= fansub_ph_servers_loop($servers, $quality, $post, $quality_item_class); fansub_ph_quality_item_html($quality, $quality_item_class, $server_items_html); ?>
  • ' . fansub_get_value_by_key($option_data, 'single_batch_none') . ''; } } else { echo '
  • ' . fansub_get_value_by_key($option_data, 'single_batch_none') . '
  • '; } ?>
have_posts() && $have_batch && 1 == 2) : ?>

have_posts()) : ?>
    have_posts()) { $query_vars = $episode->query_vars; while ($episode->have_posts()) { $episode->the_post(); $post = get_post(get_the_ID()); $post_not_in[] = $post->ID; $post_title = $post->post_title; $post_link = '#'; $suffix = ''; $parts = array(); if ('episode' == $post->post_type) { $parts = fansub_horriblesubs_convert_post_title_to_parts($post->post_title); array_shift($parts); $parts = array_map('trim', $parts); $animation_id = get_post_meta($post->ID, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $suffix = '' . ' - ' . $part . ''; } } } elseif ('batch' == $post->post_type) { $parts = fansub_horriblesubs_convert_post_title_to_parts($post->post_title); array_shift($parts); $parts = array_map('trim', $parts); $episode_id = get_post_meta($post->ID, 'episode', true); if (is_numeric($episode_id) && $episode_id > 0) { $animation_id = get_post_meta($episode_id, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $tmp_part = array_pop($parts); if (!empty($tmp_part)) { $part = $tmp_part . '-' . $part; } $suffix = '' . ' - ' . $part . ''; } } } else { $animation_id = get_post_meta($post->ID, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $tmp_part = array_pop($parts); if (!empty($tmp_part)) { $part = $tmp_part . '-' . $part; } $suffix = '' . ' - ' . $part . ''; } } } } else { $post_title = $post->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $post->ID); } $link_html = new FANSUB_HTML('span'); $link_html->set_text($post_title); $link_html->set_class('post-title-link'); $saved_suffix = get_post_meta($post->ID, 'suffix', true); if (!empty($saved_suffix)) { $suffix = '' . ' - ' . $saved_suffix . ''; } $qs = fansub_ph_get_qualities_and_servers(get_the_ID()); $qualities = $qs['qualities']; $servers = $qs['servers']; ?>
  • post_type)); ?>>
    • output(); ?>
      • ID, $file_name_key, true); if (empty($file_name)) { if ('episode' == $post->post_type) { $ep_am_id = get_post_meta($post->ID, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } elseif ('batch' == $post->post_type) { $bt_ep_id = get_post_meta($post->ID, 'episode', true); if (fansub_id_number_valid($bt_ep_id)) { $ep_am_id = get_post_meta($bt_ep_id, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } else { $ep_am_id = get_post_meta($post->ID, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } } } else { if (!fansub_string_contain($file_name, $quality)) { //$file_name .= ' [' . $quality . ']'; } } $quality_item_class = 'quality quality-' . $quality; $server_items_html = '
      • ' . $file_name . '
      • '; $server_items_html .= fansub_ph_servers_loop($servers, $quality, $post, $quality_item_class); fansub_ph_quality_item_html($quality, $quality_item_class, $server_items_html); ?>
  • ' . fansub_get_value_by_key($option_data, 'single_episode_none') . ''; } ?>
have_posts()) : ?>
ID, array( 'post_type' => 'video', 'posts_per_page' => -1 ), 'numeric'); $video_box_title = fansub_get_value_by_key($option_data, 'video_box_title', 'Promotional Videos'); if ($video->have_posts()) { ?>

ID)) : ?>

ID); ?>
$number, 'post_type' => 'episode' ); $query = fansub_query($query_args); $date_format = isset($data['date_format']) ? $data['date_format'] : $date_format; $post_type = fansub_horriblesubs_get_post_type(); $option_data = fansub_horriblesubs_get_option(); $query_vars = $query->query_vars; $post_not_in = isset($query->query_vars['post__not_in']) ? $query->query_vars['post__not_in'] : array(); $refresh_text = fansub_get_value_by_key($option_data, 'refresh_text'); $clear_text = fansub_get_value_by_key($option_data, 'clear_text'); ob_start(); ?>

    have_posts()) { $query->the_post(); $post = get_post(get_the_ID()); $post_not_in[] = $post->ID; $post_title = ''; $post_link = '#'; $suffix = ''; $parts = array(); if ('episode' == $post->post_type) { $parts = fansub_horriblesubs_convert_post_title_to_parts($post->post_title); array_shift($parts); $parts = array_map('trim', $parts); $animation_id = get_post_meta($post->ID, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { $post_title = $animation->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $suffix = '' . ' - ' . $part . ''; } } } elseif ('batch' == $post->post_type) { $parts = fansub_horriblesubs_convert_post_title_to_parts($post->post_title); array_shift($parts); $parts = array_map('trim', $parts); $episode_id = get_post_meta($post->ID, 'episode', true); if (is_numeric($episode_id) && $episode_id > 0) { $animation_id = get_post_meta($episode_id, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { $post_title = $animation->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $tmp_part = array_pop($parts); if (!empty($tmp_part)) { $part = $tmp_part . '-' . $part; } $suffix = '' . ' - ' . $part . ''; } } } else { $animation_id = get_post_meta($post->ID, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { $post_title = $animation->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $tmp_part = array_pop($parts); if (!empty($tmp_part)) { $part = $tmp_part . '-' . $part; } $suffix = '' . ' - ' . $part . ''; } } } } else { $post_title = $post->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $post->ID); } $link_html = new FANSUB_HTML('a'); $link_html->set_href($post_link); $link_html->set_text($post_title); $link_html->set_class('post-title-link'); $saved_suffix = get_post_meta($post->ID, 'suffix', true); if (!empty($saved_suffix)) { $suffix = '' . ' - ' . $saved_suffix . ''; } $qs = fansub_ph_get_qualities_and_servers(get_the_ID()); $qualities = $qs['qualities']; $servers = $qs['servers']; ?>
  • post_type)); ?>>
    • output(); ?>
      • ID, $file_name_key, true); if (empty($file_name)) { if ('episode' == $post->post_type) { $ep_am_id = get_post_meta($post->ID, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } elseif ('batch' == $post->post_type) { $bt_ep_id = get_post_meta($post->ID, 'episode', true); if (fansub_id_number_valid($bt_ep_id)) { $ep_am_id = get_post_meta($bt_ep_id, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } else { $ep_am_id = get_post_meta($post->ID, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } } } else { if (!fansub_string_contain($file_name, $quality)) { //$file_name .= ' [' . $quality . ']'; } } $quality_item_class = 'quality quality-' . $quality; $server_items_html = '
      • ' . $file_name . '
      • '; $server_items_html .= fansub_ph_servers_loop($servers, $quality, $post, $quality_item_class); fansub_ph_quality_item_html($quality, $quality_item_class, $server_items_html); ?>
$number, 'post_type' => 'batch' ); $query = fansub_query($query_args); $date_format = isset($data['date_format']) ? $data['date_format'] : $date_format; $post_type = fansub_horriblesubs_get_post_type(); $option_data = fansub_horriblesubs_get_option(); $query_vars = $query->query_vars; $post_not_in = isset($query->query_vars['post__not_in']) ? $query->query_vars['post__not_in'] : array(); $refresh_text = fansub_get_value_by_key($option_data, 'refresh_text'); $clear_text = fansub_get_value_by_key($option_data, 'clear_text'); ob_start(); ?>

    have_posts()) { $query->the_post(); $post = get_post(get_the_ID()); $post_not_in[] = $post->ID; $post_title = $post->post_title; $post_link = '#'; $suffix = ''; $parts = array(); if ('episode' == $post->post_type) { $parts = fansub_horriblesubs_convert_post_title_to_parts($post->post_title); array_shift($parts); $parts = array_map('trim', $parts); $animation_id = get_post_meta($post->ID, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { //$post_title = $animation->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $suffix = '' . ' - ' . $part . ''; } } } elseif ('batch' == $post->post_type) { $parts = fansub_horriblesubs_convert_post_title_to_parts($post->post_title); array_shift($parts); $parts = array_map('trim', $parts); $episode_id = get_post_meta($post->ID, 'episode', true); if (is_numeric($episode_id) && $episode_id > 0) { $animation_id = get_post_meta($episode_id, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { //$post_title = $animation->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $tmp_part = array_pop($parts); if (!empty($tmp_part)) { $part = $tmp_part . '-' . $part; } $suffix = '' . ' - ' . $part . ''; } } } else { $animation_id = get_post_meta($post->ID, 'animation', true); $animation = get_post($animation_id); if (is_a($animation, 'WP_Post')) { //$post_title = $animation->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $animation->ID); if (!fansub_array_has_value($parts)) { } $part = array_pop($parts); if (!empty($part)) { $tmp_part = array_pop($parts); if (!empty($tmp_part)) { //$part = $tmp_part . '-' . $part; } $suffix = '' . ' - ' . $part . ''; } } } } else { $post_title = $post->post_title; $post_link = fansub_horriblesubs_build_single_url($single_page, $post->ID); } $link_html = new FANSUB_HTML('a'); $link_html->set_href($post_link); $link_html->set_text($post_title); $link_html->set_class('post-title-link'); $saved_suffix = get_post_meta($post->ID, 'suffix', true); $suffix = ''; if (!empty($saved_suffix)) { $suffix = '' . ' - ' . $saved_suffix . ''; } $qs = fansub_ph_get_qualities_and_servers(get_the_ID()); $qualities = $qs['qualities']; $servers = $qs['servers']; ?>
  • post_type)); ?>>
    • output(); ?>
      • ID, $file_name_key, true); if (empty($file_name)) { if ('episode' == $post->post_type) { $ep_am_id = get_post_meta($post->ID, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } elseif ('batch' == $post->post_type) { $bt_ep_id = get_post_meta($post->ID, 'episode', true); if (fansub_id_number_valid($bt_ep_id)) { $ep_am_id = get_post_meta($bt_ep_id, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } else { $ep_am_id = get_post_meta($post->ID, 'animation', true); if (fansub_id_number_valid($ep_am_id)) { $ep_am = get_post($ep_am_id); $file_name = $ep_am->post_title . ' [' . $quality . ']'; } } } } else { if (!fansub_string_contain($file_name, $quality)) { //$file_name .= ' [' . $quality . ']'; } } $quality_item_class = 'quality quality-' . $quality; $server_items_html = '
      • ' . $file_name . '
      • '; $server_items_html .= fansub_ph_servers_loop($servers, $quality, $post, $quality_item_class); fansub_ph_quality_item_html($quality, $quality_item_class, $server_items_html); ?>
'Anime Titles'); $option_data = wp_parse_args($option_data, $defaults); $atts = shortcode_atts($default_atts, $atts); $option_data = wp_parse_args($atts, $option_data); $box_title = fansub_get_value_by_key($option_data, 'title'); $single_page = fansub_get_value_by_key($option_data, 'single_page'); $posts_per_page = fansub_get_value_by_key($option_data, 'anime_number', 20); $posts_per_page = 12; $post_type = fansub_horriblesubs_get_post_type(); $args = array( 'posts_per_page' => $posts_per_page, 'post_type' => $post_type, 'orderby' => 'title', 'order' => 'ASC', 'paged' => fansub_get_paged() ); $query = fansub_query($args); if (!empty($box_title)) { $box_title = fansub_wrap_tag($box_title, 'h2'); } $result = '
' . $box_title; if ($query->have_posts()) { $pagination_args = array( 'query' => $query, 'show_first_item' => true, 'label' => '', 'first' => '««', 'last' => '»»', 'ajax' => true, 'current_item_link' => true ); ob_start(); fansub_pagination($pagination_args); $pagination = ob_get_clean(); $result .= $pagination; $result .= '
'; return $result; } add_shortcode('fansub_list', 'fansub_horriblesubs_anime_list'); function fansub_horriblesubs_advanced_search($atts, $content = null) { $defaults = fansub_horriblesubs_get_option_defaults(); $option_data = fansub_horriblesubs_get_option(); $default_atts = array('title' => ''); $option_data = wp_parse_args($option_data, $defaults); $atts = shortcode_atts($default_atts, $atts); $option_data = wp_parse_args($atts, $option_data); $box_title = fansub_get_value_by_key($option_data, 'title'); $placeholder = fansub_get_value_by_key($option_data, 'placehoder', 'Search Anime...'); $single_page = fansub_get_value_by_key($option_data, 'single_page'); $post_type = fansub_horriblesubs_get_post_type(); $q = isset($_REQUEST['q']) ? $_REQUEST['q'] : ''; $args = array( 'posts_per_page' => -1, 'post_type' => $post_type, 's' => $q ); $query = fansub_query($args); if (!empty($box_title)) { $box_title = fansub_wrap_tag($box_title, 'h2'); } $result = ''; return $result; } add_shortcode('fansub_advanced_search', 'fansub_horriblesubs_advanced_search'); function fansub_horriblesubs_jwplayer_shortcode_embed($atts, $content = null) { $defaults = fansub_horriblesubs_get_option_defaults(); $option_data = fansub_horriblesubs_get_option(); $default_atts = array('title' => ''); $option_data = wp_parse_args($option_data, $defaults); $atts = shortcode_atts($default_atts, $atts); $option_data = wp_parse_args($atts, $option_data); $post_id = fansub_get_value_by_key($option_data, 'post_id'); $result = ''; if (!fansub_id_number_valid($post_id)) { $post_id = isset($_REQUEST['post_id']) ? $_REQUEST['post_id'] : 0; } if (fansub_id_number_valid($post_id)) { global $post; $tmp = $post; $post = get_post($post_id); setup_postdata($post); ob_start(); the_content(); $html_data = ob_get_clean(); wp_reset_postdata(); $post = $tmp; $result = $html_data; } return $result; } add_shortcode('fansub_jwplayer', 'fansub_horriblesubs_jwplayer_shortcode_embed');