Your IP : 216.73.216.95


Current Path : /var/www/foundation/wp-content/plugins/gmap-embed/includes/Traits/
Upload File :
Current File : /var/www/foundation/wp-content/plugins/gmap-embed/includes/Traits/CommonFunctions.php

<?php
namespace WGMSRM\Traits;
if ( ! defined( 'ABSPATH' ) ) exit;
/**
 * Trait CommonFunctions
 */
trait CommonFunctions
{
    /**
     * Update post meta
     * @param $post_id
     * @param $field_name
     * @param string $value
     */
    public function __update_post_meta($post_id, $field_name, $value = '')
    {
        if (!get_post_meta($post_id, $field_name)) {
            add_post_meta($post_id, $field_name, $value);
        } else {
            update_post_meta($post_id, $field_name, $value);
        }
    }
}