Skip to content

Commit

Permalink
version 1.0.3 bump
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriy-rudakov committed Jan 9, 2022
1 parent f9eb6ad commit 57d3d0e
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
14 changes: 14 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#### 1.0.3 / 2022-01-09
* restored option to add Language Switcher to post/pages list
* refactoring `admin-edit` script to support support for `Quick Edit` and post/pages list
* refactoring `whenReady` into `whenNodeInserted`, added capabilities `whenNodeRemoved`
* refactoring some methods to use `get_qt_config` method instead of `global $q_config`
* added `session` option support
* added support for shortcodes in menu
* added `appearance` and `large` options - to change appearance of language buttons
* got rid of `qTranslateConfig` in the __Block Editor__
* implemented `inserted` hooks to deal with element removed from the page when the attribute Panel is closed
* implemented `not synced` language switching
* refactoring CSS to use common variables
* small improvements

#### 1.0.2 / 2022-01-05
* refactoring with `Zukit` components
* created custom `store` for RAW values
Expand Down
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ After the WordPress changed the `TinyMCE` to the Block Editor (*Gutenberg*), edi
* Ability to add custom blocks to the list supported by this plugin
* Control of the appearance of buttons to switch language
* Ability to switch language in the list of posts/pages
* Ability to switch language in the modal window of __Media Library__
* Support for __Quick Edit__ in the list of posts/pages
<!-- * Ability to switch language in the modal window of __Media Library__ -->
* Supports adding a language switcher to any post or page using a `shortcode`
* Ability to use `shortcode` in the WordPress __menu__

Expand All @@ -38,6 +39,16 @@ You can also personalize the form by adding attributes to the shortcode:
* __unsorted__ - if sorted (default) then the active language will be always on top: `unsorted=true`
* __post_id__ - post ID for which you want to create a language switcher (default for the current post): `post_id=123`

If `shortcode` is used in the menu, use the following template to describe the shortcode:

`#location+tag?attribute1=value1&attribute2=value2&linkclass=red-color,bold#`

* __location__ - a position where the result of the shortcode will be inserted. Possible options - `after`|`before`|`url`, that is, before link, after link or instead of the link itself
* __tag__ - the name of shortcode
* __attribute1__, __attribute2__ - names of attributes of shortcode
* __value1__, __value2__ - attribute values
* __linkclass__ - a special attribute that sets the class name that will be added to the link (*note that if you want to add __several__ classes, you can specify them through the comma*)

#### Examples

* With language codes and "unsorted":
Expand All @@ -48,6 +59,11 @@ You can also personalize the form by adding attributes to the shortcode:

`[zu-lang class="my-switcher" post_id=1209]`

* In __menu__ with custom class, only language codes, before link and with a special link class:

`#before+zu-lang?class=my-switcher&as_code=true&linkclass=none#`



## Download

Expand All @@ -61,7 +77,7 @@ You can also personalize the form by adding attributes to the shortcode:

## Public methods

In order to take advantage of the switching language implemented in this plugin, Plugins and themes can add their custom blocks using these functions:
In order to take advantage of the switching language implemented in this plugin, plugins and themes can add their custom blocks using these functions:

+ __zutrans_is_multilang()__
+ __zutrans_register_blocks(`$blocks`)__
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zutranslate",
"version": "1.0.2",
"version": "1.0.3",
"testedWP": "5.8.2",
"requiresPHP": ">=7.2.0",
"author": "Dmitry Rudakov",
Expand Down
6 changes: 4 additions & 2 deletions zu-translate.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: https://github.com/picasso/zu-translate
GitHub Plugin URI: https://github.com/picasso/zu-translate
Description: Enhances "qTranslate-XT" with some features and Gutenberg support (WordPress Block Editor).
Version: 1.0.2
Version: 1.0.3
Author: Dmitry Rudakov
Author URI: https://github.com/picasso
Text Domain: zu-translate
Expand All @@ -16,7 +16,8 @@
// Prohibit direct script loading
defined('ABSPATH') || die('No direct script access allowed!');

// add_action('plugins_loaded', function() { // DEBUG-ONLY
// DEBUG-ONLY
// add_action('plugins_loaded', function() {

// Always load Zukit even if we don't use it later ('wp_doing_ajax' or 'wp_doing_cron')
// as other plugins or themes may want to use it
Expand All @@ -36,4 +37,5 @@
zutranslate(__FILE__);
}

// DEBUG-ONLY
// });

0 comments on commit 57d3d0e

Please sign in to comment.