Plugin Directory

Changeset 489989


Ignore:
Timestamp:
01/14/2012 10:46:03 PM (14 years ago)
Author:
Bloafer
Message:

Update to version 1.2

Location:
posts-to-page/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • posts-to-page/trunk/posts-to-page.php

    r472743 r489989  
    44Plugin URI: http://studio.bloafer.com/wordpress-plugins/posts-to-page/
    55Description: Posts to page, shortcode [posts-to-page]. Usage [posts-to-page cat_ID=1]
    6 Version: 1.1
     6Version: 1.2
    77Author: Kerry James
    88Author URI: http://studio.bloafer.com/
     
    2020    $showAuthor     = false;
    2121    $splitPoint     = false;
     22    $splitMore      = false;
    2223    $rowLimit       = false;
    2324    $postType       = "post";
     
    2930    if(trim(strtolower($args["show_date"]))=="true"){ $showDate = true; }
    3031    if(trim(strtolower($args["show_author"]))=="true"){ $showAuthor = true; }
     32    if(trim(strtolower($args["split_more"]))=="true"){ $splitMore = true; }
    3133   
    3234
     
    3537    if(isset($args["limit"])){ $rowLimit = $args["limit"]; }
    3638    if(isset($args["cat_id"])){ $catID=$args["cat_id"]; }
     39   
     40    if($splitMore){
     41        $splitPoint = "<!--more-->";
     42    }
    3743   
    3844    if(!is_numeric($catID)){ $catID = 1; }
     
    6268        if($showContent){
    6369            $html .= '<div class="post-to-page-content">';
     70            $originalContent = apply_filters('the_content', $post->post_content);
    6471            if($splitPoint){
    65                 if(strstr($post->post_content, $splitPoint)){
    66                     $parts = explode($splitPoint,$post->post_content);
     72                if(strstr($originalContent, $splitPoint)){
     73                    $parts = explode($splitPoint, $originalContent);
    6774                    $html .= $parts[0];
    6875                }else{
    69                     $html .= $post->post_content;
     76                    $html .= $originalContent;
    7077                }
    7178            }else{
    72                 $html .= apply_filters('the_content', $post->post_content);
     79                $html .= $originalContent;
    7380            }
    7481            $html .= '</div>';
  • posts-to-page/trunk/readme.txt

    r472743 r489989  
    44Plugin URI: http://studio.bloafer.com/wordpress-plugins/posts-to-page/
    55Description: Posts to page, shortcode [posts-to-page].
    6 Version: 1.1
     6Version: 1.2
    77Author: Kerry James
    88Author URI: http://studio.bloafer.com/
     
    4040You need to use the variable "split_point", only available in version 0.3 and above ([posts-to-page cat_ID=1 split_point="&lt;!--split--&gt;"])
    4141
     42= I want to split on the more point, how would I do this? =
     43
     44You need to use the variable "split_more", only available in version 1.2 and above ([posts-to-page cat_ID=1 split_more="true"])
     45
    4246= I have installed the plugin but it is only showing me the shortcode? =
    4347
     
    7377
    7478== Changelog ==
     79
     80= 1.2 =
     81* Added split_more variable.
    7582
    7683= 1.1 =
Note: See TracChangeset for help on using the changeset viewer.