• When i develop plugin i had problem this plugin send from wp into twitter
    it post title and permalinks and i want this plugin to post the content for every post

    I tried this functions and dont work
    $post = get_post($post_content);
    and
    $post = get_the_content( $more_link_text, $stripteaser, $more_file );

    All of this dont work with the plugin and dont get the content for every post what can do please

    Source Code that i develop on it is

    function socialize($post_ID)  {
        global $twitter_username, $twitter_password, $tumblr_email, $tumblr_password, $delicious_username, $delicious_password, $diigo_username, $diigo_password, $tags;
        $post_title    = stripslashes($_POST['post_title']);
        $post_title    = html_entity_decode($post_title);
        $tumblr_text    = html_entity_decode($_POST[content]);
        $tumblr_text = strip_tags($tumblr_text);
        $tumblr_text = nl2br($tumblr_text);
        $tumblr_text = substr($tumblr_text, 0,200);
        $permalink = get_permalink($post_ID);
        $tumblr_text .= "<br />Read more at the source: <a target=_blank href=$permalink>$post_title</a>";
        $tw_title = substr($post_title, 0,70);
    
        // Send to Twitter
        if($twitter_username && $twitter_password){
        $message = "$tw_title $permalink";
        // The twitter API address
        $url = 'https://twitter.com/statuses/update.xml';

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter zadonet

    (@zadonet)

    I want to cancel posting title and permalinks and post the content what can do please

    [moderated–bump removed. Please refrain from bumping as per Forum Rules]

    The following line of code will retrieve the entire post:

    $post = get_post( $post_ID );

    You can then get the content from $post->post_content.

    Thread Starter zadonet

    (@zadonet)

    Thanks for very much for help

    You mean that i can replace line code
    $permalink = get_permalink($post_ID);
    or
    $post_title = stripslashes($_POST[‘post_title’]);
    $post_title = html_entity_decode($post_title);

    with
    $post = get_post( $post_ID );
    $post = get_post( $post->post_content );

    to send conent with out title and permalinks

    It’s a bit hard to tell, as you didn’t post the entire socialize() function. I suspect what you want to do is replace:

    $message = "$tw_title $permalink";

    with:

    $post = get_post( $post_ID );
    $message = $post->post_content;
    Thread Starter zadonet

    (@zadonet)

    Very Very Thanks for you

    You fastest support contacted with me

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘post function problem’ is closed to new replies.