add_ping()

热度:59
Function:为已经ping通的人添加URL。
版本 20190729
所属分类 Functions
可使用页面 All
默认值

add_ping( int|WP_Post $post_id, string|array $uri )

  • 为已经ping通的人添加URL。


参数:

$post_id

(int|WP_Post) (Required) 发布对象或ID。


$uri

(string|array) (Required) Ping URI或URI数组。


Return(返回):

(int|false) 更新了多少行。


示例:

function add_ping( $post_id, $uri ) {

    global $wpdb;

 

    $post = get_post( $post_id );

    if ( ! $post ) {

        return false;

    }

 

    $pung = trim( $post->pinged );

    $pung = preg_split( '/s/', $pung );

}


问题反馈反馈和建议QQ群:785318993