Support » Plugin: Social » Tokens : How Add the excerpts ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t know if this is the best way to do it, but hacking service.php in the social/lib directory to add these lines works :

    break; /* already there */
    case '{excerpt}':
    	$content = $post->post_excerpt;
    	$content = htmlspecialchars_decode(strip_tags($content));
    	break;
    case '{author}': /* already there */
    ;

    (somewhere around line 410)

    and then adding in social.php (root of plugin)

    '{content}' => '',
    '{excerpt}' => '', /* add this line around line 151 */
    '{date}' => sprintf(__('Example: %s', 'social'), $date),

    People who customise excerpts are very likely to want to use them instead of the post content I think!

    One-off customizations should use the included hooks and the WordPress API:

    http://codex.wordpress.org/Plugin_API

    Enhancements/bug fixes that make sense to be included in the overall distribution can be submitted as a pull request here:

    https://github.com/crowdfavorite/wp-social

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Tokens : How Add the excerpts ?’ is closed to new replies.