Header Footer Code Manager - Version 1.1.1

Version Description

2018-12-31 * FIXED: Warning - Unexpected Output - headers already sent

Download this release

Release Info

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

Code changes from version 1.1.0 to 1.1.1

99robots-header-footer-code-manager.php CHANGED
@@ -3,87 +3,22 @@
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.1.0
7
  * Author: 99robots
8
  * Author URI: https://99robots.com/
9
  * Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
10
  * Text Domain: 99robots-header-footer-code-manager
11
  * Domain Path: /languages
12
  */
13
- ?>
14
- <style media="screen">
15
- .hfcm-review-stars{
16
- text-decoration: none;
17
- }
18
- .hfcm-review-stars span{
19
- font-size: 16px;
20
- width: 16px;
21
- height: 16px;
22
- margin-top: 2px;
23
- }
24
- .hfcm-dismiss-alert{
25
- position: static !important;
26
- float: right;
27
- top: 0 !important;
28
- right: 0 !important;
29
- padding: 0 15px 10px 28px !important;
30
- margin-top: -10px !important;
31
- font-size: 13px;
32
- line-height: 1.23076923;
33
- text-decoration: none;
34
- }
35
- .hfcm-dismiss-alert:before{
36
- position: relative;
37
- top: 18px;
38
- left: -20px;
39
- }
40
- #hfcm-message{
41
- position: relative;
42
- }
43
- </style>
44
- <?php
45
  // If this file is called directly, abort.
46
  if ( ! defined( 'WPINC' ) ) {
47
  die;
48
  }
49
 
50
- // Create the Admin Notice
51
- function hfcm_review_push_notice() {
52
- $user_id = get_current_user_id();
53
- // Check if current user has already dismissed it
54
- if ( !get_user_meta( $user_id, 'hfcm_plugin_notice_dismissed' ) ) {
55
- ?>
56
- <div id="hfcm-message" class="notice notice-success">
57
- <a class="hfcm-dismiss-alert notice-dismiss" href="?hfcm-admin-notice-dismissed">Dismiss</a>
58
- <p><?php _e( 'Hey there! You’ve been using the <strong>Header Footer Code Manager</strong> plugin for a while now. If you like the plugin, please support our awesome development and support team by leaving a <a class="hfcm-review-stars" href="https://wordpress.org/support/plugin/header-footer-code-manager/reviews/"><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a> rating. <a href="https://wordpress.org/support/plugin/header-footer-code-manager/reviews/">Rate it!</a> It’ll mean the world to us and keep this plugin free and constantly updated. <a href="https://wordpress.org/support/plugin/header-footer-code-manager/reviews/">Leave A Review</a>', '99robots-header-footer-code-manager' ); ?></p>
59
- </div>
60
- <?php
61
- }
62
- }
63
- add_action( 'admin_notices', 'hfcm_review_push_notice' );
64
-
65
- // Check if current user has already dismissed it
66
- function hfcm_plugin_notice_dismissed() {
67
- $user_id = get_current_user_id();
68
- // Checking if user clicked on the Dismiss button
69
- if ( isset( $_GET['hfcm-admin-notice-dismissed'] ) ){
70
- add_user_meta( $user_id, 'hfcm_plugin_notice_dismissed', 'true', true );
71
- }
72
- }
73
- add_action( 'admin_init', 'hfcm_plugin_notice_dismissed' );
74
-
75
- /*****/
76
  global $hfcm_db_version;
77
  $hfcm_db_version = '1.1';
78
 
79
- // Adding A settings link for the plugin on the Settings Page
80
- add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'hfcm_add_plugin_page_settings_link');
81
- function hfcm_add_plugin_page_settings_link( $links ) {
82
- $links = array_merge(array('<a href="' .
83
- admin_url( 'admin.php?page=hfcm-list' ) .
84
- '">' . __('Settings') . '</a>'), $links);
85
- return $links;
86
- }
87
 
88
  // function to create the DB / Options / Defaults
89
  function hfcm_options_install() {
@@ -167,6 +102,9 @@ function hfcm_enqueue_assets( $hook ) {
167
  'admin_page_hfcm-update',
168
  );
169
 
 
 
 
170
  if ( in_array( $hook, $allowed_pages ) ) {
171
  // Plugin's CSS
172
  wp_register_style( 'hfcm_assets', plugins_url( 'css/style-admin.css', __FILE__ ) );
@@ -250,6 +188,42 @@ function hfcm_modifymenu() {
250
  }
251
  add_action( 'admin_menu', 'hfcm_modifymenu' );
252
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  // Files containing submenu functions
254
  require_once( plugin_dir_path( __FILE__ ) . 'includes/hfcm-list.php' );
255
  require_once( plugin_dir_path( __FILE__ ) . 'includes/hfcm-create.php' );
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.1.1
7
  * Author: 99robots
8
  * Author URI: https://99robots.com/
9
  * Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
10
  * Text Domain: 99robots-header-footer-code-manager
11
  * Domain Path: /languages
12
  */
13
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  // If this file is called directly, abort.
15
  if ( ! defined( 'WPINC' ) ) {
16
  die;
17
  }
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  global $hfcm_db_version;
20
  $hfcm_db_version = '1.1';
21
 
 
 
 
 
 
 
 
 
22
 
23
  // function to create the DB / Options / Defaults
24
  function hfcm_options_install() {
102
  'admin_page_hfcm-update',
103
  );
104
 
105
+ wp_register_style( 'hfcm_general_admin_assets', plugins_url( 'css/style-general-admin.css', __FILE__ ) );
106
+ wp_enqueue_style( 'hfcm_general_admin_assets' );
107
+
108
  if ( in_array( $hook, $allowed_pages ) ) {
109
  // Plugin's CSS
110
  wp_register_style( 'hfcm_assets', plugins_url( 'css/style-admin.css', __FILE__ ) );
188
  }
189
  add_action( 'admin_menu', 'hfcm_modifymenu' );
190
 
191
+ // Adding A settings link for the plugin on the Settings Page
192
+ add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'hfcm_add_plugin_page_settings_link');
193
+ function hfcm_add_plugin_page_settings_link( $links ) {
194
+ $links = array_merge(array('<a href="' .
195
+ admin_url( 'admin.php?page=hfcm-list' ) .
196
+ '">' . __('Settings') . '</a>'), $links);
197
+ return $links;
198
+ }
199
+
200
+ // Create the Admin Notice
201
+ function hfcm_review_push_notice() {
202
+ $user_id = get_current_user_id();
203
+ // Check if current user has already dismissed it
204
+ if ( !get_user_meta( $user_id, 'hfcm_plugin_notice_dismissed' ) ) {
205
+ ?>
206
+ <div id="hfcm-message" class="notice notice-success">
207
+ <a class="hfcm-dismiss-alert notice-dismiss" href="?hfcm-admin-notice-dismissed">Dismiss</a>
208
+ <p><?php _e( 'Hey there! You’ve been using the <strong>Header Footer Code Manager</strong> plugin for a while now. If you like the plugin, please support our awesome development and support team by leaving a <a class="hfcm-review-stars" href="https://wordpress.org/support/plugin/header-footer-code-manager/reviews/"><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a> rating. <a href="https://wordpress.org/support/plugin/header-footer-code-manager/reviews/">Rate it!</a> It’ll mean the world to us and keep this plugin free and constantly updated. <a href="https://wordpress.org/support/plugin/header-footer-code-manager/reviews/">Leave A Review</a>', '99robots-header-footer-code-manager' ); ?></p>
209
+ </div>
210
+ <?php
211
+ }
212
+ }
213
+ add_action( 'admin_notices', 'hfcm_review_push_notice' );
214
+
215
+ // Check if current user has already dismissed it
216
+ function hfcm_plugin_notice_dismissed() {
217
+ $user_id = get_current_user_id();
218
+ // Checking if user clicked on the Dismiss button
219
+ if ( isset( $_GET['hfcm-admin-notice-dismissed'] ) ){
220
+ add_user_meta( $user_id, 'hfcm_plugin_notice_dismissed', 'true', true );
221
+ }
222
+ }
223
+ add_action( 'admin_init', 'hfcm_plugin_notice_dismissed' );
224
+
225
+ /*****/
226
+
227
  // Files containing submenu functions
228
  require_once( plugin_dir_path( __FILE__ ) . 'includes/hfcm-list.php' );
229
  require_once( plugin_dir_path( __FILE__ ) . 'includes/hfcm-create.php' );
css/style-general-admin.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .hfcm-review-stars{
2
+ text-decoration: none;
3
+ }
4
+ .hfcm-review-stars span{
5
+ font-size: 16px;
6
+ width: 16px;
7
+ height: 16px;
8
+ margin-top: 2px;
9
+ }
10
+ .hfcm-dismiss-alert{
11
+ position: static !important;
12
+ float: right;
13
+ top: 0 !important;
14
+ right: 0 !important;
15
+ padding: 0 15px 10px 28px !important;
16
+ margin-top: -10px !important;
17
+ font-size: 13px;
18
+ line-height: 1.23076923;
19
+ text-decoration: none;
20
+ }
21
+ .hfcm-dismiss-alert:before{
22
+ position: relative;
23
+ top: 18px;
24
+ left: -20px;
25
+ }
26
+ #hfcm-message{
27
+ position: relative;
28
+ }
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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: 5.0.2
6
- Stable tag: 1.1.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate link: https://99robots.com
@@ -107,6 +107,9 @@ A. If your script is not supported, just let us know and we'll look into it imme
107
 
108
  == Changelog ==
109
 
 
 
 
110
  = 1.1.0 = 2018-12-31
111
  * UPDATED: Code Optimization
112
  * UPDATED: Added plugin settings link, and update documentation.
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: 5.0.2
6
+ Stable tag: 1.1.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate link: https://99robots.com
107
 
108
  == Changelog ==
109
 
110
+ = 1.1.1 = 2018-12-31
111
+ * FIXED: Warning - Unexpected Output - headers already sent
112
+
113
  = 1.1.0 = 2018-12-31
114
  * UPDATED: Code Optimization
115
  * UPDATED: Added plugin settings link, and update documentation.