Plugin Directory

Changeset 154422


Ignore:
Timestamp:
09/13/2009 05:21:43 PM (16 years ago)
Author:
de-ce
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • twitter-sp2/trunk/twitter-sp2.php

    r154402 r154422  
    8686
    8787
    88 function get_custom_excerpt($post_id, $limit = 100) {
     88function sp2_get_custom_excerpt($post_id, $limit = 100) {
    8989    $post = get_post($post_id); //gets the post based on id
    9090    $text = $post->post_content; // gets the contents
     
    191191            break;
    192192        case 'post_excerpt':
    193             $return_text = get_custom_excerpt($post_id) . " " . $short_url;
     193            $return_text = sp2_get_custom_excerpt($post_id) . " " . $short_url;
    194194            break;
    195195        case 'title_excerpt':
    196196            $text = $title . ': ';
    197197            $limit = 110 - strlen($text);
    198             $text .= get_custom_excerpt($post_id, $limit);
     198            $text .= sp2_get_custom_excerpt($post_id, $limit);
    199199            $return_text = $text . " " . $short_url;
    200200            /*
     
    203203            2 chars ": " after the title
    204204            1 char " " after the text
    205             3 chars "..." after the text - generated by get_custom_excerpt
     205            3 chars "..." after the text - generated by sp2_get_custom_excerpt
    206206            ---
    207207            114 chars left for the text
     
    221221                $limit = 145 - strlen($text); // why did I putted 145 here?? note to self: comment your code
    222222               
    223                 $text = str_replace("%fragment%", get_custom_excerpt($post_id, $limit), $text);
     223                $text = str_replace("%fragment%", sp2_get_custom_excerpt($post_id, $limit), $text);
    224224               
    225225            }
Note: See TracChangeset for help on using the changeset viewer.