Plugin Directory

Changeset 2217527


Ignore:
Timestamp:
12/24/2019 12:47:13 PM (6 years ago)
Author:
ambercouch
Message:

Fix short code template arguments

Location:
ac-custom-loop-shortcode/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ac-custom-loop-shortcode/trunk/ac-wp-custom-loop-sc.php

    r2207045 r2217527  
    7878        $post_types = get_post_types($args, 'names');
    7979        $theme_directory = $template_path;
     80        //$theme_extention = (substr($template, -4) === '.php' || substr($template, -5) === '.twig' ) ? '' : '.php';
     81        $template = (substr($template, -4) === '.php') ? substr_replace($template ,"",-4) :  $template;
    8082        $theme_template = $theme_directory . $template . '.php';
    8183        $theme_template_type = $theme_directory . $template . '-' . $type . '.php';
     
    9698        }
    9799
    98         if (file_exists($theme_template))
     100
     101        if (file_exists($theme_template_type))
     102        {
     103            $template = $theme_template_type;
     104
     105        }elseif (file_exists( $theme_template ))
    99106        {
    100107            $template = $theme_template;
    101108
    102         }elseif (file_exists( $theme_template_type ))
    103         {
    104             $template = $theme_template_type;
    105 
    106109        }else{
    107110            $template = "loop-template.php";
    108 
    109111        }
    110112
  • ac-custom-loop-shortcode/trunk/readme.txt

    r2207045 r2217527  
    44Tags: shortcode, list post, list custom posts, timber, twig, custom post type
    55Requires at least: 4.6
    6 Tested up to: 5.3
    7 Stable tag: 1.4.1
     6Tested up to: 5.3.2
     7Stable tag: 1.4.2
    88Requires PHP: 5.2.4
    99License: GPLv2 or later
     
    4040== Upgrade Notice ==
    4141
     42= 1.4.2 =
     43Fix template arguments to allow .php to be optional.
     44
    4245= 1.4.0 =
    4346Updates to templates plus timber support and show posts using ids.
     
    5356
    5457== Changelog ==
     58
     59= 1.4.2 (2019-12-24) =
     60* Fix shortcode argument issues.
    5561
    5662= 1.4.1 (2019-12-06) =
Note: See TracChangeset for help on using the changeset viewer.