Pinterest "Pin It" Button - Version 2.0.1

Version Description

  • Added an option to disable Pinterest's pinit.js JavaScript to avoid conflicts with other Pinterest plugins, themes and custom code (on new "Advanced" tab).
  • Tested up to WordPress 3.7.
Download this release

Release Info

Developer pderksen
Plugin Icon 128x128 Pinterest "Pin It" Button
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0.0 to 2.0.1

class-pinterest-pin-it-button.php CHANGED
@@ -20,7 +20,7 @@ class Pinterest_Pin_It_Button {
20
  *
21
  * @var string
22
  */
23
- protected $version = '2.0.0';
24
 
25
  /**
26
  * Unique identifier for your plugin.
@@ -263,8 +263,13 @@ class Pinterest_Pin_It_Button {
263
  * @since 2.0.0
264
  */
265
  public function enqueue_scripts() {
266
- // Enqueue Pinterest JS plugin boilerplate style. Don't tack on plugin version.
267
- wp_enqueue_script( $this->plugin_slug . '-pinterest-pinit', '//assets.pinterest.com/js/pinit.js', array(), null, true );
 
 
 
 
 
268
  }
269
 
270
  /**
20
  *
21
  * @var string
22
  */
23
+ protected $version = '2.0.1';
24
 
25
  /**
26
  * Unique identifier for your plugin.
263
  * @since 2.0.0
264
  */
265
  public function enqueue_scripts() {
266
+ global $pib_options;
267
+
268
+ // If this option is empty then it means we can load the pinit.js, otherwise do not load it
269
+ if( empty( $pib_options['no_pinit_js'] ) ) {
270
+ // Enqueue Pinterest JS plugin boilerplate style. Don't tack on plugin version.
271
+ wp_enqueue_script( $this->plugin_slug . '-pinterest-pinit', '//assets.pinterest.com/js/pinit.js', array(), null, true );
272
+ }
273
  }
274
 
275
  /**
includes/admin-notices.php CHANGED
@@ -34,6 +34,10 @@ function pib_register_admin_notices() {
34
  add_settings_error( 'pib-notices', 'pib-misc-updated', __( 'Misc settings updated.', 'pib' ), 'updated' );
35
  }
36
 
 
 
 
 
37
  settings_errors( 'pib-notices' );
38
  }
39
 
34
  add_settings_error( 'pib-notices', 'pib-misc-updated', __( 'Misc settings updated.', 'pib' ), 'updated' );
35
  }
36
 
37
+ if ( ( isset( $_GET['tab'] ) && 'advanced' == $_GET['tab'] ) && ( isset( $_GET['settings-updated'] ) && 'true' == $_GET['settings-updated'] ) ) {
38
+ add_settings_error( 'pib-notices', 'pib-advanced-updated', __( 'Advanced settings updated.', 'pib' ), 'updated' );
39
+ }
40
+
41
  settings_errors( 'pib-notices' );
42
  }
43
 
includes/presstrends.php CHANGED
@@ -1,5 +1,17 @@
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  function pib_run_presstrends_tracking( $auth ) {
4
  // PressTrends Account API Key
5
  $api_key = 'qsu6mq75d69xqhpadhdz09rfqze9c6u499q6';
1
  <?php
2
 
3
+ /**
4
+ * Presstrends tracking function.
5
+ *
6
+ * @package PIB
7
+ * @subpackage Includes
8
+ * @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
9
+ */
10
+
11
+ // Exit if accessed directly.
12
+ if ( ! defined( 'ABSPATH' ) )
13
+ exit;
14
+
15
  function pib_run_presstrends_tracking( $auth ) {
16
  // PressTrends Account API Key
17
  $api_key = 'qsu6mq75d69xqhpadhdz09rfqze9c6u499q6';
includes/register-settings.php CHANGED
@@ -50,7 +50,7 @@ function pib_register_settings() {
50
  'name' => __( 'Allow Anonymous Usage Tracking', 'pib' ),
51
  'desc' => __( 'If checked, this option will enable PressTrends, which is a simple usage tracker that allows us to see how our customers are using our plugins.', 'pib' ) . '<br/>' .
52
  __( 'This anonymous data gives us insight on how we can improve our plugins for you. It will not track any user details, so your security and privacy are safe with us.', 'pib' ) . '<br/>' .
53
- '<em>' . __( 'If you feel comfortable enabling this option we\'d appreciate your participation. Thanks!', 'pib' ) . '</em>',
54
  'type' => 'checkbox'
55
  )
56
  ),
@@ -105,6 +105,18 @@ function pib_register_settings() {
105
  'desc' => __( 'Advanced. Will prevent the plugin\'s CSS file from being referenced. Custom CSS above will still be included.', 'pib' ),
106
  'type' => 'checkbox'
107
  )
 
 
 
 
 
 
 
 
 
 
 
 
108
  )
109
  );
110
 
@@ -120,6 +132,10 @@ function pib_register_settings() {
120
  if ( false == get_option( 'pib_settings_styles' ) ) {
121
  add_option( 'pib_settings_styles' );
122
  }
 
 
 
 
123
 
124
  /* Add the General Settings section */
125
  add_settings_section(
@@ -177,11 +193,31 @@ function pib_register_settings() {
177
  pib_get_settings_field_args( $option, 'styles' )
178
  );
179
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
 
181
  /* Register all settings or we will get an error when trying to save */
182
  register_setting( 'pib_settings_general', 'pib_settings_general', 'pib_settings_sanitize' );
183
  register_setting( 'pib_settings_post_visibility', 'pib_settings_post_visibility', 'pib_settings_sanitize' );
184
  register_setting( 'pib_settings_styles', 'pib_settings_styles', 'pib_settings_sanitize' );
 
185
 
186
  }
187
  add_action( 'admin_init', 'pib_register_settings' );
@@ -430,6 +466,7 @@ function pib_get_settings() {
430
  $general_settings = is_array( get_option( 'pib_settings_general' ) ) ? get_option( 'pib_settings_general' ) : array();
431
  $post_visibility_settings = is_array( get_option( 'pib_settings_post_visibility' ) ) ? get_option( 'pib_settings_post_visibility' ) : array();
432
  $style_settings = is_array( get_option( 'pib_settings_styles' ) ) ? get_option( 'pib_settings_styles' ) : array();
 
433
 
434
- return array_merge( $general_settings, $post_visibility_settings, $style_settings );
435
  }
50
  'name' => __( 'Allow Anonymous Usage Tracking', 'pib' ),
51
  'desc' => __( 'If checked, this option will enable PressTrends, which is a simple usage tracker that allows us to see how our customers are using our plugins.', 'pib' ) . '<br/>' .
52
  __( 'This anonymous data gives us insight on how we can improve our plugins for you. It will not track any user details, so your security and privacy are safe with us.', 'pib' ) . '<br/>' .
53
+ '<p class="description">' . __( 'If you feel comfortable enabling this option we\'d appreciate your participation. Thanks!', 'pib' ) . '</p>',
54
  'type' => 'checkbox'
55
  )
56
  ),
105
  'desc' => __( 'Advanced. Will prevent the plugin\'s CSS file from being referenced. Custom CSS above will still be included.', 'pib' ),
106
  'type' => 'checkbox'
107
  )
108
+ ),
109
+
110
+ /* Advanced Settings */
111
+ 'advanced' => array(
112
+ 'no_pinit_js' => array(
113
+ 'id' => 'no_pinit_js',
114
+ 'name' => __( 'Disable pinit.js', 'pib' ),
115
+ 'desc' => __( 'Disable output of <code>pinit.js</code>, the JavaScript file for all widgets from Pinterest.', 'pib' ) .
116
+ '<p class="description">' . __( 'Check this option if you have <code>pinit.js</code> referenced in another plugin, widget or your theme. ' .
117
+ 'Ouputting <code>pinit.js</code> more than once on a page can cause conflicts.', 'pib' ) . '</p>',
118
+ 'type' => 'checkbox'
119
+ ),
120
  )
121
  );
122
 
132
  if ( false == get_option( 'pib_settings_styles' ) ) {
133
  add_option( 'pib_settings_styles' );
134
  }
135
+
136
+ if( false == get_option( 'pib_settings_advanced' ) ){
137
+ add_option( 'pib_settings_advanced' );
138
+ }
139
 
140
  /* Add the General Settings section */
141
  add_settings_section(
193
  pib_get_settings_field_args( $option, 'styles' )
194
  );
195
  }
196
+
197
+ /* Add the Advanced Settings section */
198
+ add_settings_section(
199
+ 'pib_settings_advanced',
200
+ __( 'Advanced Settings', 'pib' ),
201
+ '__return_false',
202
+ 'pib_settings_advanced'
203
+ );
204
+
205
+ foreach ( $pib_settings['advanced'] as $option ) {
206
+ add_settings_field(
207
+ 'pib_settings_advanced[' . $option['id'] . ']',
208
+ $option['name'],
209
+ function_exists( 'pib_' . $option['type'] . '_callback' ) ? 'pib_' . $option['type'] . '_callback' : 'pib_missing_callback',
210
+ 'pib_settings_advanced',
211
+ 'pib_settings_advanced',
212
+ pib_get_settings_field_args( $option, 'advanced' )
213
+ );
214
+ }
215
 
216
  /* Register all settings or we will get an error when trying to save */
217
  register_setting( 'pib_settings_general', 'pib_settings_general', 'pib_settings_sanitize' );
218
  register_setting( 'pib_settings_post_visibility', 'pib_settings_post_visibility', 'pib_settings_sanitize' );
219
  register_setting( 'pib_settings_styles', 'pib_settings_styles', 'pib_settings_sanitize' );
220
+ register_setting( 'pib_settings_advanced', 'pib_settings_advanced', 'pib_settings_sanitize' );
221
 
222
  }
223
  add_action( 'admin_init', 'pib_register_settings' );
466
  $general_settings = is_array( get_option( 'pib_settings_general' ) ) ? get_option( 'pib_settings_general' ) : array();
467
  $post_visibility_settings = is_array( get_option( 'pib_settings_post_visibility' ) ) ? get_option( 'pib_settings_post_visibility' ) : array();
468
  $style_settings = is_array( get_option( 'pib_settings_styles' ) ) ? get_option( 'pib_settings_styles' ) : array();
469
+ $advanced_settings = is_array( get_option( 'pib_settings_advanced' ) ) ? get_option( 'pib_settings_advanced' ) : array();
470
 
471
+ return array_merge( $general_settings, $post_visibility_settings, $style_settings, $advanced_settings );
472
  }
pinterest-pin-it-button.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Pinterest "Pin It" Button Lite
13
  * Plugin URI: http://pinterestplugin.com
14
  * Description: Add a Pinterest "Pin It" Button to your site and get your visitors to start pinning your awesome content!
15
- * Version: 2.0.0
16
  * Author: Phil Derksen
17
  * Author URI: http://philderksen.com
18
  * License: GPL-2.0+
12
  * Plugin Name: Pinterest "Pin It" Button Lite
13
  * Plugin URI: http://pinterestplugin.com
14
  * Description: Add a Pinterest "Pin It" Button to your site and get your visitors to start pinning your awesome content!
15
+ * Version: 2.0.1
16
  * Author: Phil Derksen
17
  * Author URI: http://philderksen.com
18
  * License: GPL-2.0+
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: pderksen, nickyoung87
3
  Tags: pinterest, pinterest, pin it button, social, social media, image, images, photo, photos, pinterest pin it button, pin it, social button
4
  Requires at least: 3.5.2
5
- Tested up to: 3.6.1
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -13,48 +13,59 @@ Add a Pinterest "Pin It" Button to your site and get your visitors to start pinn
13
 
14
  Add a simple Pinterest "Pin It" Button to your posts in 2 minutes!
15
 
 
 
16
  ###"Pin It" Button Lite Features###
17
 
18
- * Let the reader select an image when pinning or...
19
- * Pre-select an image for them to pin.
20
- * Default to the first image in the post or...
21
  * Specify a specific image to pin per post.
22
- * Hide the button on specific posts and pages.
23
  * Add a "Pin It" button to your sidebar or footer as a widget.
24
- * Place "Pin It" buttons anywhere using a shortcode.
25
 
26
  ###Pro Version Features###
27
 
28
- * Add "Pin It" buttons on image hover (in any corner).
29
- * Add a "Pin It" button under each image.
30
- * Pick from 30 custom "Pin It" button designs.
31
- * Upload your own custom "Pin It" buttons.
32
- * Twitter, Facebook, Google+ & LinkedIn sharing buttons included.
33
- * Option to pin featured images.
34
- * Show or hide on custom post types.
35
- * WooCommerce compatibility
36
- * Customer support and automatic updates
37
 
38
  [Start Getting Pinned Like Crazy with "Pin It" Button Pro!](http://pinterestplugin.com/pin-it-button-pro/?utm_source=wordpress_org&utm_medium=link&utm_campaign=pin_it_button_lite)
39
 
40
- Best of all, you don't need to copy and paste any code to get a "Pin It" button on your WordPress site.
41
 
42
- We do the code insertions for you, and in full compliance with the [official "Pin It" button widget builder](http://business.pinterest.com/widget-builder/#do_pin_it_button).
 
 
 
 
 
43
 
44
- ###Raves###
45
 
 
46
  * "The Pinterest 'Pin It' Button is a painless solution for bloggers just getting started with this social network." -- [WP Jedi](http://www.wpjedi.com/pinterest-pin-it-button-for-wordpress/)
47
- * Top 10 Plugins for February 2012 (the only Pinterest one) -- [ManageWP](http://managewp.com/top-10-wordpress-plugins-of-the-month-february)
48
  * "If you want to make it easy for Pinterest users to pin your articles, consider using this 'Pin It' button plugin." -- [WP Tavern](http://www.wptavern.com/pin-it-is-the-new-bookmark)
 
49
  * "If you're looking for something simple and obtrusive, the Pinterest 'Pin It' Button will suit you." -- [WPMU.org](http://wpmu.org/pinterest-plugins-wordpress/)
50
 
51
  [See a "Pin It" Button Pro Demo](http://bruisesandbandaids.com/2011/newborn-photography-props/) (shows off the share bar and image hover features)
52
 
53
  [Setup an Eye-Catching Button in Minutes with "Pin It" Button Pro!](http://pinterestplugin.com/pin-it-button-pro/?utm_source=wordpress_org&utm_medium=link&utm_campaign=pin_it_button_lite)
54
 
55
- This plugin (and the Pro version) are in full compliance with current "Pin It" button developer guidelines at <http://developers.pinterest.com/pin_it/>.
 
 
56
 
57
- We will do our best to keep both plugins up to date with the official developer guidelines.
58
 
59
  == Installation ==
60
 
@@ -64,13 +75,13 @@ You can install this plugin one of three ways:
64
  1. In your Admin, go to menu Plugins > Add.
65
  1. Search for `pin it button`.
66
  1. Find the plugin that's labeled `Pinterest "Pin It" Button` with "Pin It" in quotes.
67
- 1. Look for the author names **Phil Derksen & Nick Young** on the plugin.
68
  1. Click to install.
69
  1. Activate the plugin.
70
  1. A new menu item `Pin It Button` will appear in your Admin.
71
 
72
  = 2. Download & Upload =
73
- 1. Download the plugin (.zip file) on the right column of this page.
74
  1. In your Admin, go to menu Plugins > Add.
75
  1. Select the tab "Upload".
76
  1. Upload the .zip file you just downloaded.
@@ -110,6 +121,11 @@ CSS styling and shortcode help available within the plugin admin.
110
 
111
  == Changelog ==
112
 
 
 
 
 
 
113
  = 2.0.0 =
114
 
115
  * Tested up to WordPress 3.6.1.
@@ -214,17 +230,3 @@ CSS styling and shortcode help available within the plugin admin.
214
 
215
  = 0.1.0 =
216
  * Initial release
217
-
218
- == Upgrade Notice ==
219
-
220
- = 2.0.0 =
221
-
222
- Version 2.0.0 includes a few changes that may affect the appearance of the "Pin It" button on your website.
223
-
224
- It is now only providing features that are supported in the [official "Pin It" button](http://business.pinterest.com/widget-builder/#do_pin_it_button) from Pinterest.
225
-
226
- Additional features can be found in ["Pin It" Button Pro!](http://pinterestplugin.com/pin-it-button-pro/?utm_source=wordpress_org&utm_medium=link&utm_campaign=pin_it_button_lite)
227
-
228
- "Pin It" Button Lite has also been rewritten to be in full compliance with the current "Pin It" button developer guidelines at <http://developers.pinterest.com/pin_it/>.
229
-
230
- Finally, all references to "!important" in the public CSS to allow for more control of styles. You may need to add or remove custom CSS to improve the layout and styling of the button.
2
  Contributors: pderksen, nickyoung87
3
  Tags: pinterest, pinterest, pin it button, social, social media, image, images, photo, photos, pinterest pin it button, pin it, social button
4
  Requires at least: 3.5.2
5
+ Tested up to: 3.7
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
14
  Add a simple Pinterest "Pin It" Button to your posts in 2 minutes!
15
 
16
+ No need to copy and paste code throughout your WordPress site.
17
+
18
  ###"Pin It" Button Lite Features###
19
 
20
+ * Let the reader select an image when pinning.
21
+ * Pre-select an image for the reader to pin.
22
+ * Default to the first image in the post.
23
  * Specify a specific image to pin per post.
24
+ * Hide the "Pin It" button on specific posts and pages.
25
  * Add a "Pin It" button to your sidebar or footer as a widget.
26
+ * Place "Pin It" buttons anywhere using shortcodes.
27
 
28
  ###Pro Version Features###
29
 
30
+ * Add "Pin It" buttons on image hover (in any corner).
31
+ * Add a "Pin It" button under each image.
32
+ * Pick from 30 custom "Pin It" button designs.
33
+ * Upload your own custom "Pin It" buttons.
34
+ * Twitter, Facebook, Google+ & LinkedIn sharing buttons included.
35
+ * Option to pin featured images.
36
+ * Show or hide on custom post types.
37
+ * WooCommerce compatibility
38
+ * Customer support and automatic updates
39
 
40
  [Start Getting Pinned Like Crazy with "Pin It" Button Pro!](http://pinterestplugin.com/pin-it-button-pro/?utm_source=wordpress_org&utm_medium=link&utm_campaign=pin_it_button_lite)
41
 
42
+ ###A Few Stats on Pinterest###
43
 
44
+ * Pinterest has [70 million users](http://thenextweb.com/socialmedia/2013/07/10/semiocast-pinterest-now-has-70-million-users-and-is-steadily-gaining-momentum-outside-the-us/)
45
+ * There are over [½ million verified business accounts on Pinterest](http://searchenginewatch.com/article/2282835/Pinterest-Tops-70-Million-Users-30-Pinned-Repinned-or-Liked-in-June-Study)
46
+ * Pinterest has over [2.5 billion average monthly pageviews](http://readwrite.com/2013/05/09/why-pinterest-could-be-worth-far-more-than-25-billion)
47
+ * Pinterest users spend an average of [98 minutes per month on Pinterest](http://rismedia.com/2013-05-23/pinterest-should-it-be-a-part-of-your-marketing-plan/)
48
+ * The average amount per order that derives from Pinterest traffic is between [$140 and $180](http://www.richrelevance.com/blog/2013/04/direct-marketing-news-infographic-the-rising-king-of-social-sales/)
49
+ * Pinterest Drives More Traffic to Publishers Than [Twitter, LinkedIn, Reddit Combined](http://mashable.com/2013/10/15/pinterest-referral-traffic/)
50
 
51
+ ###Raves on the Interwebs###
52
 
53
+ * "If you want complete (and easy) control over your Pin It button, you should definitely take a look..." -- [The Next Web](http://thenextweb.com/socialmedia/2012/03/04/20-awesome-tools-which-will-have-you-pinteresting-like-a-pro/)
54
  * "The Pinterest 'Pin It' Button is a painless solution for bloggers just getting started with this social network." -- [WP Jedi](http://www.wpjedi.com/pinterest-pin-it-button-for-wordpress/)
55
+ * "This is the plugin that I found works best on my marketing blog for photographers." -- [ProBlogger](http://www.problogger.net/archives/2013/03/05/heavyweight-help-the-complete-guide-to-getting-started-on-pinterest/)
56
  * "If you want to make it easy for Pinterest users to pin your articles, consider using this 'Pin It' button plugin." -- [WP Tavern](http://www.wptavern.com/pin-it-is-the-new-bookmark)
57
+ * "Discovery of the Week" -- [Social Media Examiner](http://www.socialmediaexaminer.com/pinterest-marketing-what-marketers-need-to-know-to-succeed/)
58
  * "If you're looking for something simple and obtrusive, the Pinterest 'Pin It' Button will suit you." -- [WPMU.org](http://wpmu.org/pinterest-plugins-wordpress/)
59
 
60
  [See a "Pin It" Button Pro Demo](http://bruisesandbandaids.com/2011/newborn-photography-props/) (shows off the share bar and image hover features)
61
 
62
  [Setup an Eye-Catching Button in Minutes with "Pin It" Button Pro!](http://pinterestplugin.com/pin-it-button-pro/?utm_source=wordpress_org&utm_medium=link&utm_campaign=pin_it_button_lite)
63
 
64
+ This plugin (as well as the Pro version) is in full compliance with the [official "Pin It" button developer guidelines](http://developers.pinterest.com/pin_it/).
65
+
66
+ This plugin utilizes the code output from the [official "Pin It" button widget builder](http://business.pinterest.com/widget-builder/#do_pin_it_button).
67
 
68
+ Want to take a peek at the source? [Check out this project on Github](https://github.com/pderksen/WP-Pinterest-Pin-It-Button).
69
 
70
  == Installation ==
71
 
75
  1. In your Admin, go to menu Plugins > Add.
76
  1. Search for `pin it button`.
77
  1. Find the plugin that's labeled `Pinterest "Pin It" Button` with "Pin It" in quotes.
78
+ 1. Look for the author name `Phil Derksen` on the plugin.
79
  1. Click to install.
80
  1. Activate the plugin.
81
  1. A new menu item `Pin It Button` will appear in your Admin.
82
 
83
  = 2. Download & Upload =
84
+ 1. Download the plugin (a zip file) on the right column of this page.
85
  1. In your Admin, go to menu Plugins > Add.
86
  1. Select the tab "Upload".
87
  1. Upload the .zip file you just downloaded.
121
 
122
  == Changelog ==
123
 
124
+ = 2.0.1 =
125
+
126
+ * Added an option to disable Pinterest's pinit.js JavaScript to avoid conflicts with other Pinterest plugins, themes and custom code (on new "Advanced" tab).
127
+ * Tested up to WordPress 3.7.
128
+
129
  = 2.0.0 =
130
 
131
  * Tested up to WordPress 3.6.1.
230
 
231
  = 0.1.0 =
232
  * Initial release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
views/admin.php CHANGED
@@ -36,6 +36,8 @@ $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general';
36
  <?php echo $active_tab == 'post_visibility' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Post Visibility', 'pib' ); ?></a>
37
  <a href="<?php echo add_query_arg( 'tab', 'styles', remove_query_arg( 'settings-updated' )); ?>" class="nav-tab
38
  <?php echo $active_tab == 'styles' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Styles', 'pib' ); ?></a>
 
 
39
  </h2>
40
 
41
  <div id="tab_container">
@@ -51,6 +53,9 @@ $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general';
51
  } elseif ( $active_tab == 'styles' ) {
52
  settings_fields( 'pib_settings_styles' );
53
  do_settings_sections( 'pib_settings_styles' );
 
 
 
54
  } else {
55
  // Do nothing
56
  }
36
  <?php echo $active_tab == 'post_visibility' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Post Visibility', 'pib' ); ?></a>
37
  <a href="<?php echo add_query_arg( 'tab', 'styles', remove_query_arg( 'settings-updated' )); ?>" class="nav-tab
38
  <?php echo $active_tab == 'styles' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Styles', 'pib' ); ?></a>
39
+ <a href="<?php echo add_query_arg( 'tab', 'advanced', remove_query_arg( 'settings-updated' )); ?>" class="nav-tab
40
+ <?php echo $active_tab == 'advanced' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Advanced', 'pib' ); ?></a>
41
  </h2>
42
 
43
  <div id="tab_container">
53
  } elseif ( $active_tab == 'styles' ) {
54
  settings_fields( 'pib_settings_styles' );
55
  do_settings_sections( 'pib_settings_styles' );
56
+ } elseif ( $active_tab == 'advanced' ) {
57
+ settings_fields( 'pib_settings_advanced' );
58
+ do_settings_sections( 'pib_settings_advanced' );
59
  } else {
60
  // Do nothing
61
  }