Header Footer Code Manager - Version 1.0.8

Version Description

2018-10-04 * FIXED: Updated obsolete code causing errors.

Download this release

Release Info

Developer 99robots
Plugin Icon 128x128 Header Footer Code Manager
Version 1.0.8
Comparing to
See all releases

Code changes from version 1.0.7 to 1.0.8

99robots-header-footer-code-manager.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Header Footer Code Manager
4
  * Plugin URI: https://99robots.com/products
5
  * Description: Header Footer Code Manager by 99 Robots is a quick and simple way for you to add tracking code snippets, conversion pixels, or other scripts required by third party services for analytics, tracking, marketing, or chat functions. For detailed documentation, please visit the plugin's <a href="https://99robots.com/"> official page</a>.
6
- * Version: 1.0.7
7
  * Author: 99robots
8
  * Author URI: https://99robots.com/
9
  * Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
@@ -53,35 +53,37 @@ function hfcm_options_install() {
53
 
54
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
55
  dbDelta( $sql );
56
- $wpdb->show_errors();
 
 
 
 
 
 
 
 
 
57
  //Check for Exclude Pages
58
  $column_name = 'ex_pages';
59
- $checkcolumn = $wpdb->prepare(
60
  "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ",
61
  DB_NAME, $table_name, $column_name
62
- ) ;
63
- if ( ! empty( $checkcolumn ) ) {
64
  $altersql = "ALTER TABLE `$table_name` ADD `ex_pages` varchar(300) DEFAULT 0 AFTER `s_pages`";
65
  $wpdb->query($altersql);
66
  }
67
 
68
  //Check for Exclude Posts
69
  $column_name1 = 'ex_posts';
70
- $checkcolumn2 = $wpdb->prepare(
71
  "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ",
72
  DB_NAME, $table_name, $column_name1
73
- );
74
- if ( ! empty( $checkcolumn2 ) ) {
75
  $altersql = "ALTER TABLE `$table_name` ADD `ex_posts` varchar(300) DEFAULT 0 AFTER `s_posts`";
76
  $wpdb->query($altersql);
77
  }
78
- add_option( 'hfcm_db_version', $hfcm_db_version );
79
- }
80
- register_activation_hook( __FILE__, 'hfcm_options_install' );
81
-
82
- function myplugin_update_db_check() {
83
- global $hfcm_db_version;
84
- if ( get_site_option( 'hfcm_db_version' ) != $hfcm_db_version ) {
85
  hfcm_options_install();
86
  }
87
  update_option( 'hfcm_db_version', $hfcm_db_version );
3
  * Plugin Name: Header Footer Code Manager
4
  * Plugin URI: https://99robots.com/products
5
  * Description: Header Footer Code Manager by 99 Robots is a quick and simple way for you to add tracking code snippets, conversion pixels, or other scripts required by third party services for analytics, tracking, marketing, or chat functions. For detailed documentation, please visit the plugin's <a href="https://99robots.com/"> official page</a>.
6
+ * Version: 1.0.8
7
  * Author: 99robots
8
  * Author URI: https://99robots.com/
9
  * Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
53
 
54
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
55
  dbDelta( $sql );
56
+ add_option( 'hfcm_db_version', $hfcm_db_version );
57
+ }
58
+ register_activation_hook( __FILE__, 'hfcm_options_install' );
59
+
60
+ function myplugin_update_db_check() {
61
+ global $hfcm_db_version;
62
+ global $wpdb;
63
+ $table_name = $wpdb->prefix . 'hfcm_scripts';
64
+ if ( get_site_option( 'hfcm_db_version' ) != $hfcm_db_version ) {
65
+ $wpdb->show_errors();
66
  //Check for Exclude Pages
67
  $column_name = 'ex_pages';
68
+ $checkcolumn = $wpdb->get_results($wpdb->prepare(
69
  "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ",
70
  DB_NAME, $table_name, $column_name
71
+ )) ;
72
+ if ( empty( $checkcolumn ) ) {
73
  $altersql = "ALTER TABLE `$table_name` ADD `ex_pages` varchar(300) DEFAULT 0 AFTER `s_pages`";
74
  $wpdb->query($altersql);
75
  }
76
 
77
  //Check for Exclude Posts
78
  $column_name1 = 'ex_posts';
79
+ $checkcolumn2 = $wpdb->get_results($wpdb->prepare(
80
  "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ",
81
  DB_NAME, $table_name, $column_name1
82
+ ));
83
+ if ( empty( $checkcolumn2 ) ) {
84
  $altersql = "ALTER TABLE `$table_name` ADD `ex_posts` varchar(300) DEFAULT 0 AFTER `s_posts`";
85
  $wpdb->query($altersql);
86
  }
 
 
 
 
 
 
 
87
  hfcm_options_install();
88
  }
89
  update_option( 'hfcm_db_version', $hfcm_db_version );
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: 99robots, charliepatel
3
  Tags: header, footer, code manager, snippet, functions.php, tracking, google analytics, adsense, verification, pixel
4
  Requires at least: 4.0
5
- Tested up to: 4.9.7
6
- Stable tag: 1.0.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate link: https://99robots.com
@@ -103,6 +103,9 @@ A. If your script is not supported, just let us know and we'll look into it imme
103
 
104
  == Changelog ==
105
 
 
 
 
106
  = 1.0.7 = 2018-10-01
107
  * ADDED: Functionality to Exclude Posts and Pages from the Site Wide option.
108
 
2
  Contributors: 99robots, charliepatel
3
  Tags: header, footer, code manager, snippet, functions.php, tracking, google analytics, adsense, verification, pixel
4
  Requires at least: 4.0
5
+ Tested up to: 4.9.8
6
+ Stable tag: 1.0.8
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate link: https://99robots.com
103
 
104
  == Changelog ==
105
 
106
+ = 1.0.8 = 2018-10-04
107
+ * FIXED: Updated obsolete code causing errors.
108
+
109
  = 1.0.7 = 2018-10-01
110
  * ADDED: Functionality to Exclude Posts and Pages from the Site Wide option.
111