Plugin Directory

Changeset 1722011


Ignore:
Timestamp:
08/30/2017 01:12:17 PM (9 years ago)
Author:
PierreMinik
Message:

Fixed a bug where the template could autoload.

Location:
lisa-templates
Files:
397 added
3 edited

Legend:

Unmodified
Added
Removed
  • lisa-templates/trunk/README.txt

    r1720890 r1722011  
    55Requires at least: 4.8
    66Tested up to: 4.8.1
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6666== Changelog ==
    6767
     68**1.0.1**
     69
     70Fixed a bug where the template could autoload.
     71
     72**1.0.0**
     73
     74Initial release.
    6875
    6976== Upgrade Notice ==
  • lisa-templates/trunk/lisa-templates.php

    r1720883 r1722011  
    1111 * Plugin URI:        https://templates.lisa.gl
    1212 * Description:       Easily write templates filled with custom data that can be loaded through a shortcode.
    13  * Version:           1.0.0
     13 * Version:           1.0.1
    1414 * Author:            Pierre Minik Lynge
    1515 * Author URI:        https://miniup.gl
  • lisa-templates/trunk/public/shortcode.php

    r1720883 r1722011  
    77if ( ! function_exists( 'lisa_shortcode' ) ) :
    88
    9   function lisa_shortcode( $atts, $content = null, $tag, $class = null ) {
     9  function lisa_shortcode( $atts, $content = null, $tag ) {
    1010    $atts = shortcode_atts( array(
    1111      'id' => NULL,
    1212      'conditions' => array()
    1313    ), $atts, $tag );
    14 
    15     // Let's not make an endless loop?!
    16     if ( is_object( $class ) && method_exists( $class, 'content' ) ) {
    17       $priority = intval( apply_filters( 'lisa_template_priority', 1984 ) );
    18         remove_all_filters( 'the_content', $priority );
    19     }
    2014
    2115    // WP_Query arguments
     
    9791        } elseif ( $placement === 'append' ) {
    9892          $content .= $code;
    99         } else {
     93        } elseif ( $placement === 'replace' ) {
    10094          $content = $code;
    10195        }
     
    106100        wp_reset_postdata();
    107101
    108     // Restore our filter
    109     if ( is_object( $class ) && method_exists( $class, 'content' ) )
    110       add_filter( 'the_content', array( $class, 'content' ), $priority );
    111 
    112102    return $content;
    113103  }
Note: See TracChangeset for help on using the changeset viewer.