Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

MP_Websites::_update_uri( $posts, string $embed, string $widget_id = '' )

Update uri data.


Parameters Parameters

$post_id

(array) (Required) post ids

$embed

(string) (Required) type of embedded

$widget_id

(string) (Optional) Widget ID

Default value: ''


Top ↑

Return Return

(bool|int)


Top ↑

Source Source

File: mortgage-platform/Inc/MP_Websites.php

    private function _update_uri($posts, $embed, $widget_id = '')
    {
        foreach ($posts as $post_id) {
            $website_url    = get_post_meta($post_id, MortgagePlatform::$prefix . 'website_url', true);
            $website_status = get_post_meta($post_id, MortgagePlatform::$prefix . 'website_status', true);
            $website_id = get_post_meta($post_id, MortgagePlatform::$prefix . 'website_id', true);

            if (isset($website_url['ip']) && $website_url['ip'] === $this->get_ip() && $website_id === $widget_id &&
                 ((isset($website_url['referer']) && $website_url['referer'] === $this->get_referer()) ||
                     (isset($website_url['origin']) && $website_url['origin'] === $this->get_origin())) &&
                 isset($website_status['embedded']) && $website_status['embedded'] === $embed
            ) {
                $website_status['date_update'] = wp_date("Y-m-d H:i:s");

                return update_post_meta($post_id, MortgagePlatform::$prefix . 'website_status', $website_status);
            }
        }
    }

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.