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

  • Resolved Dido Match


    Hello !

    The settings for Social don’t allow you to choose the excerpt as something to post to FB or twitter

    How you would like posts to be formatted when broadcasting to Twitter or Facebook?

    {url} – Example:
    {date} – Example: 2012-10-26 23:40:57

    We would like to broadcast the excerpts only

    how add this ?

    thank you

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));
    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:

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

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