Code Monkey home page Code Monkey logo

wp-customize-comments's Introduction

Customize Comments

Edit comments with live preview and bundle edits in Customizer changesets.

Contributors: xwp, westonruter
Tags: customizer, customize, comments
Requires at least: 4.9
Tested up to: 4.9
Stable tag: 0.1.0
License: GPLv2 or later
Requires PHP: 5.4

Build Status Built with Grunt

Description

This plugin is a proof of concept for how comment editing might be added to the Customizer, with edits to comments being staged in changesets along with any other changes made in customziation session. It demonstrates scalable lazy-loading of controls/settings via the REST API. It demonstrates both dynamic settings and dynamic partials.

A new Comments section is added to the Customizer, and when this section is expanded the most recent comments are fetched from the REST API and then are added as textarea controls in the section. A button appears at the bottom of the section for loading subsequent pages of comments.

The comments are listed with the comment author and publish date along with the post it was commented on. Only the comment's content is currently editable. When you do edit a comment that appears in the preview, then the comment will be previewed with selective refresh after a low-fidelity instant preview.

When you navigate to a post and see the comment list, clicking the "Edit Comment" link in the Customizer preview will cause the comment to be loaded into a new textarea control in the section, and the control will then be focused for editing.

Play video on YouTube

This is a natural companion to the Customize Posts feature plugin.

Screenshots

Comments edited in the Customizer are previewed with selective refresh.

Comments edited in the Customizer are previewed with selective refresh.

Comment controls appear with permalinks to their parent posts; a load more button dynamically loads new comments from the REST API.

Comment controls appear with permalinks to their parent posts; a load more button dynamically loads new comments from the REST API.

Changelog

2017-11-26 - 0.1.0

Initial release.

wp-customize-comments's People

Contributors

westonruter avatar

Watchers

James Cloos avatar Steve Daniels avatar  avatar

Forkers

isabella232

wp-customize-comments's Issues

Dynamic control and settings with customizer preview

In this plugin example, it is Ok to register settings and controls dynamically.

But when setting my_control value to a new one programmatically without partial refresh, it won't callback. It works good when a partial refresh happens.

Any reason? anything I am missing?

wp.customize( my_control, function( value ) {
		value.bind( function( value ) {
			
		});
	});

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.