[Plugin: Simple Twitter Connect] Modifying autotweet syntax
-
I’m trying to modify the way autotweets are generated.
Currently the syntax is “%title%: %url%” and it’s defined in stc_get_default_tweet($id)
I’d like to add post tags to autotweets
Desired syntax: %title% %url% %tags%
I’ve fiddled with the code in stc-publish.php by adding get_the_tags, but instead of the tags I get “Array”.
Current code (lines 185-188)
$output = $options['publish_text'];
$title = str_replace(' ',' ', get_the_title($id));
$output = str_replace('%title%', $title, $output );
$output = str_replace('%url%', $link, $output );
My code
`$output = $options[‘publish_text’];
$title = str_replace(' ',' ', get_the_title($id));
$tags = str_replace(' ',' ', get_the_tags($id));
$output = str_replace('%title%', $title, $output );
$output = str_replace('%url%', $link, $output );
$output = str_replace('%tags%', $tags, $output );
- The topic ‘[Plugin: Simple Twitter Connect] Modifying autotweet syntax’ is closed to new replies.