diff --git a/CHANGES.md b/CHANGES.md index 73caf8f..189c9ec 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/README.md b/README.md index 664122b..dd6b561 100644 --- a/README.md +++ b/README.md @@ -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 + * Supports adding a language switcher to any post or page using a `shortcode` * Ability to use `shortcode` in the WordPress __menu__ @@ -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": @@ -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 @@ -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`)__ diff --git a/package.json b/package.json index b02d319..91b703c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/zu-translate.php b/zu-translate.php index ee343a0..0d98d79 100644 --- a/zu-translate.php +++ b/zu-translate.php @@ -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 @@ -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 @@ -36,4 +37,5 @@ zutranslate(__FILE__); } +// DEBUG-ONLY // });