Coder Social home page Coder Social logo

kntnt / kntnt-style-editor Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 39 KB

WordPress plugin that creates a CSS-file that can be edited through the administration user interface.

License: GNU General Public License v3.0

PHP 98.21% JavaScript 0.37% CSS 1.42%

kntnt-style-editor's Introduction

Kntnt Style Editor

WordPress plugin that creates a CSS-file that can be edited through the administration user interface.

Description

This lightweight plugin uses WordPress built-in code editor to allow you edit CSS. The CSS is saved to a file, which is globally enqueued to be shown at the frontend.

Installation

Download latest version to your computer, and upload it to WordPress.

You can also install it with GitHub Updater, which gives you the additional benefit of keeping the plugin up to date the usual way. Please see its wiki for more information.

Frequently Asked Questions

Where is the editor?

Look for Kntnt Style Editor in the Appearance menu.

How does this plugin work?

When the editor content is saved, it is saved as an option in the WordPress database and exported to the file. When the editor is loading its content, the content is loaded from the database and not the file. Thus, the CSS editor is not editing the file directly. Therefore, it is possible to delete the file; it will be re-created when saving the CSS next time.

Why is this plugin needed?

Since WordPress 4.7, you can add custom CSS in the customizer. But that has two consequences:

  1. Additional CSS added through a theme's customizer is only available for that particular theme. In contrast, additional CSS added through this plugin is available independent of the theme.
  2. Additional CSS added through a theme's customizer is usually inlined into the HTML-file and not saved to a separate CSS-file. Thus, the added CSS is not subject to WordPress usual processing of CSS in files. Consequently, it will not be minified and combined by a cache plugin that can't extract inline CSS. That could hurt your site's performance. In contrast, additional CSS added through this plugin is stored as a file that WordPress will process as any other CSS file.

Does this plugin affect performance?

No. Since the CSS is stored in a static file, there is no extra database queries or anything else that takes time. The only time data is retrieved from or saved to the database is when you work in the editor.

How do I know if there is a new version?

This plugin is currently hosted on GitHub; one way would be to "watch" the repository.

If you prefer WordPress to nag you about an update and let you update from within its administrative interface (i.e. the usual way), you must download GitHub Updater to your computer and upload it to WordPress and activate it. Please see its wiki for more information.

How can I get help?

If you have questions about the plugin and cannot find an answer here, start by looking at issues and pull requests. If you still cannot find the answer, please ask in the plugin's issue tracker at Github.

How can I report a bug?

If you have found a potential bug, please report it on the plugin's issue tracker at Github.

How can I contribute?

Contributions to the code or documentation are much appreciated.

If you are unfamiliar with Git, please date it as a new issue on the plugin's issue tracker at Github.

If you are familiar with Git, please make a pull request.

Changelog

1.0.4

  • Delayed enqueuing of the CSS with priority 9999.

1.0.3

  • Fixed regression bug (style not saved as file).

1.0.2

  • Improved how the editor is shown.
  • Minor updates to the README file.
  • Added install.php to make sure the CSS isn't auto-loaded from the wp_option table.
  • Added uninstall.php to delete this plugin option and created file.

1.0.1

  • Minor refactoring of code.
  • Improved documentation.

1.0.0

  • The initial release.
  • A fully functional plugin.

kntnt-style-editor's People

Contributors

tbarregren avatar

Watchers

 avatar James Cloos 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.