Skip to content

Commit

Permalink
version 2.0.0 is ready to go
Browse files Browse the repository at this point in the history
  • Loading branch information
nida78 committed Jan 3, 2024
1 parent 672dc44 commit a2689b0
Show file tree
Hide file tree
Showing 28 changed files with 38,006 additions and 406 deletions.
15 changes: 11 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog of WP Wiki Tooltip

## [2.0.0 - C6H14N2O2 | Lysine]
*Release Date - January 3rd, 2023*

* finally, the Gutenberg editor is supported, tooltips can easily be created in every rich-text component
* content filtering of tooltips is improved especially for removing inline stylesheets

## [1.10.2]
*Release Date - December 28th, 2021*

Expand All @@ -10,7 +16,7 @@

* sanitation has been implemented for both, backend and all AJAX frontend actions

## [1.10.0 - C6H13NO2 | Leucine ]
## [1.10.0 - C6H13NO2 | Leucine]
*Release Date - December 5th, 2020*

* the backend page is splitted into several tabs to have more space for some new settings in the future
Expand All @@ -30,7 +36,7 @@
* small fixes for the content parser to handle tables and other HTML tags better
* improved language support

## [1.9.0 - C6H13NO2 | Isoleucine ]
## [1.9.0 - C6H13NO2 | Isoleucine]
*Release Date - January 1st, 2019*

* sections of Wiki pages can be used for tooltips, now (use shortcode attribute ```section="anchor-of-section"```)
Expand Down Expand Up @@ -147,12 +153,13 @@

* Initial release

[2.0.0 - C6H14N2O2 | Lysine]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/2.0.0
[1.10.2]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.10.2
[1.10.1]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.10.1
[1.10.0 - C6H13NO2 | Leucine ]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.10.0
[1.10.0 - C6H13NO2 | Leucine]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.10.0
[1.9.2]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.9.2
[1.9.1]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.9.1
[1.9.0 - C6H13NO2 | Isoleucine ]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.9.0
[1.9.0 - C6H13NO2 | Isoleucine]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.9.0
[1.8.1]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.8.1
[1.8.0 - C6H9N3O2 | Histidine]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.8.0
[1.7.4]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.7.4
Expand Down
41 changes: 20 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Tags: wiki, wikipedia, mediawiki, tooltip, tooltipster, shortcode

Requires at least: 3.0

Tested up to: 6.1.1
Tested up to: 6.4.2

Stable tag: 1.10.2
Stable tag: 2.0.0

Donate link: https://n1da.net/specials/wp-wiki-tooltip/spenden/

Expand All @@ -22,8 +22,8 @@ Adds explaining tooltips querying their content from a [MediaWiki](https://www.m
Main features of the current version are:

* Setup at least one wanted Wiki base and several other options at a backend page
* Integrate the Wiki tooltip using shortcodes in Posts and Pages
* Shortcodes can be created by a [TinyMCE](https://codex.wordpress.org/TinyMCE) plugin - within Gutenberg's Classic-Block, too
* Integrate the Wiki tooltip in Posts and Pages using a handy popup in Gutenberg editor or simple shortcodes
* Shortcodes can be created by a [TinyMCE](https://codex.wordpress.org/TinyMCE) plugin, too

# Frequently Asked Questions

Expand Down Expand Up @@ -52,7 +52,7 @@ Since version 1.9.0 you can request a section by its title (anchor) using an ext
1. Find Wiki tooltip plugin in the "Add Plugins" page within your WordPress installation or Upload the Wiki tooltip plugin to your blog,
2. Activate it,
3. Create at least one Wiki base and review the global options on the settings page
4. Add some shortcodes to your Posts and Pages, and
4. Add some tooltips and / or shortcodes to your Posts and Pages, and
5. See nice and helpful tooltips where ever you like

# Screenshots
Expand All @@ -62,14 +62,21 @@ Since version 1.9.0 you can request a section by its title (anchor) using an ext
3. Wiki-Tooltips Settings - Error Handling: set some Error Handling options
4. Wiki-Tooltips Settings - Designs: set designs, stylings, and animations of tooltips
5. Wiki-Tooltips Settings - Thumbnails: enable and style thumbnails
6. Integrate the plugin by shortcodes in Posts and Pages
7. Use the [TinyMCE](https://codex.wordpress.org/TinyMCE) plugin to get help by a popup form - also available in the Gutenberg's Classic Block
8. See nice and helpful tooltips
6. Create tooltip in all Gutenberg rich-text components
7. Integrate the plugin by shortcodes in posts and pages, too
8. Use the [TinyMCE](https://codex.wordpress.org/TinyMCE) plugin to get help by a popup form - also available in the Gutenberg's Classic Block
9. See nice and helpful tooltips

# Changelog
The last three major releases are listed here, only. Find complete log of all changes in the [extra changelog file](https://github.com/nida78/wp-wiki-tooltip/blob/master/CHANGELOG.md)!

## [1.10.0 - C6H13NO2 | Leucine ]
## [2.0.0 - C6H14N2O2 | Lysine]
*Release Date - January 3rd, 2023*

* finally, the Gutenberg editor is supported, tooltips can easily be created in every rich-text component
* content filtering of tooltips is improved especially for removing inline stylesheets

## [1.10.0 - C6H13NO2 | Leucine]
*Release Date - December 5th, 2020*

* the backend page is splitted into several tabs to have more space for some new settings in the future
Expand All @@ -78,22 +85,14 @@ The last three major releases are listed here, only. Find complete log of all ch
* the used Tooltipster plugin is updated to its version 4.2.8
* some improvements for binding external resources

## [1.9.0 - C6H13NO2 | Isoleucine ]
## [1.9.0 - C6H13NO2 | Isoleucine]
*Release Date - January 1st, 2019*

* sections of Wiki pages can be used for tooltips, now (use shortcode attribute ```section="anchor-of-section"```)
* the used Tooltipster plugin is updated to its version 4.2.6
* a new option is available to set the animation how the tooltip appears
* the new JavaScript I18N Support was implemented for the Classic-Block of Gutenberg

## [1.8.0 - C6H9N3O2 | Histidine]
*Release Date - February 23rd, 2018*

* if tooltip trigger 'hover' is selected you can set explicitly how the link has to work
* special options for handling errors are available
* a new version of Tooltipster plugin was released that leads to some programmatic and design changes
* a preview for every tooltip designs is available at options page now

# Upgrade Notice

## General
Expand All @@ -108,6 +107,6 @@ The former Wiki URL is not transferred into this version. Review the settings pa
## Elder Upgrades
Nothing special to consider.

[1.10.0 - C6H13NO2 | Leucine ]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.10.0
[1.9.0 - C6H13NO2 | Isoleucine ]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.9.0
[1.8.0 - C6H9N3O2 | Histidine]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.8.0
[2.0.0 - C6H14N2O2 | Lysine]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/2.0.0
[1.10.0 - C6H13NO2 | Leucine]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.10.0
[1.9.0 - C6H13NO2 | Isoleucine]: https://github.com/nida78/wp-wiki-tooltip/releases/tag/1.9.0
Binary file modified assets/screenshot-6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/screenshot-7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/screenshot-8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot-9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions class.wp-wiki-tooltip-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
class WP_Wiki_Tooltip_Admin extends WP_Wiki_Tooltip_Base {

public function __construct( $name='' ) {
add_action( 'enqueue_block_editor_assets', array( $this, 'init_gutenberg' ) );

add_filter( 'plugin_action_links_' . $name, array( $this, 'add_action_links' ) );
add_action( 'admin_menu', array( $this, 'init' ) );
add_action( 'admin_init', array( $this, 'load_all_options' ) );
Expand Down Expand Up @@ -112,6 +114,14 @@ public function init() {
}
}

public function init_gutenberg() {
$asset = include_once( 'static/gutenberg/build/index.asset.php' );
$asset[ 'dependencies' ][] = 'wp-wiki-tooltip-mce-lang-js';

wp_enqueue_script( 'wp-wiki-tooltip-gutenberg-script', plugins_url( 'static/gutenberg/build/index.js', __FILE__ ), $asset[ 'dependencies' ], $asset[ 'version' ] );
wp_enqueue_style( 'wp-wiki-tooltip-gutenberg-style', plugins_url( 'static/gutenberg/build/index.css', __FILE__ ), '', $asset[ 'version' ] );
}

public function add_action_links( $links ) {
return array_merge(
$links,
Expand Down
2 changes: 1 addition & 1 deletion class.wp-wiki-tooltip-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
class WP_Wiki_Tooltip_Base {

protected $version = '1.10.2';
protected $version = '2.0.0';

protected $tooltipster_version = '4.2.8';

Expand Down
4 changes: 4 additions & 0 deletions class.wp-wiki-tooltip-comm.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ public function ajax_get_wiki_page() {
// delete all links (<a> tags) to avoid useless links in the tooltip
$content = preg_replace('/<\/?a[^>]*>/', '', $content);

// delete all inline styles (<style> tags) to avoid useless printed css content in tooltip
// solves issue https://wordpress.org/support/topic/strip-css-etc/
$content = preg_replace('/<style.*?<\/style>/', '', $content);

$result = array(
'code' => '1',
'title' => esc_html( $wiki_data[ 'parse' ][ 'title' ] ),
Expand Down
22 changes: 21 additions & 1 deletion class.wp-wiki-tooltip.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ public function __construct() {
add_action( 'wp_enqueue_scripts', array( $this, 'init' ) );
add_action( 'wp_footer', array( $this, 'add_wiki_container' ) );
add_shortcode( 'wiki', array( $this, 'do_wiki_shortcode' ) );
add_filter( 'the_content', array( $this, 'filter_the_content_for_wiki_tags' ) );

$this->load_all_options();
$this->load_all_options();
$this->shortcode_count = 1;
}

Expand Down Expand Up @@ -157,4 +158,23 @@ public function do_wiki_shortcode( $atts, $content ) {

return $output;
}

public function filter_the_content_for_wiki_tags( $content ) {
// check if we're inside the main loop in a single post
if( in_the_loop() && is_main_query() ) {
// search for all <wiki>-tags
$content = preg_replace_callback(
'/<wiki.*?\/wiki>/',
array( $this, 'convert_wiki_tag' ),
$content
);
}

return $content;
}

private function convert_wiki_tag( $tag_content ) {
// need this function only for probably more complex replacements
return preg_replace( '/<(\/?)wiki([^>]*)>/', '[$1wiki$2]', $tag_content[ 0 ] );
}
}
Binary file modified languages/wp-wiki-tooltip-de_DE.mo
Binary file not shown.
Loading

0 comments on commit a2689b0

Please sign in to comment.