Skip to content

Commit

Permalink
minor mistakes with options fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nida78 committed Dec 5, 2020
1 parent 08fffd8 commit 8dec32e
Show file tree
Hide file tree
Showing 4 changed files with 168 additions and 125 deletions.
4 changes: 3 additions & 1 deletion class.wp-wiki-tooltip-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ protected function load_single_option( $default_key, $old_options, $new_options,
if( false == $new_options ) {
if( false != $old_options ) {
foreach( $keys as $key ) {
$options_to_load[ $key ] = $old_options[ $key ];
if( isset( $old_options[ $key ] ) ) {
$new_options[ $key ] = $old_options[ $key ];
}
}
} else {
$new_options = $default_options[ $default_key ];
Expand Down
4 changes: 3 additions & 1 deletion class.wp-wiki-tooltip.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function add_wiki_container() {
$this->options_thumb[ 'thumb-width' ],
$this->options_thumb[ 'thumb-align' ],
$this->options_base[ 'trigger' ],
$this->options_base[ 'trigger-hover-action' ],
( $this->options_base[ 'trigger' ] == 'hover' ) ? $this->options_base[ 'trigger-hover-action' ] : '',
$this->options_base[ 'a-target' ],
$this->options_base[ 'min-screen-width' ],
$this->options_error[ 'page-error-handling' ],
Expand All @@ -95,6 +95,8 @@ public function do_wiki_shortcode( $atts, $content ) {
$title = ( $params[ 'title' ] == '' ) ? $content : $params[ 'title' ];

$wiki_base_id = $params[ 'base' ];

$this->load_all_options();
$wiki_urls = $this->options_base[ 'wiki-urls' ];

if( $wiki_base_id == '' ) {
Expand Down
Binary file modified languages/wp-wiki-tooltip-de_DE_formal.mo
Binary file not shown.
Loading

0 comments on commit 8dec32e

Please sign in to comment.