Plugin Directory

Changeset 2171788


Ignore:
Timestamp:
10/11/2019 01:42:21 PM (6 years ago)
Author:
wpklangoo
Message:

Adjusting date conversion issue with WP 5.2.3

Location:
magnet/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • magnet/trunk/README.txt

    r2037113 r2171788  
    33Tags: Klangoo, Magnet, Related articles, Recommended articles, Summary, Personalization, Analytics, Semantic, Analysis, Entity, Entities, Names, In-text links, SEO, interlinking
    44Requires at least: 4.0
    5 Tested up to: 5.1
     5Tested up to: 5.2.3
    66Stable tag: trunk
    77License: GPLv2 or later
  • magnet/trunk/WP-klangoo.php

    r2014841 r2171788  
    5050            <meta itemprop="description" content="<?php echo esc_attr( magnet_get_excerpt( get_the_ID() ) ); ?>"/>
    5151            <meta itemprop="pageType" content="<?php echo esc_attr( $page_type ); ?>"/>
    52             <meta itemprop="datePublished" content="<?php $date = new DateTime( get_the_time('Y-m-d G:i:s'.get_option('gmt_offset')) ); $date->setTimezone(new DateTimeZone('UTC')); echo $date->format('c'); ?>"/>
    53             <meta itemprop="dateModified" content="<?php $date = new DateTime( get_the_modified_date('Y-m-d G:i:s'.get_option('gmt_offset')) ); $date->setTimezone(new DateTimeZone('UTC')); echo $date->format('c'); ?>"/>
     52            <meta itemprop="datePublished" content="<?php $date = new DateTime( get_the_time('Y-m-d G:i:s+'.get_option('gmt_offset')) ); $date->setTimezone(new DateTimeZone('UTC')); echo $date->format('c'); ?>"/>
     53            <meta itemprop="dateModified" content="<?php $date = new DateTime( get_the_modified_date('Y-m-d G:i:s+'.get_option('gmt_offset')) ); $date->setTimezone(new DateTimeZone('UTC')); echo $date->format('c'); ?>"/>
    5454            <meta itemprop="url" content="<?php echo esc_attr( get_permalink() ) ?>"/>
    5555            <meta itemprop="inLanguage" content="<?php echo esc_attr( substr( get_locale(), 0, 2 ) ); ?>"/>
Note: See TracChangeset for help on using the changeset viewer.