GithubHelp home page GithubHelp logo

isabella232 / wp-customize-widgets-plus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xwp/wp-customize-widgets-plus

0.0 0.0 0.0 369 KB

WordPress plugin for lab features and a testbed for improvements to Widgets and the Customizer.

Home Page: https://wordpress.org/plugins/customize-widgets-plus/

PHP 87.75% JavaScript 11.97% CSS 0.28%

wp-customize-widgets-plus's Introduction

Customize Widgets Plus

Lab features and a testbed for improvements to Widgets and the Customizer.

Contributors: westonruter, xwp, newscorpau
Tags: customizer, customize, widgets
Requires at least: trunk
Tested up to: trunk
Stable tag: trunk (master)
License: GPLv2 or later

Build Status

Description

This plugin consists of lab features and a testbed for improvements to Widgets and the Customizer.

Requires PHP 5.3+.

Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum.

Current features:

Non-Autoloaded Widget Options

Widgets are stored in options (normally). Multi-widgets store all of their instances in one big serialized array specific to that type. When there are many widgets of a given type, the size of the serialized array can grow very large. What's more is that WP_Widget does not explicitly add_option(... 'no' ) before calling update_option(), and so all of the settings get added with autoloading. This is very bad when using Memcached Object Cache specifically because it can result in the total alloptions cache key to become larger than 1MB and result in Memcached failing to store the value in the cache. On WordPress.com the result is a "Matt's fault" error which has to be fixed by the VIP team. Widget settings should not be stored in serialized arrays to begin with; each widget instance should be stored in a custom post type. But until this is done we should stop autoloading options. See also #26876 and #23909.

Widget Number Incrementing

Implements fixes for Core issue #32183 (Widget ID auto-increments conflict for concurrent users). The stored widget_number option provides a centralized auto-increment number for whenever a widget is instantiated, even widgets in the Customizer that are not yet saved.

Efficient Multidimensional Setting Sanitizing

Settings for multidimensional options and theme_mods are extremely inefficient to sanitize in Core because all of the Customizer settings registered for the subsets of the option or theme_mod need filters that are added to the entire value, meaning sanitizing one single setting will result in all filters for all other settings in that option/theme_mod will also get applied. This functionality seeks to improve this as much as possible, especially for widgets which are the worst offenders. Implements partial fix for #32103.

HTTPS Resource Proxy

When FORCE_SSL_ADMIN is enabled (such as on WordPress.com), the Customizer will load the site into the preview iframe using HTTPS as well. If, however, external resources are being referenced which are not HTTPS, they will fail to load due to the browser's security model raise mixed content warnings. This functionality will attempt to rewrite any HTTP URLs to be HTTPS ones via a WordPress-based proxy.

Widget Posts

Store widget instances in posts instead of options. Requires trunk due to patch committed in #32474. More details forthcoming...

Deferred Widget Embedding

Backports #33898 and #33901 which are now in trunk for WordPress 4.4.

Changelog

0.2

Add Widget Posts module. See changelog.

0.1

Initial release.

wp-customize-widgets-plus's People

Contributors

davidlonjon avatar kasparsd avatar shadyvb avatar valendesigns avatar westonruter avatar

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.