Skip to content

Commit

Permalink
Merge pull request #81 from bigbite/release/1.0.0
Browse files Browse the repository at this point in the history
Release/1.0.0
  • Loading branch information
g-elwell authored Oct 1, 2024
2 parents 53ce1f8 + 71130d0 commit 4887a24
Show file tree
Hide file tree
Showing 76 changed files with 15,782 additions and 27,669 deletions.
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: [ 'plugin:@wordpress/eslint-plugin/recommended' ],
rules: {
'@wordpress/no-unsafe-wp-apis': 'off',
},
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ vendor/
build/

.DS_Store
.vscode
90 changes: 0 additions & 90 deletions README.md

This file was deleted.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bigbite/themer",
"description": "",
"type": "wordpress-plugin",
"version": "1.0.0-alpha.1",
"version": "1.0.0",
"repositories": [
{
"url": "git@github.com:bigbite/phpcs-config.git",
Expand Down
74 changes: 50 additions & 24 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 79 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Themer

Themer is a WordPress plugin that provides a UI for users to edit the [theme.json](https://developer.wordpress.org/themes/global-settings-and-styles/) file of your currently active theme. It was built as a companion to the [Site Editor](https://wordpress.org/documentation/article/site-editor/) allowing for even more granular control over your site styles through a dedicated UI.

## Features

- Edit and add new styles to your theme.json file through the UI
- Edit global styles, block styles and element styles
- Edit pseudo-class styles on elements
- Edit elements and pseudo-class styles within specific blocks
- Built in accessibility checker for colour contrast
- Contextual view of theme.json code whilst editing styles
- Option to export theme.json file for inclusion in your theme

![86068](https://github.com/user-attachments/assets/b036dc73-4252-407c-bdf8-75dd46fc2606)

## Installing

### Prerequisites

- **WordPress:** 6.2
- **PHP:** 8.0

### Via Composer

When installing to your site, add the following to you `composer.json` file. This will ensure that installation will use the build version of the package and allow it to be loaded using composer in the preferred path.

```json
{
"repositories": [
{
"type": "vcs",
"url": "git@github.com:@bigbite/themer.git"
}
],
"require": {
"@bigbite/themer": "^1.0.0"
},
"extra": {
"installer-paths": {
"plugins/{$name}/": [ "type:wordpress-plugin" ]
}
}
}
```

## Local Development or Manual Install

Clone the repository into your `plugins` or `client-mu-plugins` directory.

```
git clone git@github.com:@bigbite/themer.git && cd themer
```

Install JS packages.

```
npm install
```

Build all assets

```
npm run build:prod
```

Install PHP packages and create autoloader for the plugin.

```
composer update
```

## Issues

We welcome bug reports, feature requests, questions, and pull requests. If you spot any mistakes or have an idea to make the plugin better, just [open an issue](https://github.com/bigbite/themer/issues/new/choose).

## Contributing

Please read [Code of Conduct](./CODE_OF_CONDUCT.md) for details on our code of conduct and [Contributing](./CONTRIBUTING.md) for details on the process for submitting pull requests to us.
10 changes: 5 additions & 5 deletions inc/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public function __construct() {
* @return void
*/
public function create_admin_screen() : void {
add_options_page(
__( 'Theme Settings' ),
'Theme Customiser',
'manage_options',
'theme_settings',
add_theme_page(
__( 'Styles Editor' ),
'Styles Editor',
'edit_theme_options',
'styles_editor',
array( $this, 'theme_render_settings' ),
);
}
Expand Down
5 changes: 5 additions & 0 deletions inc/class-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ public function __construct() {
* @return void
*/
public function enqueue_themer_assets() : void {
$current_screen = get_current_screen();
if ( 'appearance_page_styles_editor' !== $current_screen->id ) {
return;
}

$plugin_name = basename( THEMER_DIR );
$asset_file = include THEMER_DIR . '/build/index.asset.php';

Expand Down
Loading

0 comments on commit 4887a24

Please sign in to comment.