Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriy-rudakov committed May 3, 2021
1 parent 90804ad commit 9462772
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 14 deletions.
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#### 2.1.0 / 2021-05-03
* first stable version after refactoring (`shortcode cache` and `cookie notice` not restored yet)
* added support for GitHub data for `Core Info` panel
* __Zukit__ updated to version 1.2.2
* according to the changes in __Zukit__, rows in `Plugin Info` are now hidden through the value equal to __null__
* min `php` version updated
* refactored version of `duplicate`
* fixed bug with `overwrite` check
* cleaning and css improvements

#### 2.0.3 / 2021-04-12
* addded Zukit `Core Info` panel
* admin styles are divided into common and for the Settings Page
Expand Down
70 changes: 61 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,71 @@
# ZU+
# Zu Plus: Developer tools for WordPress and Zukit.

_Plugin for developers_
[![WordPress Plugin Version](https://img.shields.io/wordpress/plugin/v/zu-plus?style=for-the-badge)]()
[![WordPress Plugin: Tested WP Version](https://img.shields.io/wordpress/plugin/tested/zu-plus?color=4ab866&style=for-the-badge)]()
[![WordPress Plugin Required PHP Version](https://img.shields.io/wordpress/plugin/required-php/zu-plus?color=bc2a8d&style=for-the-badge)](https://www.php.net/)
[![License](https://img.shields.io/github/license/picasso/zu-plus?color=fcbf00&style=for-the-badge)](https://github.com/picasso/zu-plus/blob/master/LICENSE)

This plugin does a lot of things. I will describe this later, after version 2.
Supports development with the [Zukit framework](https://github.com/picasso/zukit) and implements various debugging methods and other service functions for WordPress.

![Zu Plus - Developer tools for WordPress and Zukit.](https://user-images.githubusercontent.com/399395/116901691-88e93e80-ac3a-11eb-90e5-d7cb538b84bc.png)

## Install

### Download
## Description

+ [ZU+ on GitHub](https://github.com/picasso/zu-plus/archive/master.zip)
Unfortunately, when developing in PHP for WordPress, it is not always possible to use the debugger and therefore the only way to find errors and debug is logging. In this plugin, I have collected my practices on various logging and debugging methods. Debug information can be output to a log file or displayed in [Query Monitor](https://github.com/johnbillion/query-monitor) if it is installed. There is also support for a [powerful PHP debugging helper - Kint](https://kint-php.github.io/kint/), which allows you to compactly display information in a structured way.

## Description
> 🎃 In addition, I usually add various service solutions to this plugin that are needed when creating a site or copying it from a template.
There will be a detailed description ... maybe
### Debugging Features

```
* Output of logs using __Kint__
* Output of logs to __Query Monitor__
* Output of debug info about the menu and submenu of Wordpress
* Debug output for `Responsive JS` (for __Zu__ theme)
* Support for logging on the front-end
* Management of the location of the log file and automatic overwriting
* Displays summary information about the __Zukit__ framework and all themes and plugins using it in this instance

### Other Features

* Duplicate WordPress menu
* Duplicate Wordpress Posts, Pages and Custom Posts
* Caching the code generated in shortcode (*not yet recovered after refactoring*)
* Cookie Notice to inform users that the site uses cookies and to comply with the EU GDPR regulations (*not yet recovered after refactoring*)

## Download

+ [Zu Plus on GitHub](https://github.com/picasso/zu-plus/archive/master.zip)

## Installation

1. Upload the `zu-plus` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin using the `Plugins` menu in your WordPress admin panel.
3. You can adjust the necessary settings using your WordPress admin panel in `Settings > Zu+`.

## Public logging methods

In order to take advantage of the logging capabilities implemented in this plugin, you need to use one of the functions:

+ __zu_log(`...$params`)__
+ __zu_logc(`$context`, `...$params`)__
+ __zu_log_if(`$condition`, `...$params`)__
+ __zu_log_location(`$path`, `$priority = 1`)__

If you are using the __Zukit__ framework, you can use the internal methods of your class - `log` and `logc`. This has its advantages and disadvantages. You will get additional information about the instance in which class your method was called, but you will lose the name of the variable passed to the function (only when using __Kint__).

+ __log(`...$params`)__
+ __logc(`$context`, `...$params`)__

The `zu_log` function logs any number of arguments passed to it. The function `zu_logc` differs from it only in that the first parameter is a string (`context`) that will be displayed before the data. The context string can have __modifiers__. If the first character of the string is `!`, `?` or `*` then, this will change the color of the context line to `red`, `orange` or `green`, respectively (when outputting to the __Query Monitor__).
The `zu_log_location` function can be used to change the location of the log file. Moreover, if the `$priority` argument is less than the current priority, then the file location will not change (*sometimes useful when debugging several interacting plugins or modules*). You can pass the magic constant `__FILE__` to set the path of the log file in the same directory.

```php
zu_log_location(__FILE__, 5);

zu_log($post, $title, $data['input']);

zu_logc('!Something went wrong', $_GET);

zu_log_if(isset($post), $post->ID);
```
1 change: 0 additions & 1 deletion includes/zuplus-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ protected function extend_debug_actions() {
// Actions & Add-ons ------------------------------------------------------]

public function init() {

// Cookie Notice Addon
if($this->is_option('cookie_notice')) {
// $this->cnotice = $this->register_addon(new zu_PlusCookieNotice());
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "zuplus",
"version": "2.0.3",
"testedWP": "5.7.0",
"requiresPHP": ">=7.2.0",
"version": "2.1.0",
"testedWP": "5.7.1",
"requiresPHP": ">=7.4.1",
"repository": {
"type": "git",
"url": "https://github.com/picasso/zuplus.git"
Expand Down
2 changes: 1 addition & 1 deletion zu-plus.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: https://github.com/picasso/zu-plus
GitHub Plugin URI: https://github.com/picasso/zu-plus
Description: Supports development with the Zukit framework and implements various debugging methods and other service functions.
Version: 2.0.3
Version: 2.1.0
Author: Dmitry Rudakov
Author URI: https://dmitryrudakov.com/about/
Text Domain: zu-plus
Expand Down

0 comments on commit 9462772

Please sign in to comment.