get_pung

The timeline below displays how wordpress function get_pung has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Retrieves URLs already pinged for a post.
 *
 * @since 1.5.0
 *
 * @since 4.7.0 `$post` can be a WP_Post object.
 *
 * @param int|WP_Post $post Post ID or object.
 * @return string[]|false Array of URLs already pinged for the given post, false if the post is not found.
 */
function get_pung($post)
{
    $post = get_post($post);
    if (!$post) {
        return false;
    }
    $pung = trim($post->pinged);
    $pung = preg_split('/\s/', $pung);
    /**
     * Filters the list of already-pinged URLs for the given post.
     *
     * @since 2.0.0
     *
     * @param string[] $pung Array of URLs already pinged for the given post.
     */
    return apply_filters('get_pung', $pung);
}

WordPress Version: 5.7

/**
 * Retrieve URLs already pinged for a post.
 *
 * @since 1.5.0
 *
 * @since 4.7.0 `$post_id` can be a WP_Post object.
 *
 * @param int|WP_Post $post_id Post ID or object.
 * @return string[]|false Array of URLs already pinged for the given post, false if the post is not found.
 */
function get_pung($post_id)
{
    $post = get_post($post_id);
    if (!$post) {
        return false;
    }
    $pung = trim($post->pinged);
    $pung = preg_split('/\s/', $pung);
    /**
     * Filters the list of already-pinged URLs for the given post.
     *
     * @since 2.0.0
     *
     * @param string[] $pung Array of URLs already pinged for the given post.
     */
    return apply_filters('get_pung', $pung);
}

WordPress Version: 5.1

/**
 * Retrieve URLs already pinged for a post.
 *
 * @since 1.5.0
 *
 * @since 4.7.0 `$post_id` can be a WP_Post object.
 *
 * @param int|WP_Post $post_id Post ID or object.
 * @return bool|string[] Array of URLs already pinged for the given post, false if the post is not found.
 */
function get_pung($post_id)
{
    $post = get_post($post_id);
    if (!$post) {
        return false;
    }
    $pung = trim($post->pinged);
    $pung = preg_split('/\s/', $pung);
    /**
     * Filters the list of already-pinged URLs for the given post.
     *
     * @since 2.0.0
     *
     * @param string[] $pung Array of URLs already pinged for the given post.
     */
    return apply_filters('get_pung', $pung);
}

WordPress Version: 4.7

/**
 * Retrieve URLs already pinged for a post.
 *
 * @since 1.5.0
 *
 * @since 4.7.0 $post_id can be a WP_Post object.
 *
 * @param int|WP_Post $post_id Post ID or object.
 * @return array
 */
function get_pung($post_id)
{
    $post = get_post($post_id);
    if (!$post) {
        return false;
    }
    $pung = trim($post->pinged);
    $pung = preg_split('/\s/', $pung);
    /**
     * Filters the list of already-pinged URLs for the given post.
     *
     * @since 2.0.0
     *
     * @param array $pung Array of URLs already pinged for the given post.
     */
    return apply_filters('get_pung', $pung);
}

WordPress Version: 4.6

/**
 * Retrieve URLs already pinged for a post.
 *
 * @since 1.5.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param int $post_id Post ID.
 * @return array
 */
function get_pung($post_id)
{
    global $wpdb;
    $pung = $wpdb->get_var($wpdb->prepare("SELECT pinged FROM {$wpdb->posts} WHERE ID = %d", $post_id));
    $pung = trim($pung);
    $pung = preg_split('/\s/', $pung);
    /**
     * Filters the list of already-pinged URLs for the given post.
     *
     * @since 2.0.0
     *
     * @param array $pung Array of URLs already pinged for the given post.
     */
    return apply_filters('get_pung', $pung);
}

WordPress Version: 4.3

/**
 * Retrieve URLs already pinged for a post.
 *
 * @since 1.5.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param int $post_id Post ID.
 * @return array
 */
function get_pung($post_id)
{
    global $wpdb;
    $pung = $wpdb->get_var($wpdb->prepare("SELECT pinged FROM {$wpdb->posts} WHERE ID = %d", $post_id));
    $pung = trim($pung);
    $pung = preg_split('/\s/', $pung);
    /**
     * Filter the list of already-pinged URLs for the given post.
     *
     * @since 2.0.0
     *
     * @param array $pung Array of URLs already pinged for the given post.
     */
    return apply_filters('get_pung', $pung);
}

WordPress Version: 4.0

/**
 * Retrieve URLs already pinged for a post.
 *
 * @since 1.5.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param int $post_id Post ID.
 * @return array
 */
function get_pung($post_id)
{
    global $wpdb;
    $pung = $wpdb->get_var($wpdb->prepare("SELECT pinged FROM {$wpdb->posts} WHERE ID = %d", $post_id));
    $pung = trim($pung);
    $pung = preg_split('/\s/', $pung);
    /**
     * Filter the list of already-pinged URLs for the given post.
     *
     * @since 2.0.0
     *
     * @param array $pung Array of URLs already pinged for the given post.
     */
    $pung = apply_filters('get_pung', $pung);
    return $pung;
}

WordPress Version: 3.9

/**
 * Retrieve URLs already pinged for a post.
 *
 * @since 1.5.0
 * @uses $wpdb
 *
 * @param int $post_id Post ID.
 * @return array
 */
function get_pung($post_id)
{
    global $wpdb;
    $pung = $wpdb->get_var($wpdb->prepare("SELECT pinged FROM {$wpdb->posts} WHERE ID = %d", $post_id));
    $pung = trim($pung);
    $pung = preg_split('/\s/', $pung);
    /**
     * Filter the list of already-pinged URLs for the given post.
     *
     * @since 2.0.0
     *
     * @param array $pung Array of URLs already pinged for the given post.
     */
    $pung = apply_filters('get_pung', $pung);
    return $pung;
}

WordPress Version: 3.7

/**
 * Retrieve URLs already pinged for a post.
 *
 * @since 1.5.0
 * @uses $wpdb
 *
 * @param int $post_id Post ID.
 * @return array
 */
function get_pung($post_id)
{
    global $wpdb;
    $pung = $wpdb->get_var($wpdb->prepare("SELECT pinged FROM {$wpdb->posts} WHERE ID = %d", $post_id));
    $pung = trim($pung);
    $pung = preg_split('/\s/', $pung);
    $pung = apply_filters('get_pung', $pung);
    return $pung;
}