Changeset 1575949
- Timestamp:
- 01/16/2017 07:47:31 PM (9 years ago)
- Location:
- tawkto-manager/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
tawktomanager.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tawkto-manager/trunk/readme.txt
r1574584 r1575949 4 4 Requires at least: 2.9 5 5 Tested up to: 4.7.1 6 Stable tag: 2.0. 56 Stable tag: 2.0.6 7 7 8 8 Tawk.To Manager adds visibility control for tawk.to chat with a shortcode (posts/pages/front page) and more options to hide & show. … … 55 55 56 56 == Changelog == 57 = 2.0.6 = 58 * Update to make version 2.0.5 backward compatible with WordPress 4.6 and lower and compatible with WordPress 4.7 and higher. 59 57 60 = 2.0.5 = 58 61 * Update to fix bug with WordPress 4.7 and higher. -
tawkto-manager/trunk/tawktomanager.php
r1574584 r1575949 6 6 Plugin URI: http://www.tawktomanager.org/ 7 7 Description: Tawk.To Manager enables extensive visibility control for tawk.to chat with a shortcode for post and pages and extra display options for the front page, category and tag pages and for administrators and subscribers. 8 Author: Dani ël Mulder9 Version: 2.0. 58 Author: Daniel Mulder 9 Version: 2.0.6 10 10 Author URI: http://www.omnileads.nl/daniel-mulder-all-star/ 11 11 */ … … 47 47 } 48 48 49 /* 50 * Register WordPress settings in admin area 51 */ 49 52 50 53 protected static function __register_settings(){ 51 /** register wp settings */ 52 $args = array('show_in_rest'=> '','type' =>'string','default' =>'',); 53 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_tawktoscript', $args ); 54 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_show_always', $args ); 55 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_show_front_page', $args ); 56 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_show_cat_pages', $args ); 57 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_show_tag_pages', $args ); 58 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_hide_admin', $args ); 59 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_hide_subscribers', $args ); 60 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_hide_not_subscriber', $args ); 61 } 62 54 global $wp_version; 55 // Check wp version to work with WordPress 4.7 and up and 4.6 and lower 56 if ( $wp_version >= 4.7 ) { 57 /** register wp settings WordPress 4.7 and up */ 58 $args = array('show_in_rest'=> '','type' =>'string','default' =>'',); 59 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_tawktoscript', $args ); 60 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_show_always', $args ); 61 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_show_front_page', $args ); 62 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_show_cat_pages', $args ); 63 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_show_tag_pages', $args ); 64 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_hide_admin', $args ); 65 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_hide_subscribers', $args ); 66 register_setting( 'ttm_tawkto_manager_plugin_options', 'ttm_hide_not_subscriber', $args ); 67 }else { 68 /** register wp settings WordPress 4.6 and lower */ 69 register_setting( 'ttm_tawkto_manager_plugin_options', array(__CLASS__, 'ttm_tawktoscript' ) ); 70 register_setting( 'ttm_tawkto_manager_plugin_options', array(__CLASS__, 'ttm_show_always' ) ); 71 register_setting( 'ttm_tawkto_manager_plugin_options', array(__CLASS__, 'ttm_show_front_page' ) ); 72 register_setting( 'ttm_tawkto_manager_plugin_options', array(__CLASS__, 'ttm_show_cat_pages' ) ); 73 register_setting( 'ttm_tawkto_manager_plugin_options', array(__CLASS__, 'ttm_show_tag_pages' ) ); 74 register_setting( 'ttm_tawkto_manager_plugin_options', array(__CLASS__, 'ttm_hide_admin' ) ); 75 register_setting( 'ttm_tawkto_manager_plugin_options', array(__CLASS__, 'ttm_hide_subscribers' ) ); 76 register_setting( 'ttm_tawkto_manager_plugin_options', array(__CLASS__, 'ttm_hide_not_subscriber' ) ); 77 } 78 } 79 80 /* 81 * Get values from WordPress options for option values to use 82 */ 63 83 64 84 protected static function __ttm_init_options(){ … … 75 95 76 96 /* 77 * Secure callback with referer for (api) callbacks options page 78 * @void() 97 * Secure callback create nonce for options page in admin area 79 98 */ 80 99 … … 85 104 } 86 105 106 /* 107 * Secure callback get nonce for reading options page in admin area 108 * 109 */ 87 110 88 111 public function getNonce(){ … … 130 153 } // end ctrl class 131 154 132 } //endif exist ctrl 133 155 } //endif 134 156 135 157 /** admin actions in dashboard */ 136 137 158 138 159 if ( is_admin() && !class_exists('TTM_SettingsController') ){
Note: See TracChangeset
for help on using the changeset viewer.