Giter Site home page Giter Site logo

iamsayan / wp-last-modified-info Goto Github PK

View Code? Open in Web Editor NEW
16.0 1.0 3.0 3.54 MB

Show or hide the last update date and time on pages and posts very easily.

Home Page: https://wordpress.org/plugins/wp-last-modified-info/

License: GNU General Public License v3.0

PHP 79.25% JavaScript 15.46% Sass 5.29%
wordpress last modified info pages posts plugin revision sort-posts multisite

wp-last-modified-info's Introduction

WP Last Modified Info

WP Last Modified Info

🔥 Display last modified date and time on pages and posts very easily. You can use shortcode also to display last modified info anywhere on a WordPress site running 4.7 and beyond.

WP compatibility PHP compatibility GitHub release (latest by date) PHP GitHub Release Date GitHub last commit GitHub Repo stars GitHub forks

Description

WP Last Modified Info: the Ultimate Last Modified plugin for WordPress

Most WordPress themes usually show the date when a post was last published. This is fine for most blogs and static websites. However, WordPress is also used by websites where old articles are regularly updated. This last updated date and time is important information for those publications. The most common example is news websites. They often update old stories to show new developments, add corrections, or media files. If they only added the published date, then their users would miss those updates.

Many popular blogs and websites don't show any date on their articles. This is a bad practice and you should never remove dates from your blog posts.

So now it is possible to add last modified / updated info on your wordpress posts and pages. Just install and activate this and configuaration is very easy.

Like WP Last Modified Info plugin? Consider leaving a 5 star review.

What does this plugin do?

This plugin automatically inserts last modified or updated info on your WordPress posts (including custom post types) and pages. It is possible to use shortcode [lmt-post-modified-info] for posts and [lmt-page-modified-info] for pages for manual insert. This plugin also adds 'dateModified' schema markup in WordPress posts automatically and it is used to tell the last modified date & time of a post or a page to various search engines like Google, Bing etc.

  • Allows you to display Last modified information in your posts and pages individually.
  • Provides you with options to display the last modified/last updated date above or below your posts and pages.
  • You can also set date/time formats and the position of the timestamp in WordPress Posts and Pages which can be either before content or after the content.
  • Allows you to customize the text which is to be displayed alongside the last modified date (default: Last updated on).
  • Inserts ‘dateModified’ schema markup to your WordPress posts automatically.
  • Allows you to display last modified info on all post types column and publish meta box in the dashboard with the author name.
  • Allows you to sort posts/pages in last updated/modified date time order.
  • Allows you to replace post published date with post modified info.
  • Allows you to display last modified info on your post as human readable format, i.e. Days/weeks/months/years ago.
  • Allows you to display last modified info of all posts in the WordPress admin bar.
  • Allows you to display last modified author info in posts, pages.
  • Allows you to add last modified timestamp in post/page's custom field.
  • Allows you to edit last modified date and time from the post edit screen and quick edit screen also.
  • You can also add template tags to your theme files. Go to the FAQ section for more information.
  • Elementor Dynamic Tags support with 'dateModified' schema markup.
  • Send Email Notification when anyone makes changes to any post of your website.
  • And you can customize all and everything.

Compatibility

  • This plugin is fully compatible with WordPress Version 4.7 and beyond and also compatible with any WordPress theme.

Support

Contribute

Installation

From within WordPress

  1. Visit 'Plugins > Add New'.
  2. Search for 'WP Last Modified Info'.
  3. Activate WP Last Modified Info from your Plugins page.
  4. Go to "after activation" below.

Manually

  1. Upload the wp-last-modified-info folder to the /wp-content/plugins/ directory.
  2. Activate WP Last Modified Info plugin through the 'Plugins' menu in WordPress.
  3. Go to "after activation" below.

After activation

  1. After activation go to 'Settings > WP Last Modified Info'.
  2. Enable/disable options and save changes.

Frequently Asked Questions

Is there any admin interface for this plugin?

Yes. You can access this from 'Settings > WP Last Modified Info'.

How to use this plugin?

Go to 'Settings > WP Last Modified Info', enable/disable options as per your need and save your changes.

How to check this plugin is working?

After enable options in 'Settings > WP Last Modified Info', open any page or post and you can see the change.

How this plugin works?

This plugin hooks into wordpress content area and displays last modified information on posts and pages.

Will it requires editing code to show Last Modified date?

Not at all. You can show the revised info by just installing this plugin. Use the Plugin Options to customize the date/time according to your need.

Is this plugin compatible with any themes?

Yes, this plugin is compatible with any theme.

Does this plugin support all custom post types?

Yes, this plugin supports all types of custom posts.

How to customize last modified text style?

Go to 'Settings > WP Last Modified Info > Misc. Options > Custom CSS' and add your custom css.

Can I sort posts and pages by last modified info in dashboard?

Yes you can. You can sort posts and pages by ascending or desending order.

How this plugin helps to optimize SEO?

This plugin wraps modified info with ‘dateModified’ schema markup which is used to tell the last modified date & time of a webpage to various web crawlers (Google, Bing etc.)

The Date and Time inserted by this plugin is dependent on what?

The plugin make use of your WordPress Date, Time and Time zone (Dashboard > Settings > General) in wordpress dashboaard.

Is this plugin compatible with multisite?

Yes, it is fully compatible with multisite.

Can I change 'Last Updated on' text?

Yes, you can. Just set your custom text in settings and save your changes.

Can I use this as template tag?

Yes, you can. In this case, you have to edit your theme's template files i.e. single.php, page.php etc. And add/replace default published date function with this:

Returns the last modified info:

<?php if ( function_exists( 'get_the_last_modified_info' ) ) { get_the_last_modified_info(); } ?>

Displays/echos the last modified info:

<?php if ( function_exists( 'the_last_modified_info' ) ) { the_last_modified_info(); } ?>

Published date is equal to modified date. What is the solution?

Sometimes you may want to show last modified date only. For that reason, post published date and modified date would be the same and the last modified date will still appear on post/pages even if it’s the same as the published date. In that case, you can set a time difference(ex. 1 day i.e. 24 hours) between post published date and modified date via plugin settings gap option.

The plugin isn't working or have a bug?

Post detailed information about the issue in the support forum and I will work to fix it.

Changelog

View Changelog

wp-last-modified-info's People

Contributors

dependabot[bot] avatar iamsayan avatar yoren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

wp-last-modified-info's Issues

PHP Warning: Undefined property: stdClass::

https://wordpress.org/support/topic/php-warning-undefined-property-stdclass/

Using WordPress 6.0.1 and PHP 8.0.17

[27-Jul-2022 05:46:56 UTC] PHP Warning: Undefined property: stdClass::$requires in /bitnami/wordpress/wp-content/plugins/wp-last-modified-info/inc/Core/Backend/PluginsData.php on line 135
[27-Jul-2022 05:46:56 UTC] PHP Warning: Undefined property: stdClass::$tested in /bitnami/wordpress/wp-content/plugins/wp-last-modified-info/inc/Core/Backend/PluginsData.php on line 136
[27-Jul-2022 05:46:56 UTC] PHP Warning: Undefined property: stdClass::$last_updated in /bitnami/wordpress/wp-content/plugins/wp-last-modified-info/inc/Core/Backend/PluginsData.php on line 137
[27-Jul-2022 05:47:06 UTC] PHP Warning: Undefined property: stdClass::$requires in /bitnami/wordpress/wp-content/plugins/wp-last-modified-info/inc/Core/Backend/PluginsData.php on line 135
[27-Jul-2022 05:47:06 UTC] PHP Warning: Undefined property: stdClass::$tested in /bitnami/wordpress/wp-content/plugins/wp-last-modified-info/inc/Core/Backend/PluginsData.php on line 136
[27-Jul-2022 05:47:06 UTC] PHP Warning: Undefined property: stdClass::$last_updated in /bitnami/wordpress/wp-content/plugins/wp-last-modified-info/inc/Core/Backend/PluginsData.php on line 137
[27-Jul-2022 05:47:09 UTC] PHP Warning: Undefined property: stdClass::$requires in /bitnami/wordpress/wp-content/plugins/wp-last-modified-info/inc/Core/Backend/PluginsData.php on line 135
[27-Jul-2022 05:47:09 UTC] PHP Warning: Undefined property: stdClass::$tested in /bitnami/wordpress/wp-content/plugins/wp-last-modified-info/inc/Core/Backend/PluginsData.php on line 136
[27-Jul-2022 05:47:09 UTC] PHP Warning: Undefined property: stdClass::$last_updated in /bitnami/wordpress/wp-content/plugins/wp-last-modified-info/inc/Core/Backend/PluginsData.php on line 137
[27-Jul-2022 05:47:19 UTC] PHP Warning: Undefined property: stdClass::$version in /bitnami/wordpress/wp-content/plugins/wp-last-modified-info/inc/Core/Backend/PluginsData.php on line 134
[27-Jul-2022 05:47:19 UTC] PHP Warning: Undefined property: stdClass::$requires in /bitnami/wordpress/wp-content/plugins/wp-last-modified-info/inc/Core/Backend/PluginsData.php on line 135

Google search results do not show modified date

Good day! I am using your plugin, but the problem is that Google does not display the modified date in its search results for my articles. I am using All In One SEO Pack plugin and WP version 5.3. Compatibility Mode selected in settings

Issue with Replace Published Date display mode

Hi there,

I'm trying to use the Replace Published Date mode without replacing the original author's name. However, the plugin doesn't seem to work at all or make any changes to my posts whatsoever. You can see how the plugin settings as I set them up below. Thanks!

Screenshot 2024-03-21 at 13 55 48

WP Backend Error

hi, i have after the update a Backend Error:

TypeError: (0 , d.getSettings) is not a function
    at s (.../wp-content/plugins/wp-last-modified-info/assets/block-editor/build/index.js?ver=c4ca624fc6f55caf48e7:1:188)
    at we (.../wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:84:293)
    at zj (.../wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:226:496)
    at Th (.../wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:152:223)
    at tj (../wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:152:152)
    at Te (../wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:146:151)
    at ../wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:61:68
    at unstable_runWithPriority (../wp-includes/js/dist/vendor/react.min.js?ver=16.13.1:25:260)
    at Da (.../wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:60:280)
    at Pg (.../wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:61:14)

After i disable the plugin it works.

WP Ver.: 5.8.9

Thanks

Posts list messed up

When enabling the "Last Modified" column in the WP posts list (enabled by default), the post title gets crammed into a single character column. Hard to explain, here is a screenshot:

Posts ‹ Indeedly — WordPress 2019-12-01 23-48-35

Look at the title column. When disabling "Last Modified", everything is back to normal.

Stopped working

Returning null on WP.com site. Last known working on Nov 10th, 2021

  • WP v5.8.2
  • WPLMI v1.7.7

Using Elementor Blog Object - Last Modified info not available

Sayan,

We're using your plugin with Elementor & noticing when using Elementor's built in blog object that we're unable to choose your last modified info as a metadata object. ie: display your date/time under our blog post. I see in the support forum we are not alone. Any likelyhood you might be able to remedy that in the near future? I'm happy to collaborate so you can see exactly what I mean..

Zoom or screen grabs are available of what I see in Elementor.. just ask! Thanks!

Frontend posts sorted by date modified

We have the settings like so:
image

Despite this, frontend posts are being sorted by post_modified instead of post_date.

The workaround was to go to the settings page and click Save Settings, which forced a save of the settings.

I suspect the bug is here:

if ( ! $this->is_equal( 'default_sort_order', 'default' ) ) {
	if ( ! is_admin() && $query->is_main_query() ) {
	    if ( $query->is_home() || $query->is_category() || $query->is_tag() ) {
	    	$query->set( 'orderby', 'modified' );
	    	$query->set( 'order', $front_order );
		}
	}
}

If $this->get_data( 'lmt_' . $name ) returns an empty string, it says "oh, that's not the default, let's sort by date modified".

Adding a nonempty check would probably fix it:

if ( $this->get_data( 'lmt_default_sort_order' ) && ! $this->is_equal( 'default_sort_order', 'default' ) ) {

Possibility to show published date as well

Detail Requirement:

  • To be used with shortcode
  • Show 'Published On Dec 19, 2019' if not updated or updated within set gap. 'Published On' being the default text.
  • Otherwise show 'Updated On Dec 19, 2019'. 'Updated On' is the default text.

I think it is already possible for themes whose template is supported, WP Last Modified Info replaces the existing post date that comes from the theme.

I need to insert it via shortcode, it can be two shortcodes (published & modified) but only one should be visible based on settings.

Update:
I made it work via replacement Text or HTML Replacement. Minor problem I noticed is that it requires to match the exact number of spaces as well. May be we can clean up a bit on that.
Of course, placing publish date from plugin itself would have been much elegant.

Dashboard Widget Timestamp issue

  • In Dashboard Widget, Posts are showing publish time instead of Modified date.
  • Also nonce check is missing in Dashboard widget.

Error return $this->wrapper error not exist

I'm getting an error when tried to open one of pages
PHP Fatal error: Uncaught Error: Call to undefined method Wplmi\Core\Frontend\Shortcode::wrapper();

In Shortcode.php file there is a line
return $this->wrapper( $template, $get_post->ID, true, false, 'sc' );

But there is no wrapper function in Shortcode.php

How to replace post published date with post modified info?

Hi, this is a nice plugin but I would really like to get the info inline with the other post information (author, category, comments number, etc.). Is this possible?

I read that it "Allows you to replace post published date with post modified info." so that suggests it should be possible. But I can't see how in the Settings.

Imporvements

Code Improvements:

  1. Allow Toogle Disable Update Option for all post types and posts with future date.
  2. Optimize codebase.

Edit date

I have noticed that displaying the administration panel in a language other than English, despite manually changing the post modification date and clicking the "Update" button, the edited date still displays as January instead of the month I have set. Additionally, the date format is incorrect, showing as month - day - year instead of year - month - day.

Zrzut ekranu 2023-10-30 124851

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.