Code Monkey home page Code Monkey logo

wordpress-preview-revisions's Introduction

WordPress Preview Revisions โšก

  • The plugin is used to check the front-end preview of the older content revisions of a page/post, just as the preview mode is used in a current draft.
  • Upon going to the revisions list, a preview button will be available to preview exactly how a page or post appeared in the selected version.
  • Note: This has also been submitted as a feature in the core ticket. Once this gets merged into the core, you will no longer need the plugin.

About ๐Ÿ’ก

  • To enable editors to check and restore the previous content, whenever needed, WordPress has a handy revisions feature.
  • However, the current limitation of the revisions feature is the lack of a preview option. While checking a previous revision, the editors can only see the content changes in the draft, but not the visual appearance of how it renders over the front end.
  • To address the same, we have developed the WordPress Preview Revisions plugin, which enables the preview option for every revision, empowering the editors to take an informed call on what to restore.

Demo ๐ŸŽฅ

RevisionPreviewNew.webm

Installation Guide ๐Ÿฆฎ

  • Clone this repo under the wp-content/plugins/ folder of WordPress.
  • Activate the plugin.
  • Go to the previous revisions of a page/post.
  • Click on the preview button for the revision you have selected.
  • You will be redirected to the front-end preview of that particular revision.

Author

Contributors ๐Ÿ‘ค

License ๐Ÿ“ƒ

This project is licensed under the GPL2 License - see the LICENSE.md file for details.

Does this interest you?

Join us at rtCamp, we specialize in providing high performance enterprise WordPress solutions

wordpress-preview-revisions's People

Contributors

hbhalodia avatar sh4lin avatar szepeviktor avatar westonruter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

westonruter

wordpress-preview-revisions's Issues

Use `wp_json_encode()` to safely render text inside `script` tag

What?

  • The issue is while adding the text inside the javascript using innertext the text is not escaped via wp_json_encode() which can result into malicious injection or can be a syntax error in other languages.

Given this existing code:

button.innerText = '<?php esc_html_e( 'Preview', 'preview-revisions' ); ?>';

It could be that a translation string incorporates an apostrophe, either because the language uses apostrophes:

image

Which would result in a syntax error here:

button.innerText = 'mua'i va'aiga';
// --------------------^

Plugin updates and Compatibility checks

We need to complete the following set of tasks for this plugin.

  • Make sure it's compatible with latest WordPress version. (e.g 6.4.X )
  • Make sure it's PHP 8.2 compatible.
  • Make sure it's VIP compatible
  • Run the PHPCS scan
  • Check if there' any existing user manual available else document the user manual with screenshots that will include things like "How to install plugin", "Plugin Pre-requisites" "How to setup plugin for first time", "Plugin Settings with their use case" etc

Before starting any work please add your time estimations for every mentioned task and get it approved by your Project Co-ordinator or Project Manager

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.