From 7307d15bab26801de51aded7b8fe7d0b80acecbe Mon Sep 17 00:00:00 2001 From: jorge-vitrubio Date: Sat, 23 Jul 2022 15:34:09 +0200 Subject: [PATCH] removed un necessary code --- hangar-wp-plugin.php | 4 - includes/hangar-tags-category-shortcode.php | 131 -------------------- 2 files changed, 135 deletions(-) delete mode 100644 includes/hangar-tags-category-shortcode.php diff --git a/hangar-wp-plugin.php b/hangar-wp-plugin.php index d0034a2..a7ddb03 100644 --- a/hangar-wp-plugin.php +++ b/hangar-wp-plugin.php @@ -59,7 +59,3 @@ include( HANGAR_WPPLUGIN_PATH . 'includes/hangar-tags-and-pages.php'); include( HANGAR_WPPLUGIN_PATH . 'includes/hangar-plugin-settings-pannel.php'); include( HANGAR_WPPLUGIN_PATH . 'includes/hangar-shortcode-metabox-postpage.php'); - -// include( HANGAR_WPPLUGIN_PATH . 'includes/hangar-custom-post-type-resources.php'); - -// include( HANGAR_WPPLUGIN_PATH . 'includes/hangar-tags-category-shortcode.php'); // outdated from 2012 do not use diff --git a/includes/hangar-tags-category-shortcode.php b/includes/hangar-tags-category-shortcode.php deleted file mode 100644 index 505bdd8..0000000 --- a/includes/hangar-tags-category-shortcode.php +++ /dev/null @@ -1,131 +0,0 @@ - 'cat-post', - 'totalposts' => '-1', - 'category' => '', - 'thumbnail' => 'false', - 'thumbnail_height' => '130', - 'thumbnail_width' => '130', - 'date' => 'false', - 'excerpt' => 'true', - 'orderby' => 'post_date', - 'order' => 'desc' - ), $atts)); - - $output = '
'; - global $post; - $tmp_post = $post; - $myposts = get_posts("numberposts=$totalposts&category=$category&orderby=$orderby&order=$order"); - - foreach($myposts as $post) { - setup_postdata($post); - $output .= '
'; - if($thumbnail == 'true') { - $thumb_image = get_post_meta($post->ID, 'thumbnail-url',true); - if(empty($thumb_image)){ - preg_match_all('//i', $post->post_content, $matches); - $thumb_image = $matches [1] [0]; - } - if(empty($thumb_image)){ - $thumb_image =''; - } - - $output .= '
'; - } - $output .= '
'.get_the_title().''; - if ($date == 'true') { - $output .= ''; - } - if ($excerpt == 'true') { - $output .= ''.get_the_excerpt().''; - } - $output .= '
-
-
'; - }; - $output .= '
'; - $post = $tmp_post; - wp_reset_query(); - return $output; -} -add_shortcode('cat', 'cat_func'); - -?>