Пример #1
0
function dsq_update_permalink($post)
{
    global $dsq_api;
    $response = $dsq_api->api->update_thread(null, array('thread_identifier' => dsq_identifier_for_post($post), 'title' => dsq_title_for_post($post), 'url' => dsq_link_for_post($post)));
    return $response;
}
Пример #2
0
function dsq_update_permalink($post)
{
    global $dsq_api;
    if (DISQUS_DEBUG) {
        echo "updating post on disqus: {$post->ID}\n";
    }
    $response = $dsq_api->api->update_thread(null, array('thread_identifier' => dsq_identifier_for_post($post), 'title' => dsq_title_for_post($post), 'url' => dsq_link_for_post($post)));
    $cleaned_thread_id = sanitize_meta('dsq_thread_id', $response->id, 'post');
    update_post_meta($post->ID, 'dsq_thread_id', $cleaned_thread_id);
    return $response;
}
Пример #3
0
function dsq_update_permalink($post)
{
    global $dsq_api;
    if (DISQUS_DEBUG) {
        echo "updating post on disqus: {$post->ID}\n";
    }
    $response = $dsq_api->api->update_thread(null, array('thread_identifier' => dsq_identifier_for_post($post), 'title' => dsq_title_for_post($post), 'url' => dsq_link_for_post($post)));
    //Make sure that response exists so that warnings are not thrown
    if (!empty($response)) {
        $cleaned_thread_id = sanitize_meta('dsq_thread_id', $response->id, 'post');
        update_post_meta($post->ID, 'dsq_thread_id', $cleaned_thread_id);
    }
    return $response;
}