To Top - Version 2.1

Version Description

(Released: March 17, 2020) = * Compatibility check up to version 5.4

Download this release

Release Info

Developer catchthemes
Plugin Icon 128x128 To Top
Version 2.1
Comparing to
See all releases

Code changes from version 2.0 to 2.1

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: catchplugins, catchthemes, sakinshrestha, pratikshrestha, maheshma
3
  Donate link: https://catchplugins.com/plugins/to-top/
4
  Tags: to top, scroll up, arrow, button, icon, link to top, scroll, back to top, scroll to top, scroll top, scroll up, simple scroll to top, simple back to top, smooth scroll
5
  Requires at least: 4.8
6
- Tested up to: 5.3
7
  Stable tag: trunk
8
  License: GNU General Public License, version 3 (GPLv3)
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
@@ -57,6 +57,9 @@ You'll then see To Top dashboard from which you can enable or disable the button
57
 
58
  == Changelog ==
59
 
 
 
 
60
  = 2.0 (Released: November 12, 2019) =
61
  * Compatibility check up to version 5.3
62
 
3
  Donate link: https://catchplugins.com/plugins/to-top/
4
  Tags: to top, scroll up, arrow, button, icon, link to top, scroll, back to top, scroll to top, scroll top, scroll up, simple scroll to top, simple back to top, smooth scroll
5
  Requires at least: 4.8
6
+ Tested up to: 5.4
7
  Stable tag: trunk
8
  License: GNU General Public License, version 3 (GPLv3)
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
57
 
58
  == Changelog ==
59
 
60
+ = 2.1 (Released: March 17, 2020) =
61
+ * Compatibility check up to version 5.4
62
+
63
  = 2.0 (Released: November 12, 2019) =
64
  * Compatibility check up to version 5.3
65
 
languages/to-top-fr_FR.mo CHANGED
Binary file
languages/to-top-fr_FR.po CHANGED
@@ -1,11 +1,11 @@
1
- # Copyright (C) 2017 Catch Plugins
2
  # This file is distributed under the GNU General Public License v3.
3
  msgid ""
4
  msgstr ""
5
  "Project-Id-Version: To Top\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/tags/_s\n"
7
- "POT-Creation-Date: 2019-11-12 00:14-0800\n"
8
- "PO-Revision-Date: 2019-11-12 00:14-0800\n"
9
  "Last-Translator: Hubert Desrues <hubert.desrues@gmail.com>\n"
10
  "Language-Team: Français\n"
11
  "Language: fr_FR\n"
@@ -13,7 +13,7 @@ msgstr ""
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "Plural-Forms: nplurals=2; plural=n > 1;\n"
16
- "X-Generator: Poedit 2.2.4\n"
17
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;esc_attr_e;esc_attr__;_nx;"
18
  "esc_html__;esc_html_e\n"
19
  "X-Poedit-Basepath: .\n"
1
+ # Copyright (C) 2017-2020 Catch Plugins
2
  # This file is distributed under the GNU General Public License v3.
3
  msgid ""
4
  msgstr ""
5
  "Project-Id-Version: To Top\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/tags/_s\n"
7
+ "POT-Creation-Date: 2020-03-17 18:23-0700\n"
8
+ "PO-Revision-Date: 2020-03-17 18:23-0700\n"
9
  "Last-Translator: Hubert Desrues <hubert.desrues@gmail.com>\n"
10
  "Language-Team: Français\n"
11
  "Language: fr_FR\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "Plural-Forms: nplurals=2; plural=n > 1;\n"
16
+ "X-Generator: Poedit 2.3\n"
17
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;esc_attr_e;esc_attr__;_nx;"
18
  "esc_html__;esc_html_e\n"
19
  "X-Poedit-Basepath: .\n"
languages/to-top.pot CHANGED
@@ -1,11 +1,11 @@
1
- # Copyright (C) 2017 Catch Plugins
2
  # This file is distributed under the GNU General Public License v3.
3
  #, fuzzy
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: To Top\n"
7
  "Report-Msgid-Bugs-To: https://wordpress.org/tags/_s\n"
8
- "POT-Creation-Date: 2019-11-12 00:14-0800\n"
9
  "PO-Revision-Date: 2016-12-07 23:04-0500\n"
10
  "Last-Translator: Sakin Shrestha <info@catchplugins.com>\n"
11
  "Language-Team: Catch Plugins <info@catchplugins.com>\n"
@@ -14,7 +14,7 @@ msgstr ""
14
  "Content-Type: text/plain; charset=UTF-8\n"
15
  "Content-Transfer-Encoding: 8bit\n"
16
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
- "X-Generator: Poedit 2.2.4\n"
18
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;esc_attr_e;esc_attr__;_nx;"
19
  "esc_html__;esc_html_e\n"
20
  "X-Poedit-Basepath: .\n"
1
+ # Copyright (C) 2017-2020 Catch Plugins
2
  # This file is distributed under the GNU General Public License v3.
3
  #, fuzzy
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: To Top\n"
7
  "Report-Msgid-Bugs-To: https://wordpress.org/tags/_s\n"
8
+ "POT-Creation-Date: 2020-03-17 18:22-0700\n"
9
  "PO-Revision-Date: 2016-12-07 23:04-0500\n"
10
  "Last-Translator: Sakin Shrestha <info@catchplugins.com>\n"
11
  "Language-Team: Catch Plugins <info@catchplugins.com>\n"
14
  "Content-Type: text/plain; charset=UTF-8\n"
15
  "Content-Transfer-Encoding: 8bit\n"
16
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
+ "X-Generator: Poedit 2.3\n"
18
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;esc_attr_e;esc_attr__;_nx;"
19
  "esc_html__;esc_html_e\n"
20
  "X-Poedit-Basepath: .\n"
to-top.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: To Top plugin allows the visitor as well as admin to easily scroll back to the top of the page, with fully customizable options and ability to use image.
6
  * Author: Catch Plugins
7
  * Author URI: https://catchplugins.com/
8
- * Version: 2.0
9
  * License: GNU General Public License, version 3 (GPLv3)
10
  * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
11
  * Text Domain: to-top
@@ -38,21 +38,21 @@ if ( ! defined( 'WPINC' ) ) {
38
  }
39
 
40
  // Define Version
41
- define( 'TOTOP_VERSION', '2.0' );
42
 
43
  // The URL of the directory that contains the plugin
44
- if ( !defined( 'TOTOP_URL' ) ) {
45
  define( 'TOTOP_URL', plugin_dir_url( __FILE__ ) );
46
  }
47
 
48
 
49
  // The absolute path of the directory that contains the file
50
- if ( !defined( 'TOTOP_PATH' ) ) {
51
  define( 'TOTOP_PATH', plugin_dir_path( __FILE__ ) );
52
  }
53
 
54
  // Gets the path to a plugin file or directory, relative to the plugins directory, without the leading and trailing slashes.
55
- if ( !defined( 'TOTOP_BASENAME' ) ) {
56
  define( 'TOTOP_BASENAME', plugin_basename( __FILE__ ) );
57
  }
58
 
@@ -101,11 +101,11 @@ run_to_top();
101
  *
102
  * @since 1.0
103
  */
104
- function to_top_get_options(){
105
  $defaults = to_top_default_options();
106
  $options = get_option( 'to_top_options', $defaults );
107
 
108
- return wp_parse_args( $options, $defaults ) ;
109
  }
110
 
111
  /**
@@ -117,40 +117,39 @@ function to_top_get_options(){
117
  function to_top_default_options( $option = null ) {
118
  $default_options = array(
119
  //Basic Settings
120
- 'scroll_offset' => '100',
121
- 'icon_opacity' => '50',
122
- 'style' => 'icon',
123
 
124
  //Icon Settings
125
- 'icon_type' => 'dashicons-arrow-up-alt2',
126
- 'icon_color' => '#ffffff',
127
- 'icon_bg_color' => '#000000',
128
- 'icon_size' => '32',
129
- 'border_radius' => '5',
130
 
131
  //Image Settings
132
- 'image' => plugin_dir_url( __FILE__ ).'admin/images/default.png',
133
- 'image_width' => '65',
134
- 'image_alt' => '',
135
 
136
  //Advanced Settings
137
- 'location' => 'bottom-right',
138
- 'margin_x' => '20',
139
- 'margin_y' => '20',
140
- 'show_on_admin' => 0,
141
- 'enable_autohide' => 0,
142
- 'autohide_time' => '2',
143
- 'enable_hide_small_device' => 0,
144
- 'small_device_max_width' => '640',
145
 
146
  //Reset Settings
147
- 'reset' => 0,
148
  );
149
 
150
  if ( null == $option ) {
151
  return apply_filters( 'to_top_options', $default_options );
152
- }
153
- else {
154
  return $default_options[ $option ];
155
  }
156
  }
@@ -159,9 +158,9 @@ function to_top_default_options( $option = null ) {
159
  require plugin_dir_path( __FILE__ ) . 'admin/inc/ctp-tabs-removal.php';
160
 
161
  $ctp_options = ctp_get_options();
162
- if( 1 == $ctp_options['theme_plugin_tabs'] ) {
163
  /* Adds Catch Themes tab in Add theme page and Themes by Catch Themes in Customizer's change theme option. */
164
- if( ! class_exists( 'CatchThemesThemePlugin' ) && ! function_exists( 'add_our_plugins_tab' ) ) {
165
  require plugin_dir_path( __FILE__ ) . 'admin/inc/CatchThemesThemePlugin.php';
166
  }
167
- }
5
  * Description: To Top plugin allows the visitor as well as admin to easily scroll back to the top of the page, with fully customizable options and ability to use image.
6
  * Author: Catch Plugins
7
  * Author URI: https://catchplugins.com/
8
+ * Version: 2.1
9
  * License: GNU General Public License, version 3 (GPLv3)
10
  * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
11
  * Text Domain: to-top
38
  }
39
 
40
  // Define Version
41
+ define( 'TOTOP_VERSION', '2.1' );
42
 
43
  // The URL of the directory that contains the plugin
44
+ if ( ! defined( 'TOTOP_URL' ) ) {
45
  define( 'TOTOP_URL', plugin_dir_url( __FILE__ ) );
46
  }
47
 
48
 
49
  // The absolute path of the directory that contains the file
50
+ if ( ! defined( 'TOTOP_PATH' ) ) {
51
  define( 'TOTOP_PATH', plugin_dir_path( __FILE__ ) );
52
  }
53
 
54
  // Gets the path to a plugin file or directory, relative to the plugins directory, without the leading and trailing slashes.
55
+ if ( ! defined( 'TOTOP_BASENAME' ) ) {
56
  define( 'TOTOP_BASENAME', plugin_basename( __FILE__ ) );
57
  }
58
 
101
  *
102
  * @since 1.0
103
  */
104
+ function to_top_get_options() {
105
  $defaults = to_top_default_options();
106
  $options = get_option( 'to_top_options', $defaults );
107
 
108
+ return wp_parse_args( $options, $defaults );
109
  }
110
 
111
  /**
117
  function to_top_default_options( $option = null ) {
118
  $default_options = array(
119
  //Basic Settings
120
+ 'scroll_offset' => '100',
121
+ 'icon_opacity' => '50',
122
+ 'style' => 'icon',
123
 
124
  //Icon Settings
125
+ 'icon_type' => 'dashicons-arrow-up-alt2',
126
+ 'icon_color' => '#ffffff',
127
+ 'icon_bg_color' => '#000000',
128
+ 'icon_size' => '32',
129
+ 'border_radius' => '5',
130
 
131
  //Image Settings
132
+ 'image' => plugin_dir_url( __FILE__ ) . 'admin/images/default.png',
133
+ 'image_width' => '65',
134
+ 'image_alt' => '',
135
 
136
  //Advanced Settings
137
+ 'location' => 'bottom-right',
138
+ 'margin_x' => '20',
139
+ 'margin_y' => '20',
140
+ 'show_on_admin' => 0,
141
+ 'enable_autohide' => 0,
142
+ 'autohide_time' => '2',
143
+ 'enable_hide_small_device' => 0,
144
+ 'small_device_max_width' => '640',
145
 
146
  //Reset Settings
147
+ 'reset' => 0,
148
  );
149
 
150
  if ( null == $option ) {
151
  return apply_filters( 'to_top_options', $default_options );
152
+ } else {
 
153
  return $default_options[ $option ];
154
  }
155
  }
158
  require plugin_dir_path( __FILE__ ) . 'admin/inc/ctp-tabs-removal.php';
159
 
160
  $ctp_options = ctp_get_options();
161
+ if ( 1 == $ctp_options['theme_plugin_tabs'] ) {
162
  /* Adds Catch Themes tab in Add theme page and Themes by Catch Themes in Customizer's change theme option. */
163
+ if ( ! class_exists( 'CatchThemesThemePlugin' ) && ! function_exists( 'add_our_plugins_tab' ) ) {
164
  require plugin_dir_path( __FILE__ ) . 'admin/inc/CatchThemesThemePlugin.php';
165
  }
166
+ }