Version Description
- Fixing database upgrade routine and refacting way we record funnel information.
Download this release
Release Info
Developer | adbox |
Plugin | WordPress Landing Pages |
Version | 2.4.3 |
Comparing to | |
See all releases |
Code changes from version 2.4.2 to 2.4.3
- assets/tests/phpunit/test.activations.php +5 -6
- landing-pages.php +2 -2
- readme.txt +5 -2
- shared/classes/class.database-routines.php +13 -3
- shared/classes/class.debug.php +0 -2
- shared/classes/class.events.php +17 -11
- shared/classes/class.list-double-optin.php +5 -1
- shared/classes/class.load-shared.php +1 -1
- shared/classes/class.menus.adminbar.php +721 -725
- shared/classes/class.post-type.wp-lead.php +1 -1
- shared/shortcodes/shortcodes-fields.php +1 -1
assets/tests/phpunit/test.activations.php
CHANGED
@@ -16,35 +16,34 @@ class Tests_Activation extends PHPUnit_Framework_TestCase {
|
|
16 |
|
17 |
/**
|
18 |
* Ensure landing pages is active
|
19 |
-
|
20 |
function test_lading_pages_activated() {
|
21 |
$this->assertTrue( is_plugin_active( 'landing-pages/landing-pages.php' ) );
|
22 |
}
|
23 |
|
24 |
/**
|
25 |
* Ensure that the Leads has been installed and activated.
|
26 |
-
|
27 |
function test_leads_activated() {
|
28 |
$this->assertTrue( is_plugin_active( 'leads/leads.php' ) );
|
29 |
}
|
30 |
|
31 |
/**
|
32 |
* Ensure that the Calls to Action has been installed and activated.
|
33 |
-
|
34 |
function test_cta_activated() {
|
35 |
$this->assertTrue( is_plugin_active( 'cta/calls-to-action.php' ) );
|
36 |
}
|
37 |
|
38 |
/**
|
39 |
* Run upgrade routines and check option to see if complete
|
40 |
-
|
41 |
function test_run_upgrade_routines() {
|
42 |
include_once LANDINGPAGES_PATH . 'classes/class.activation.php';
|
43 |
include_once LANDINGPAGES_PATH . 'classes/class.activation.upgrade-routines.php';
|
44 |
Landing_Pages_Activation::run_updates();
|
45 |
$this->assertTrue( true );
|
46 |
-
}
|
47 |
|
48 |
}
|
49 |
|
50 |
-
?>
|
16 |
|
17 |
/**
|
18 |
* Ensure landing pages is active
|
19 |
+
*
|
20 |
function test_lading_pages_activated() {
|
21 |
$this->assertTrue( is_plugin_active( 'landing-pages/landing-pages.php' ) );
|
22 |
}
|
23 |
|
24 |
/**
|
25 |
* Ensure that the Leads has been installed and activated.
|
26 |
+
*
|
27 |
function test_leads_activated() {
|
28 |
$this->assertTrue( is_plugin_active( 'leads/leads.php' ) );
|
29 |
}
|
30 |
|
31 |
/**
|
32 |
* Ensure that the Calls to Action has been installed and activated.
|
33 |
+
*
|
34 |
function test_cta_activated() {
|
35 |
$this->assertTrue( is_plugin_active( 'cta/calls-to-action.php' ) );
|
36 |
}
|
37 |
|
38 |
/**
|
39 |
* Run upgrade routines and check option to see if complete
|
40 |
+
*
|
41 |
function test_run_upgrade_routines() {
|
42 |
include_once LANDINGPAGES_PATH . 'classes/class.activation.php';
|
43 |
include_once LANDINGPAGES_PATH . 'classes/class.activation.upgrade-routines.php';
|
44 |
Landing_Pages_Activation::run_updates();
|
45 |
$this->assertTrue( true );
|
46 |
+
}*/
|
47 |
|
48 |
}
|
49 |
|
|
landing-pages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Landing Pages
|
4 |
Plugin URI: http://www.inboundnow.com/landing-pages/
|
5 |
Description: Landing page template framework with variant testing and lead capturing through cooperation with Inbound Now's Leads plugin. This is the stand alone version served through WordPress.org.
|
6 |
-
Version: 2.4.
|
7 |
Author: Inbound Now
|
8 |
Author URI: http://www.inboundnow.com/
|
9 |
|
@@ -37,7 +37,7 @@ if (!class_exists('Inbound_Landing_Pages_Plugin')) {
|
|
37 |
*/
|
38 |
private static function load_constants() {
|
39 |
|
40 |
-
define('LANDINGPAGES_CURRENT_VERSION', '2.4.
|
41 |
define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
|
42 |
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
43 |
define('LANDINGPAGES_PLUGIN_SLUG', 'landing-pages' );
|
3 |
Plugin Name: Landing Pages
|
4 |
Plugin URI: http://www.inboundnow.com/landing-pages/
|
5 |
Description: Landing page template framework with variant testing and lead capturing through cooperation with Inbound Now's Leads plugin. This is the stand alone version served through WordPress.org.
|
6 |
+
Version: 2.4.3
|
7 |
Author: Inbound Now
|
8 |
Author URI: http://www.inboundnow.com/
|
9 |
|
37 |
*/
|
38 |
private static function load_constants() {
|
39 |
|
40 |
+
define('LANDINGPAGES_CURRENT_VERSION', '2.4.3' );
|
41 |
define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
|
42 |
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
43 |
define('LANDINGPAGES_PLUGIN_SLUG', 'landing-pages' );
|
readme.txt
CHANGED
@@ -6,8 +6,8 @@ License: GPLv2 or later
|
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
|
8 |
Requires at least: 3.8
|
9 |
-
Tested up to: 4.7.
|
10 |
-
Stable Tag: 2.4.
|
11 |
|
12 |
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
|
13 |
|
@@ -70,6 +70,9 @@ The plugin is also fully extendable and has a number of actions, filters, and ho
|
|
70 |
|
71 |
== Changelog ==
|
72 |
|
|
|
|
|
|
|
73 |
= 2.4.2 =
|
74 |
* Updating shared directory, minor code structure improvements.
|
75 |
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
|
8 |
Requires at least: 3.8
|
9 |
+
Tested up to: 4.7.2
|
10 |
+
Stable Tag: 2.4.3
|
11 |
|
12 |
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
|
13 |
|
70 |
|
71 |
== Changelog ==
|
72 |
|
73 |
+
= 2.4.3 =
|
74 |
+
* Fixing database upgrade routine and refacting way we record funnel information.
|
75 |
+
|
76 |
= 2.4.2 =
|
77 |
* Updating shared directory, minor code structure improvements.
|
78 |
|
shared/classes/class.database-routines.php
CHANGED
@@ -27,7 +27,7 @@ if ( !class_exists('Inbound_Upgrade_Routines') ) {
|
|
27 |
self::$routines['page-views-table-1'] = array(
|
28 |
'id' => 'page-views-table-1',
|
29 |
'scope' => 'shared',
|
30 |
-
'introduced' => '1.0.
|
31 |
'callback' => array( __CLASS__ , 'alter_page_views_table_1')
|
32 |
);
|
33 |
|
@@ -35,7 +35,7 @@ if ( !class_exists('Inbound_Upgrade_Routines') ) {
|
|
35 |
self::$routines['events-table-1'] = array(
|
36 |
'id' => 'events-table-1',
|
37 |
'scope' => 'shared',
|
38 |
-
'introduced' => '1.0.
|
39 |
'callback' => array( __CLASS__ , 'alter_events_table_1')
|
40 |
);
|
41 |
}
|
@@ -52,7 +52,13 @@ if ( !class_exists('Inbound_Upgrade_Routines') ) {
|
|
52 |
self::set_versions($routine);
|
53 |
|
54 |
/* compare versions and see last installed version is beneath the introduced version */
|
55 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
continue;
|
57 |
}
|
58 |
|
@@ -140,4 +146,8 @@ if ( !class_exists('Inbound_Upgrade_Routines') ) {
|
|
140 |
/* hook upgrade routines into activation script */
|
141 |
add_action('inbound_shared_activate' , array( 'Inbound_Upgrade_Routines' , 'load') );
|
142 |
|
|
|
|
|
|
|
|
|
143 |
}
|
27 |
self::$routines['page-views-table-1'] = array(
|
28 |
'id' => 'page-views-table-1',
|
29 |
'scope' => 'shared',
|
30 |
+
'introduced' => '1.0.2',
|
31 |
'callback' => array( __CLASS__ , 'alter_page_views_table_1')
|
32 |
);
|
33 |
|
35 |
self::$routines['events-table-1'] = array(
|
36 |
'id' => 'events-table-1',
|
37 |
'scope' => 'shared',
|
38 |
+
'introduced' => '1.0.2',
|
39 |
'callback' => array( __CLASS__ , 'alter_events_table_1')
|
40 |
);
|
41 |
}
|
52 |
self::set_versions($routine);
|
53 |
|
54 |
/* compare versions and see last installed version is beneath the introduced version */
|
55 |
+
if (
|
56 |
+
self::$past_version
|
57 |
+
&&
|
58 |
+
!version_compare( self::$past_version , $routine['introduced'] , '<')
|
59 |
+
&&
|
60 |
+
!isset($_GET['force_upgrade_routines'])
|
61 |
+
) {
|
62 |
continue;
|
63 |
}
|
64 |
|
146 |
/* hook upgrade routines into activation script */
|
147 |
add_action('inbound_shared_activate' , array( 'Inbound_Upgrade_Routines' , 'load') );
|
148 |
|
149 |
+
|
150 |
+
if (isset($_REQUEST['force_upgrade_routines']) && $_REQUEST['force_upgrade_routines'] ) {
|
151 |
+
Inbound_Upgrade_Routines::load();
|
152 |
+
}
|
153 |
}
|
shared/classes/class.debug.php
CHANGED
@@ -417,5 +417,3 @@ display: inline-block;}
|
|
417 |
* --------------------------------------------------------- */
|
418 |
|
419 |
Inbound_Debug_Scripts::init();
|
420 |
-
|
421 |
-
?>
|
417 |
* --------------------------------------------------------- */
|
418 |
|
419 |
Inbound_Debug_Scripts::init();
|
|
|
|
shared/classes/class.events.php
CHANGED
@@ -305,24 +305,25 @@ class Inbound_Events {
|
|
305 |
$funnel = json_decode( $args['funnel'] , true);
|
306 |
|
307 |
$stored_views = array();
|
|
|
308 |
foreach ($funnel as $page_id => $visits ) {
|
309 |
|
310 |
if (!is_numeric($page_id)) {
|
311 |
continue;
|
312 |
}
|
313 |
|
314 |
-
if (
|
315 |
-
$
|
316 |
-
|
317 |
-
/* check if user doubled back to the first page to convert */
|
318 |
-
$funnel_count = count($stored_views);
|
319 |
-
$last_key = $funnel_count - 1;
|
320 |
-
if ( $funnel_count > 1 && $stored_views[0] == $page_id && $stored_views[$last_key] != $page_id ){
|
321 |
-
$stored_views[] = strval($page_id);
|
322 |
}
|
|
|
|
|
323 |
}
|
324 |
}
|
325 |
|
|
|
|
|
|
|
326 |
/* add original funnel with timestamps to event details */
|
327 |
if (is_array($args['event_details'])) {
|
328 |
$args['event_details']['funnel'] = $funnel;
|
@@ -546,11 +547,16 @@ class Inbound_Events {
|
|
546 |
$title = "";
|
547 |
$capture_id = "";
|
548 |
break;
|
|
|
|
|
|
|
|
|
|
|
549 |
}
|
550 |
|
551 |
-
$array['link'] = ($link) ? $link : '#';
|
552 |
-
$array['title'] = ($title) ? $title : __('n/a','inbound-pro');
|
553 |
-
$array['capture_id'] = ($capture_id) ? $capture_id : 0;
|
554 |
|
555 |
return apply_filters('inbound-events/capture-data' , $array , $event);
|
556 |
}
|
305 |
$funnel = json_decode( $args['funnel'] , true);
|
306 |
|
307 |
$stored_views = array();
|
308 |
+
|
309 |
foreach ($funnel as $page_id => $visits ) {
|
310 |
|
311 |
if (!is_numeric($page_id)) {
|
312 |
continue;
|
313 |
}
|
314 |
|
315 |
+
if (is_array($visits)) {
|
316 |
+
foreach ($visits as $visit) {
|
317 |
+
$stored_views[stripslashes($visit)] = strval($page_id);
|
|
|
|
|
|
|
|
|
|
|
318 |
}
|
319 |
+
} else {
|
320 |
+
$stored_views[stripslashes($visits)] = strval($page_id);
|
321 |
}
|
322 |
}
|
323 |
|
324 |
+
/* order by date */
|
325 |
+
ksort($stored_views);
|
326 |
+
|
327 |
/* add original funnel with timestamps to event details */
|
328 |
if (is_array($args['event_details'])) {
|
329 |
$args['event_details']['funnel'] = $funnel;
|
547 |
$title = "";
|
548 |
$capture_id = "";
|
549 |
break;
|
550 |
+
default:
|
551 |
+
$link = "";
|
552 |
+
$title = "";
|
553 |
+
$capture_id = "";
|
554 |
+
break;
|
555 |
}
|
556 |
|
557 |
+
$array['link'] = (isset($link)) ? $link : '#';
|
558 |
+
$array['title'] = (isset($title)) ? $title : __('n/a','inbound-pro');
|
559 |
+
$array['capture_id'] = (isset($capture_id)) ? $capture_id : 0;
|
560 |
|
561 |
return apply_filters('inbound-events/capture-data' , $array , $event);
|
562 |
}
|
shared/classes/class.list-double-optin.php
CHANGED
@@ -260,7 +260,7 @@ if (!class_exists('Inbound_List_Double_Optin')) {
|
|
260 |
<td>
|
261 |
<select name="double_optin_email_template" id="double_optin_email_template" class="double-optin-setting" >
|
262 |
<option value='default-email-template' <?php selected($settings['double_optin_email_template'], 'default-email-template'); ?>>
|
263 |
-
<?php _e('Use the default email
|
264 |
</option>
|
265 |
<?php
|
266 |
foreach ($emails as $id => $label) {
|
@@ -449,6 +449,7 @@ if (!class_exists('Inbound_List_Double_Optin')) {
|
|
449 |
return;
|
450 |
}
|
451 |
|
|
|
452 |
foreach ($email_contents as $list_id => $email_content) {
|
453 |
|
454 |
$content = self::get_default_email_content($email_content);
|
@@ -472,6 +473,9 @@ if (!class_exists('Inbound_List_Double_Optin')) {
|
|
472 |
$headers = apply_filters('list_double_optin_lead_conversion/headers', $headers);
|
473 |
|
474 |
wp_mail($lead['email'], $confirm_subject, $content, $headers);
|
|
|
|
|
|
|
475 |
}
|
476 |
|
477 |
}
|
260 |
<td>
|
261 |
<select name="double_optin_email_template" id="double_optin_email_template" class="double-optin-setting" >
|
262 |
<option value='default-email-template' <?php selected($settings['double_optin_email_template'], 'default-email-template'); ?>>
|
263 |
+
<?php _e('Use the default email template', 'inbound-pro'); ?>
|
264 |
</option>
|
265 |
<?php
|
266 |
foreach ($emails as $id => $label) {
|
449 |
return;
|
450 |
}
|
451 |
|
452 |
+
|
453 |
foreach ($email_contents as $list_id => $email_content) {
|
454 |
|
455 |
$content = self::get_default_email_content($email_content);
|
473 |
$headers = apply_filters('list_double_optin_lead_conversion/headers', $headers);
|
474 |
|
475 |
wp_mail($lead['email'], $confirm_subject, $content, $headers);
|
476 |
+
|
477 |
+
/* only send once */
|
478 |
+
return;
|
479 |
}
|
480 |
|
481 |
}
|
shared/classes/class.load-shared.php
CHANGED
@@ -37,7 +37,7 @@ if (!class_exists('Inbound_Load_Shared')) {
|
|
37 |
*/
|
38 |
public static function load_constants() {
|
39 |
define('INBOUNDNOW_SHARED', 'loaded' );
|
40 |
-
define('INBOUNDNOW_SHARED_DBRV', '1.0.
|
41 |
define('INBOUNDNOW_SHARED_PATH', self::get_shared_path() );
|
42 |
define('INBOUNDNOW_SHARED_URLPATH', self::get_shared_urlpath() );
|
43 |
define('INBOUNDNOW_SHARED_FILE', self::get_shared_file() );
|
37 |
*/
|
38 |
public static function load_constants() {
|
39 |
define('INBOUNDNOW_SHARED', 'loaded' );
|
40 |
+
define('INBOUNDNOW_SHARED_DBRV', '1.0.2' );
|
41 |
define('INBOUNDNOW_SHARED_PATH', self::get_shared_path() );
|
42 |
define('INBOUNDNOW_SHARED_URLPATH', self::get_shared_urlpath() );
|
43 |
define('INBOUNDNOW_SHARED_FILE', self::get_shared_file() );
|
shared/classes/class.menus.adminbar.php
CHANGED
@@ -2,734 +2,730 @@
|
|
2 |
/* Inbound Now Menu Class */
|
3 |
|
4 |
if (!class_exists('Inbound_Menus_Adminbar')) {
|
5 |
-
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
<input id="search-inbound-menu" type="text" placeholder="' . $leads_search_text . '" onblur="this.value=(this.value==\'\') ? \'' . $leads_search_text . '\' : this.value;" onfocus="this.value=(this.value==\'' . $leads_search_text . '\') ? \'\' : this.value;" value="' . $leads_search_text . '" name="s" value="' . esc_attr(
|
172 |
<input type="hidden" name="post_type" value="wp-lead" />
|
173 |
<input type="hidden" name="post_status" value="all" />
|
174 |
-
' . self::$go_button
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
'meta' => array( 'title' => __( 'Documentation', 'inbound-pro' ) )
|
606 |
-
);
|
607 |
-
|
608 |
-
/* 1 - Doc Search */
|
609 |
-
$search_docs_text = __( 'Search Docs', 'inbound-pro' );
|
610 |
-
|
611 |
-
$secondary_menu_items['inbound-docs-searchform'] = array(
|
612 |
-
'parent' => self::$inboundnow_menu_secondary_group_key,
|
613 |
-
'title' => '<form method="get" id="inbound-menu-form" action="//www.inboundnow.com/support/search/?action=bbp-search-request" class=" " target="_blank">
|
614 |
-
<input id="search-inbound-menu" type="text" placeholder="' . $search_docs_text . '" onblur="this.value=(this.value==\'\') ? \'' . $search_docs_text . '\' : this.value;" onfocus="this.value=(this.value==\'' . $search_docs_text . '\') ? \'\' : this.value;" value="' . $search_docs_text . '" name="bbp_search" value="' . esc_attr( 'Search Docs', 'inbound-pro' ) . '" class="text inbound-search-input" />
|
615 |
<input type="hidden" name="post_type[]" value="docs" />
|
616 |
<input type="hidden" name="post_type[]" value="page" />' . self::$go_button,
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
735 |
}
|
2 |
/* Inbound Now Menu Class */
|
3 |
|
4 |
if (!class_exists('Inbound_Menus_Adminbar')) {
|
5 |
+
class Inbound_Menus_Adminbar {
|
6 |
|
7 |
+
static $add_menu;
|
8 |
+
static $go_button;
|
9 |
+
static $inboundnow_menu_key;
|
10 |
+
static $inboundnow_menu_secondary_group_key;
|
11 |
+
static $load_forms;
|
12 |
+
static $load_landingpages;
|
13 |
+
static $load_callstoaction;
|
14 |
+
static $load_leads;
|
15 |
+
|
16 |
+
public static function init() {
|
17 |
+
// Exit if admin bar not there
|
18 |
+
if (!is_user_logged_in() || !is_admin_bar_showing() || !current_user_can('activate_plugins')) {
|
19 |
+
return;
|
20 |
+
}
|
21 |
+
|
22 |
+
self::$add_menu = true;
|
23 |
+
self::$go_button = '<input type="submit" value="' . __('GO', 'inbound-pro') . '" class="inbound-search-go" /></form>';
|
24 |
+
self::$inboundnow_menu_key = 'inbound-admin-bar';
|
25 |
+
self::$inboundnow_menu_secondary_group_key = 'inbound-secondary';
|
26 |
+
self::hooks();
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Loads Hooks & Filters
|
33 |
+
*/
|
34 |
+
public static function hooks() {
|
35 |
+
|
36 |
+
/* load main hook */
|
37 |
+
add_action('admin_bar_menu', array(__CLASS__, 'load_inboundnow_menu'), 98);
|
38 |
+
|
39 |
+
/* add filters here */
|
40 |
+
add_filter('inboundnow_menu_primary', array(__CLASS__, 'load_callstoaction'), 10);
|
41 |
+
add_filter('inboundnow_menu_primary', array(__CLASS__, 'load_landingpages'), 10);
|
42 |
+
add_filter('inboundnow_menu_primary', array(__CLASS__, 'load_leads'), 10);
|
43 |
+
add_filter('inboundnow_menu_primary', array(__CLASS__, 'load_mailer'), 10);
|
44 |
+
add_filter('inboundnow_menu_primary', array(__CLASS__, 'load_automation'), 10);
|
45 |
+
add_filter('inboundnow_menu_primary', array(__CLASS__, 'load_forms'), 10);
|
46 |
+
add_filter('inboundnow_menu_primary', array(__CLASS__, 'load_manage_templates'), 10);
|
47 |
+
add_filter('inboundnow_menu_primary', array(__CLASS__, 'load_settings'), 10);
|
48 |
+
add_filter('inboundnow_menu_primary', array(__CLASS__, 'load_analytics'), 10);
|
49 |
+
add_filter('inboundnow_menu_primary', array(__CLASS__, 'load_seo'), 10);
|
50 |
+
|
51 |
+
|
52 |
+
add_filter('inboundnow_menu_secondary', array(__CLASS__, 'load_support'), 10);
|
53 |
+
add_filter('inboundnow_menu_secondary', array(__CLASS__, 'load_inbound_hq'), 10);
|
54 |
+
add_filter('inboundnow_menu_secondary', array(__CLASS__, 'load_debug'), 10);
|
55 |
+
|
56 |
+
/* Enqueue JS/CSS */
|
57 |
+
add_action('admin_enqueue_scripts', array(__CLASS__, 'enqueue_js_css'));
|
58 |
+
|
59 |
+
}
|
60 |
+
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Loads the inbound now menu into the admin_bar_menu hook
|
64 |
+
*/
|
65 |
+
public static function load_inboundnow_menu() {
|
66 |
+
global $wp_admin_bar;
|
67 |
+
|
68 |
+
$primary_menu_items = apply_filters('inboundnow_menu_primary', array());
|
69 |
+
$secondary_menu_items = apply_filters('inboundnow_menu_secondary', array());
|
70 |
+
|
71 |
+
/* Add Parent Nav Menu - Inbound Marketing*/
|
72 |
+
$wp_admin_bar->add_menu(array(
|
73 |
+
'id' => self::$inboundnow_menu_key,
|
74 |
+
'title' => __(' Marketing', 'inbound-pro'),
|
75 |
+
'href' => "",
|
76 |
+
'meta' => array('class' => 'inbound-nav-marketing', 'title' => 'Inbound Marketing Admin')
|
77 |
+
));
|
78 |
+
|
79 |
+
//print_r($primary_menu_items);exit;
|
80 |
+
|
81 |
+
/** Add Primary Menu Items */
|
82 |
+
foreach ($primary_menu_items as $id => $menu_item) {
|
83 |
+
/** Add in the item ID */
|
84 |
+
$menu_item['id'] = $id;
|
85 |
+
|
86 |
+
/** Add meta target to each item where it's not already set, so links open in new window/tab */
|
87 |
+
if (!isset($menu_item['meta']['target'])) {
|
88 |
+
$menu_item['meta']['target'] = '_blank';
|
89 |
+
}
|
90 |
+
|
91 |
+
/** Add class to links that open up in a new window/tab */
|
92 |
+
if ('_blank' === $menu_item['meta']['target']) {
|
93 |
+
|
94 |
+
if (!isset($menu_item['meta']['class'])) {
|
95 |
+
$menu_item['meta']['class'] = '';
|
96 |
+
}
|
97 |
+
|
98 |
+
$menu_item['meta']['class'] .= 'inbound-new-tab';
|
99 |
+
}
|
100 |
+
|
101 |
+
/** Add menu items */
|
102 |
+
$wp_admin_bar->add_node($menu_item);
|
103 |
+
}
|
104 |
+
|
105 |
+
//var_dump($wp_admin_bar);exit;
|
106 |
+
|
107 |
+
/* Add Secondary Menu Item Group */
|
108 |
+
$wp_admin_bar->add_group(array(
|
109 |
+
'parent' => self::$inboundnow_menu_key,
|
110 |
+
'id' => self::$inboundnow_menu_secondary_group_key,
|
111 |
+
'meta' => array('class' => 'ab-sub-secondary')
|
112 |
+
));
|
113 |
+
|
114 |
+
foreach ($secondary_menu_items as $id => $menu_item) {
|
115 |
+
$menu_item['id'] = $id;
|
116 |
+
|
117 |
+
if (!isset($menu_item['meta']['target'])) {
|
118 |
+
$menu_item['meta']['target'] = '_blank';
|
119 |
+
}
|
120 |
+
|
121 |
+
if ('_blank' === $menu_item['meta']['target']) {
|
122 |
+
if (!isset($menu_item['meta']['class'])) {
|
123 |
+
$menu_item['meta']['class'] = '';
|
124 |
+
}
|
125 |
+
|
126 |
+
$menu_item['meta']['class'] .= ' inbound-new-tab';
|
127 |
+
}
|
128 |
+
|
129 |
+
$wp_admin_bar->add_node($menu_item);
|
130 |
+
}
|
131 |
+
|
132 |
+
/* add lead search */
|
133 |
+
if (class_exists('Inbound_Pro_Plugin') && is_admin()) {
|
134 |
+
$args = array(
|
135 |
+
'id' => 'lead_search',
|
136 |
+
'title' => '<i class="fa fa-search" aria-hidden="true" style="font-family:FontAwesome;"></i>',
|
137 |
+
'href' => '#lead-search',
|
138 |
+
'meta' => array('class' => 'adminbar-leads-search')
|
139 |
+
);
|
140 |
+
$wp_admin_bar->add_node($args);
|
141 |
+
}
|
142 |
+
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Loads leads menu items
|
147 |
+
*/
|
148 |
+
public static function load_leads($menu_items) {
|
149 |
+
/* Check if Leads Active */
|
150 |
+
if (!function_exists('wpleads_check_active')) {
|
151 |
+
return $menu_items;
|
152 |
+
}
|
153 |
+
|
154 |
+
$leads_key = 'inbound-leads';
|
155 |
+
self::$load_forms = true;
|
156 |
+
self::$load_leads = true;
|
157 |
+
|
158 |
+
/* 1 - Lead Parent */
|
159 |
+
$menu_items[$leads_key] = array(
|
160 |
+
'parent' => self::$inboundnow_menu_key,
|
161 |
+
'title' => __('Leads', 'inbound-pro'),
|
162 |
+
'href' => admin_url('edit.php?post_type=wp-lead'),
|
163 |
+
'meta' => array('target' => '', 'title' => _x('Manage Forms', 'inbound-pro'))
|
164 |
+
);
|
165 |
+
|
166 |
+
/* 1.1 - Leads search form */
|
167 |
+
$leads_search_text = __('Search All Leads', 'inbound-pro');
|
168 |
+
$menu_items['inbound-leads-search'] = array(
|
169 |
+
'parent' => $leads_key,
|
170 |
+
'title' => '<form id="inbound-menu-form" method="get" action="' . admin_url('edit.php?post_type=wp-lead') . '" class=" " target="_blank">
|
171 |
+
<input id="search-inbound-menu" type="text" placeholder="' . $leads_search_text . '" onblur="this.value=(this.value==\'\') ? \'' . $leads_search_text . '\' : this.value;" onfocus="this.value=(this.value==\'' . $leads_search_text . '\') ? \'\' : this.value;" value="' . $leads_search_text . '" name="s" value="' . esc_attr('Search Leads', 'inbound-pro') . '" class="text inbound-search-input" />
|
172 |
<input type="hidden" name="post_type" value="wp-lead" />
|
173 |
<input type="hidden" name="post_status" value="all" />
|
174 |
+
' . self::$go_button,
|
175 |
+
'href' => false,
|
176 |
+
'meta' => array('target' => '', 'title' => _x('Search Leads', 'Translators: For the tooltip', 'inbound-pro'))
|
177 |
+
);
|
178 |
+
|
179 |
+
/* 1.2 - View All Leads */
|
180 |
+
$menu_items['inbound-leads-view'] = array(
|
181 |
+
'parent' => $leads_key,
|
182 |
+
'title' => __('View All Leads', 'inbound-pro'),
|
183 |
+
'href' => admin_url('edit.php?post_type=wp-lead'),
|
184 |
+
'meta' => array('target' => '', 'title' => __('View All Forms', 'inbound-pro'))
|
185 |
+
);
|
186 |
+
|
187 |
+
/* 1.3 - View Lead Lists */
|
188 |
+
$menu_items['inbound-leads-list'] = array(
|
189 |
+
'parent' => $leads_key,
|
190 |
+
'title' => __('View Lead Lists', 'inbound-pro'),
|
191 |
+
'href' => admin_url('edit-tags.php?taxonomy=wplead_list_category&post_type=wp-lead'),
|
192 |
+
'meta' => array('target' => '', 'title' => __('View Lead Lists', 'inbound-pro'))
|
193 |
+
);
|
194 |
+
|
195 |
+
/* 1.4 - Create New Lead */
|
196 |
+
$menu_items['inbound-leads-add'] = array(
|
197 |
+
'parent' => $leads_key,
|
198 |
+
'title' => __('Create New Lead', 'inbound-pro'),
|
199 |
+
'href' => admin_url('post-new.php?post_type=wp-lead'),
|
200 |
+
'meta' => array('target' => '', 'title' => __('Add new lead', 'inbound-pro'))
|
201 |
+
);
|
202 |
+
|
203 |
+
return $menu_items;
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Loads Calls To Action Menu Items
|
208 |
+
*/
|
209 |
+
public static function load_callstoaction($menu_items) {
|
210 |
+
|
211 |
+
/* Check if Calls To Action Active */
|
212 |
+
if (!function_exists('cta_check_active')) {
|
213 |
+
return $menu_items;
|
214 |
+
}
|
215 |
+
|
216 |
+
$cta_key = 'inbound-cta';
|
217 |
+
self::$load_forms = true;
|
218 |
+
self::$load_callstoaction = true;
|
219 |
+
|
220 |
+
/* 1 - Calls to Action */
|
221 |
+
$menu_items[$cta_key] = array(
|
222 |
+
'parent' => self::$inboundnow_menu_key,
|
223 |
+
'title' => __('Call to Actions', 'inbound-pro'),
|
224 |
+
'href' => admin_url('edit.php?post_type=wp-call-to-action'),
|
225 |
+
'meta' => array('target' => '', 'title' => __('View All Landing Pages', 'inbound-pro'))
|
226 |
+
);
|
227 |
+
|
228 |
+
/* 1.1 - View Calls to Action */
|
229 |
+
$menu_items['inbound-cta-view'] = array(
|
230 |
+
'parent' => $cta_key,
|
231 |
+
'title' => __('View Calls to Action List', 'inbound-pro'),
|
232 |
+
'href' => admin_url('post-new.php?post_type=wp-call-to-action'),
|
233 |
+
'meta' => array('target' => '', 'title' => __('View All Landing Pages', 'inbound-pro'))
|
234 |
+
);
|
235 |
+
|
236 |
+
/* 1.2 - Add Calls to Action */
|
237 |
+
$menu_items['inbound-cta-add'] = array(
|
238 |
+
'parent' => $cta_key,
|
239 |
+
'title' => __('Add New Call to Action', 'inbound-pro'),
|
240 |
+
'href' => admin_url('post-new.php?post_type=wp-call-to-action'),
|
241 |
+
'meta' => array('target' => '', 'title' => __('Add new call to action', 'inbound-pro'))
|
242 |
+
);
|
243 |
+
|
244 |
+
/* 1.3 - Calls to Action Categories */
|
245 |
+
$menu_items['inbound-cta-categories'] = array(
|
246 |
+
'parent' => $cta_key,
|
247 |
+
'title' => __('Categories', 'inbound-pro'),
|
248 |
+
'href' => admin_url('edit-tags.php?taxonomy=wp_call_to_action_category&post_type=wp-call-to-action'),
|
249 |
+
'meta' => array('target' => '', 'title' => __('Landing Page Categories', 'inbound-pro'))
|
250 |
+
);
|
251 |
+
|
252 |
+
/* 1.4 - Settings */
|
253 |
+
if (current_user_can('manage_options')) {
|
254 |
+
$menu_items['inbound-cta-settings'] = array(
|
255 |
+
'parent' => $cta_key,
|
256 |
+
'title' => __('Settings', 'inbound-pro'),
|
257 |
+
'href' => admin_url('edit.php?post_type=wp-call-to-action&page=wp_cta_global_settings'),
|
258 |
+
'meta' => array('target' => '', 'title' => __('Manage Call to Action Settings', 'inbound-pro'))
|
259 |
+
);
|
260 |
+
}
|
261 |
+
|
262 |
+
return $menu_items;
|
263 |
+
}
|
264 |
+
|
265 |
+
/**
|
266 |
+
* Loads Landing Page Menu Items
|
267 |
+
*/
|
268 |
+
public static function load_landingpages($menu_items) {
|
269 |
+
/* Check if Landing Pages Active */
|
270 |
+
if (!function_exists('lp_check_active')) {
|
271 |
+
return $menu_items;
|
272 |
+
}
|
273 |
+
|
274 |
+
$landing_pages_key = 'inbound-landingpages';
|
275 |
+
self::$load_forms = true;
|
276 |
+
self::$load_landingpages = true;
|
277 |
+
|
278 |
+
/* 1 - Landing Pages */
|
279 |
+
$menu_items[$landing_pages_key] = array(
|
280 |
+
'parent' => self::$inboundnow_menu_key,
|
281 |
+
'title' => __('Landing Pages', 'inbound-pro'),
|
282 |
+
'href' => admin_url('edit.php?post_type=landing-page'),
|
283 |
+
'meta' => array('target' => '', 'title' => __('View All Landing Pages', 'inbound-pro'))
|
284 |
+
);
|
285 |
+
|
286 |
+
/* 1.1 - View Landing Pages */
|
287 |
+
$menu_items['inbound-landingpages-view'] = array(
|
288 |
+
'parent' => $landing_pages_key,
|
289 |
+
'title' => __('View Landing Pages List', 'inbound-pro'),
|
290 |
+
'href' => admin_url('edit.php?post_type=landing-page'),
|
291 |
+
'meta' => array('target' => '', 'title' => __('View All Landing Pages', 'inbound-pro'))
|
292 |
+
);
|
293 |
+
|
294 |
+
/* 1.2 - Add New Landing Pages */
|
295 |
+
$menu_items['inbound-landingpages-add'] = array(
|
296 |
+
'parent' => $landing_pages_key,
|
297 |
+
'title' => __('Add New Landing Page', 'inbound-pro'),
|
298 |
+
'href' => admin_url('post-new.php?post_type=landing-page'),
|
299 |
+
'meta' => array('target' => '', 'title' => __('Add new Landing Page', 'inbound-pro'))
|
300 |
+
);
|
301 |
+
|
302 |
+
/* 1.3 - Landing Pages Categories */
|
303 |
+
$menu_items['inbound-landingpages-categories'] = array(
|
304 |
+
'parent' => $landing_pages_key,
|
305 |
+
'title' => __('Categories', 'inbound-pro'),
|
306 |
+
'href' => admin_url('edit-tags.php?taxonomy=landing_page_category&post_type=landing-page'),
|
307 |
+
'meta' => array('target' => '', 'title' => __('Landing Page Categories', 'inbound-pro'))
|
308 |
+
);
|
309 |
+
|
310 |
+
/* 1.4 - Landing Pages Settings */
|
311 |
+
if (current_user_can('manage_options')) {
|
312 |
+
$menu_items['inbound-landingpages-settings'] = array(
|
313 |
+
'parent' => $landing_pages_key,
|
314 |
+
'title' => __('Settings', 'inbound-pro'),
|
315 |
+
'href' => admin_url('edit.php?post_type=landing-page&page=lp_global_settings'),
|
316 |
+
'meta' => array('target' => '', 'title' => __('Manage Landing Page Settings', 'inbound-pro'))
|
317 |
+
);
|
318 |
+
}
|
319 |
+
|
320 |
+
|
321 |
+
return $menu_items;
|
322 |
+
}
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Loads Email Menu Items
|
326 |
+
*/
|
327 |
+
public static function load_mailer($menu_items) {
|
328 |
+
/* Check if Landing Pages Active */
|
329 |
+
if (!function_exists('mailer_check_active')) {
|
330 |
+
return $menu_items;
|
331 |
+
}
|
332 |
+
|
333 |
+
$mailer_key = 'inbound-mailer';
|
334 |
+
|
335 |
+
/* 1 - Inbound Mailer Component */
|
336 |
+
$menu_items[$mailer_key] = array(
|
337 |
+
'parent' => self::$inboundnow_menu_key,
|
338 |
+
'title' => __('Email', 'inbound-pro'),
|
339 |
+
'href' => admin_url('edit.php?post_type=inbound-email'),
|
340 |
+
'meta' => array('target' => '', 'title' => __('View All E-Mails', 'inbound-pro'))
|
341 |
+
);
|
342 |
+
|
343 |
+
/* 1.1 - View Email */
|
344 |
+
$menu_items['inbound-mailer-view'] = array(
|
345 |
+
'parent' => $mailer_key,
|
346 |
+
'title' => __('View Email List', 'inbound-pro'),
|
347 |
+
'href' => admin_url('edit.php?post_type=inbound-email'),
|
348 |
+
'meta' => array('target' => '', 'title' => __('View All E-Mails', 'inbound-pro'))
|
349 |
+
);
|
350 |
+
|
351 |
+
/* 1.2 - Add New Email */
|
352 |
+
$menu_items['inbound-mailer-create'] = array(
|
353 |
+
'parent' => $mailer_key,
|
354 |
+
'title' => __('Create New eMail', 'inbound-pro'),
|
355 |
+
'href' => admin_url('post-new.php?post_type=inbound-email'),
|
356 |
+
'meta' => array('target' => '', 'title' => __('Create New E-Mail', 'inbound-pro'))
|
357 |
+
);
|
358 |
+
|
359 |
+
return $menu_items;
|
360 |
+
}
|
361 |
+
|
362 |
+
/**
|
363 |
+
* Loads Automation Menu Items
|
364 |
+
*/
|
365 |
+
public static function load_automation($menu_items) {
|
366 |
+
/* Check if Landing Pages Active */
|
367 |
+
if (!function_exists('inbound_automation_check_active')) {
|
368 |
+
return $menu_items;
|
369 |
+
}
|
370 |
+
|
371 |
+
$automation_key = 'inbound-automation';
|
372 |
+
|
373 |
+
/* 1 - Inbound Automation Component */
|
374 |
+
$menu_items[$automation_key] = array(
|
375 |
+
'parent' => self::$inboundnow_menu_key,
|
376 |
+
'title' => __('Automation', 'inbound-pro'),
|
377 |
+
'href' => admin_url('edit.php?post_type=automation'),
|
378 |
+
'meta' => array('target' => '', 'title' => __('View All Rules', 'inbound-pro'))
|
379 |
+
);
|
380 |
+
|
381 |
+
/* 1.1 - View Rules */
|
382 |
+
$menu_items['inbound-automation-view'] = array(
|
383 |
+
'parent' => $automation_key,
|
384 |
+
'title' => __('View Rules', 'inbound-pro'),
|
385 |
+
'href' => admin_url('edit.php?post_type=automation'),
|
386 |
+
'meta' => array('target' => '', 'title' => __('View All Rules', 'inbound-pro'))
|
387 |
+
);
|
388 |
+
|
389 |
+
/* 1.2 - Add New Rule */
|
390 |
+
$menu_items['inbound-automation-create'] = array(
|
391 |
+
'parent' => $automation_key,
|
392 |
+
'title' => __('Create New Rule', 'inbound-pro'),
|
393 |
+
'href' => admin_url('post-new.php?post_type=automation'),
|
394 |
+
'meta' => array('target' => '', 'title' => __('Create New Rule', 'inbound-pro'))
|
395 |
+
);
|
396 |
+
|
397 |
+
return $menu_items;
|
398 |
+
}
|
399 |
+
|
400 |
+
public static function load_forms($menu_items) {
|
401 |
+
/* Check if Leads Active */
|
402 |
+
if (!self::$load_forms) {
|
403 |
+
return $menu_items;
|
404 |
+
}
|
405 |
+
|
406 |
+
$forms_key = 'inbound-forms';
|
407 |
+
|
408 |
+
/* 1 - Manage Forms */
|
409 |
+
$menu_items[$forms_key] = array(
|
410 |
+
'parent' => self::$inboundnow_menu_key,
|
411 |
+
'title' => __('Manage Forms', 'inbound-pro'),
|
412 |
+
'href' => admin_url('edit.php?post_type=inbound-forms'),
|
413 |
+
'meta' => array('target' => '', 'title' => _x('Manage Forms', 'inbound-pro'))
|
414 |
+
);
|
415 |
+
|
416 |
+
/* 1.1 - View All Forms */
|
417 |
+
$menu_items['inbound-forms-view'] = array(
|
418 |
+
'parent' => $forms_key,
|
419 |
+
'title' => __('View All Forms', 'inbound-pro'),
|
420 |
+
'href' => admin_url('edit.php?post_type=inbound-forms'),
|
421 |
+
'meta' => array('target' => '', 'title' => __('View All Forms', 'inbound-pro'))
|
422 |
+
);
|
423 |
+
|
424 |
+
/* 1.1.x Get Forms and List */
|
425 |
+
$forms = get_posts(array('post_type' => 'inbound-forms', 'post_status' => 'published'));
|
426 |
+
foreach ($forms as $form) {
|
427 |
+
$menu_items['inbound-form-' . $form->ID] = array(
|
428 |
+
'parent' => 'inbound-forms-view',
|
429 |
+
'title' => $form->post_title,
|
430 |
+
'href' => admin_url('post.php?post=' . $form->ID . '&action=edit'),
|
431 |
+
'meta' => array('target' => '_blank', 'title' => $form->post_title)
|
432 |
+
);
|
433 |
+
}
|
434 |
+
|
435 |
+
/* 1.2 - Create New Form */
|
436 |
+
$menu_items['inbound-forms-add'] = array(
|
437 |
+
'parent' => $forms_key,
|
438 |
+
'title' => __('Create New Form', 'inbound-pro'),
|
439 |
+
'href' => admin_url('post-new.php?post_type=inbound-forms'),
|
440 |
+
'meta' => array('target' => '', 'title' => __('Add new call to action', 'inbound-pro'))
|
441 |
+
);
|
442 |
+
|
443 |
+
return $menu_items;
|
444 |
+
}
|
445 |
+
|
446 |
+
public static function load_manage_templates($menu_items) {
|
447 |
+
if (!isset(self::$load_landingpages) || !isset(self::$load_callstoaction)) {
|
448 |
+
return $menu_items;
|
449 |
+
}
|
450 |
+
|
451 |
+
$templates_key = 'inbound-templates';
|
452 |
+
|
453 |
+
/* 1 - Manage Templates */
|
454 |
+
$menu_items[$templates_key] = array(
|
455 |
+
'parent' => self::$inboundnow_menu_key,
|
456 |
+
'title' => __('Manage Templates', 'inbound-pro'),
|
457 |
+
'href' => "",
|
458 |
+
'meta' => array('target' => '', 'title' => _x('Manage Templates', 'inbound-pro'))
|
459 |
+
);
|
460 |
+
|
461 |
+
/* 1.1 - Get More Templates */
|
462 |
+
$menu_items['inbound-gettemplates'] = array(
|
463 |
+
'parent' => $templates_key,
|
464 |
+
'title' => __('Download More Templates', 'inbound-pro'),
|
465 |
+
'href' => "http://www.inboundnow.com/market",
|
466 |
+
'meta' => array('target' => '', 'title' => __('Download More Templates', 'inbound-pro'))
|
467 |
+
);
|
468 |
+
|
469 |
+
/* 1.1 - Landing Page Templates */
|
470 |
+
if (isset(self::$load_landingpages)) {
|
471 |
+
$menu_items['inbound-landingpagetemplates'] = array(
|
472 |
+
'parent' => $templates_key,
|
473 |
+
'title' => __('Landing Page Templates', 'inbound-pro'),
|
474 |
+
'href' => admin_url('edit.php?post_type=landing-page&page=lp_manage_templates'),
|
475 |
+
'meta' => array('target' => '', 'title' => __('Landing Page Templates', 'inbound-pro'))
|
476 |
+
);
|
477 |
+
}
|
478 |
+
|
479 |
+
/* 1.1 - Call To Action Templates */
|
480 |
+
if (isset(self::$load_callstoaction)) {
|
481 |
+
$menu_items['inbound-ctatemplates'] = array(
|
482 |
+
'parent' => $templates_key,
|
483 |
+
'title' => __('Call to Action Templates', 'inbound-pro'),
|
484 |
+
'href' => admin_url('edit.php?post_type=wp-call-to-action&page=wp_cta_manage_templates'),
|
485 |
+
'meta' => array('target' => '', 'title' => __('Call to Action Templates', 'inbound-pro'))
|
486 |
+
);
|
487 |
+
}
|
488 |
+
|
489 |
+
return $menu_items;
|
490 |
+
}
|
491 |
+
|
492 |
+
public static function load_settings($menu_items) {
|
493 |
+
$settings_key = 'inbound-settings';
|
494 |
+
|
495 |
+
/* 1 - Global Settings */
|
496 |
+
$menu_items[$settings_key] = array(
|
497 |
+
'parent' => self::$inboundnow_menu_key,
|
498 |
+
'title' => __('Settings', 'inbound-pro'),
|
499 |
+
'href' => "",
|
500 |
+
'meta' => array('target' => '', 'title' => _x('Manage Settings', 'inbound-pro'))
|
501 |
+
);
|
502 |
+
|
503 |
+
/* 1.1 - Call to Action Settings */
|
504 |
+
if (defined('INBOUND_PRO_PATH')) {
|
505 |
+
$menu_items['inbound-now-settings'] = array(
|
506 |
+
'parent' => $settings_key,
|
507 |
+
'title' => __('Inbound Pro Settings', 'inbound-pro'),
|
508 |
+
'href' => admin_url('admin.php?page=inbound-pro'),
|
509 |
+
'meta' => array('target' => '', 'title' => __('Inbound Pro Settings', 'inbound-pro'))
|
510 |
+
);
|
511 |
+
$menu_items['inbound-now-extension-settings'] = array(
|
512 |
+
'parent' => $settings_key,
|
513 |
+
'title' => __('Extension Settings', 'inbound-pro'),
|
514 |
+
'href' => admin_url('admin.php?tab=inbound-pro-settings&page=inbound-pro'),
|
515 |
+
'meta' => array('target' => '', 'title' => __('Extension Settings', 'inbound-pro'))
|
516 |
+
);
|
517 |
+
}
|
518 |
+
|
519 |
+
/* 1.1 - Call to Action Settings */
|
520 |
+
if (self::$load_callstoaction) {
|
521 |
+
$menu_items['inbound-ctasettings'] = array(
|
522 |
+
'parent' => $settings_key,
|
523 |
+
'title' => __('Call to Action Settings', 'inbound-pro'),
|
524 |
+
'href' => admin_url('edit.php?post_type=wp-call-to-action&page=wp_cta_global_settings'),
|
525 |
+
'meta' => array('target' => '', 'title' => __('Call to Action Settings', 'inbound-pro'))
|
526 |
+
);
|
527 |
+
}
|
528 |
+
|
529 |
+
if (self::$load_landingpages) {
|
530 |
+
$menu_items['inbound-landingpagesettings'] = array(
|
531 |
+
'parent' => $settings_key,
|
532 |
+
'title' => __('Landing Page Settings', 'inbound-pro'),
|
533 |
+
'href' => admin_url('edit.php?post_type=landing-page&page=lp_global_settings'),
|
534 |
+
'meta' => array('target' => '', 'title' => __('Landing Page Settings', 'inbound-pro'))
|
535 |
+
);
|
536 |
+
}
|
537 |
+
|
538 |
+
if (self::$load_leads) {
|
539 |
+
$menu_items['inbound-leadssettings'] = array(
|
540 |
+
'parent' => $settings_key,
|
541 |
+
'title' => __('Lead Settings', 'inbound-pro'),
|
542 |
+
'href' => admin_url('edit.php?post_type=wp-lead&page=wpleads_global_settings'),
|
543 |
+
'meta' => array('target' => '', 'title' => __('Lead Settings', 'inbound-pro'))
|
544 |
+
);
|
545 |
+
}
|
546 |
+
|
547 |
+
return $menu_items;
|
548 |
+
}
|
549 |
+
|
550 |
+
public static function load_analytics($menu_items) {
|
551 |
+
$analytics_key = 'inbound-analytics';
|
552 |
+
|
553 |
+
/* 1 - Analytics */
|
554 |
+
$menu_items[$analytics_key] = array(
|
555 |
+
'parent' => self::$inboundnow_menu_key,
|
556 |
+
'title' => __('Analytics (coming soon)', 'inbound-pro'),
|
557 |
+
'href' => '#',
|
558 |
+
'meta' => array('target' => '', 'title' => __('Analytics (coming soon)', 'inbound-pro'))
|
559 |
+
);
|
560 |
+
|
561 |
+
return $menu_items;
|
562 |
+
}
|
563 |
+
|
564 |
+
public static function load_seo($menu_items) {
|
565 |
+
$seo_key = 'inbound-seo';
|
566 |
+
|
567 |
+
if (function_exists('is_plugin_active') && is_plugin_active('wordpress-seo/wp-seo.php')) {
|
568 |
+
$menu_items[$seo_key] = array(
|
569 |
+
'parent' => self::$inboundnow_menu_key,
|
570 |
+
'title' => __('SEO by Yoast', 'inbound-pro'),
|
571 |
+
'href' => admin_url('admin.php?page=wpseo_dashboard'),
|
572 |
+
'meta' => array('target' => '', 'title' => __('Manage SEO Settings', 'inbound-pro'))
|
573 |
+
);
|
574 |
+
}
|
575 |
+
|
576 |
+
return $menu_items;
|
577 |
+
}
|
578 |
+
|
579 |
+
public static function load_support($secondary_menu_items) {
|
580 |
+
$support_key = 'inbound-support';
|
581 |
+
|
582 |
+
/* 1 - Support Form */
|
583 |
+
$secondary_menu_items[$support_key] = array(
|
584 |
+
'parent' => self::$inboundnow_menu_secondary_group_key,
|
585 |
+
'title' => __('Support Forum', 'inbound-pro'),
|
586 |
+
'href' => 'https://support.inboundnow.com/',
|
587 |
+
'meta' => array('target' => '_blank', 'title' => __('Support Forum', 'inbound-pro'))
|
588 |
+
);
|
589 |
+
|
590 |
+
/* 1 - Documentation */
|
591 |
+
$secondary_menu_items['inbound-docs'] = array(
|
592 |
+
'parent' => self::$inboundnow_menu_secondary_group_key,
|
593 |
+
'title' => __('Documentation', 'inbound-pro'),
|
594 |
+
'href' => 'http://docs.inboundnow.com/',
|
595 |
+
'meta' => array('title' => __('Documentation', 'inbound-pro'))
|
596 |
+
);
|
597 |
+
|
598 |
+
/* 1 - Doc Search */
|
599 |
+
$search_docs_text = __('Search Docs', 'inbound-pro');
|
600 |
+
|
601 |
+
$secondary_menu_items['inbound-docs-searchform'] = array(
|
602 |
+
'parent' => self::$inboundnow_menu_secondary_group_key,
|
603 |
+
'title' => '<form method="get" id="inbound-menu-form" action="//www.inboundnow.com/support/search/?action=bbp-search-request" class=" " target="_blank">
|
604 |
+
<input id="search-inbound-menu" type="text" placeholder="' . $search_docs_text . '" onblur="this.value=(this.value==\'\') ? \'' . $search_docs_text . '\' : this.value;" onfocus="this.value=(this.value==\'' . $search_docs_text . '\') ? \'\' : this.value;" value="' . $search_docs_text . '" name="bbp_search" value="' . esc_attr('Search Docs', 'inbound-pro') . '" class="text inbound-search-input" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
605 |
<input type="hidden" name="post_type[]" value="docs" />
|
606 |
<input type="hidden" name="post_type[]" value="page" />' . self::$go_button,
|
607 |
+
'href' => false,
|
608 |
+
'meta' => array('target' => '', 'title' => _x('Search Docs', 'Translators: For the tooltip', 'inbound-pro'))
|
609 |
+
);
|
610 |
+
|
611 |
+
return $secondary_menu_items;
|
612 |
+
}
|
613 |
+
|
614 |
+
public static function load_inbound_hq($secondary_menu_items) {
|
615 |
+
$hq_key = 'inbound-hq';
|
616 |
+
|
617 |
+
/* 1 - Inbound Now Plugin HQ */
|
618 |
+
$secondary_menu_items[$hq_key] = array(
|
619 |
+
'parent' => self::$inboundnow_menu_secondary_group_key,
|
620 |
+
'title' => __('Inbound Now Plugin HQ', 'inbound-pro'),
|
621 |
+
'href' => 'https://www.inboundnow.com/',
|
622 |
+
'meta' => array('title' => __('Inbound Now Plugin HQ', 'inbound-pro'))
|
623 |
+
);
|
624 |
+
|
625 |
+
/* 1.1 - GitHub Link */
|
626 |
+
$secondary_menu_items['inbound-sites-dev'] = array(
|
627 |
+
'parent' => $hq_key,
|
628 |
+
'title' => __('GitHub Repository Developer Center', 'inbound-pro'),
|
629 |
+
'href' => 'https://github.com/inboundnow',
|
630 |
+
'meta' => array('title' => __('GitHub Repository Developer Center', 'inbound-pro'))
|
631 |
+
);
|
632 |
+
|
633 |
+
/* 1.2 - Offical Blog */
|
634 |
+
$secondary_menu_items['inbound-sites-blog'] = array(
|
635 |
+
'parent' => $hq_key,
|
636 |
+
'title' => __('Official Blog', 'inbound-pro'),
|
637 |
+
'href' => 'https://www.inboundnow.com/blog/',
|
638 |
+
'meta' => array('title' => __('Official Blog', 'inbound-pro'))
|
639 |
+
);
|
640 |
+
|
641 |
+
/* 1.3 - My Account */
|
642 |
+
$secondary_menu_items['inboundsitesaccount'] = array(
|
643 |
+
'parent' => $hq_key,
|
644 |
+
'title' => __('My Account', 'inbound-pro'),
|
645 |
+
'href' => 'https://www.inboundnow.com/marketplace/account/',
|
646 |
+
'meta' => array('title' => __('My Account', 'inbound-pro'))
|
647 |
+
);
|
648 |
+
|
649 |
+
/* 1.3.1 - Purchase History */
|
650 |
+
$secondary_menu_items['inboundsitesaccount-history'] = array(
|
651 |
+
'parent' => 'inboundsitesaccount',
|
652 |
+
'title' => __('Purchase History', 'inbound-pro'),
|
653 |
+
'href' => 'https://www.inboundnow.com/marketplace/account/purchase-history/',
|
654 |
+
'meta' => array('title' => __('Purchase History', 'inbound-pro'))
|
655 |
+
);
|
656 |
+
|
657 |
+
return $secondary_menu_items;
|
658 |
+
}
|
659 |
+
|
660 |
+
/**
|
661 |
+
* Loads debug menu item section
|
662 |
+
*/
|
663 |
+
public static function load_debug($secondary_menu_items) {
|
664 |
+
$debug_key = 'inbound-debug';
|
665 |
+
|
666 |
+
/* 1 - Debug Tools */
|
667 |
+
$secondary_menu_items[$debug_key] = array(
|
668 |
+
'parent' => self::$inboundnow_menu_secondary_group_key,
|
669 |
+
'title' => __('<span style="color:#fff;font-size: 13px;margin-top: -1px;display: inline-block;">Debug Tools</span>', 'inbound-pro'),
|
670 |
+
'href' => "#",
|
671 |
+
'meta' => ""
|
672 |
+
);
|
673 |
+
|
674 |
+
/* 1.1 - 1.2 - Link Setup */
|
675 |
+
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
676 |
+
|
677 |
+
$param = (preg_match("/\?/", $actual_link)) ? "&" : '?';
|
678 |
+
if (preg_match("/inbound-dequeue-scripts/", $actual_link)) {
|
679 |
+
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
680 |
+
} else {
|
681 |
+
$actual_link = $actual_link . $param . 'inbound-dequeue-scripts';
|
682 |
+
}
|
683 |
+
|
684 |
+
$actual_link_two = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
685 |
+
$param_two = (preg_match("/\?/", $actual_link_two)) ? "&" : '?';
|
686 |
+
if (preg_match("/inbound_js/", $actual_link_two)) {
|
687 |
+
$actual_link_two = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
688 |
+
} else {
|
689 |
+
$actual_link_two = $actual_link_two . $param_two . 'inbound_js';
|
690 |
+
}
|
691 |
+
|
692 |
+
/* 1.1 - Check for JS Errors */
|
693 |
+
$secondary_menu_items['inbound-debug-checkjs'] = array(
|
694 |
+
'parent' => $debug_key,
|
695 |
+
'title' => __('Check for Javascript Errors', 'inbound-pro'),
|
696 |
+
'href' => $actual_link_two,
|
697 |
+
'meta' => array('title' => __('Click here to check javascript errors on this page', 'inbound-pro'))
|
698 |
+
);
|
699 |
+
|
700 |
+
/* 1.2 - Check for JS Errors */
|
701 |
+
$secondary_menu_items['inbound-debug-turnoffscripts'] = array(
|
702 |
+
'parent' => $debug_key,
|
703 |
+
'title' => __('Remove Javascript Errors', 'inbound-pro'),
|
704 |
+
'href' => $actual_link,
|
705 |
+
'meta' => array('title' => __('Click here to remove broken javascript to fix issues', 'inbound-pro'))
|
706 |
+
);
|
707 |
+
|
708 |
+
/* 1.2 - Force Run All Database Routines */
|
709 |
+
$secondary_menu_items['inbound-debug-force-shared-db-routines'] = array(
|
710 |
+
'parent' => $debug_key,
|
711 |
+
'title' => __('Force apply all shared database routines.', 'inbound-pro'),
|
712 |
+
'href' => admin_url('index.php?force_upgrade_routines=true'),
|
713 |
+
'meta' => array('title' => __('Click here to re-run all database upgrade routines. ', 'inbound-pro'))
|
714 |
+
);
|
715 |
+
|
716 |
+
return apply_filters('inbound_menu_debug', $secondary_menu_items, $debug_key);
|
717 |
+
}
|
718 |
+
|
719 |
+
/**
|
720 |
+
* Enqueues admin js and css
|
721 |
+
*/
|
722 |
+
public static function enqueue_js_css() {
|
723 |
+
if (!is_user_logged_in()) {
|
724 |
+
return;
|
725 |
+
}
|
726 |
+
wp_enqueue_style('inbound_menu', INBOUNDNOW_SHARED_URLPATH . 'assets/css/admin/wpadminbar.css');
|
727 |
+
}
|
728 |
+
}
|
729 |
+
|
730 |
+
add_action('init', array('Inbound_Menus_Adminbar', 'init'));
|
731 |
}
|
shared/classes/class.post-type.wp-lead.php
CHANGED
@@ -652,7 +652,7 @@ if ( !class_exists('Inbound_Leads') ) {
|
|
652 |
$double_optin_list_id = get_option('list-double-optin-list-id', '');
|
653 |
} else {
|
654 |
$settings = Inbound_Options_API::get_option('inbound-pro', 'settings', array());
|
655 |
-
$double_optin_list_id = $
|
656 |
}
|
657 |
|
658 |
// If the list doesn't already exist, create it
|
652 |
$double_optin_list_id = get_option('list-double-optin-list-id', '');
|
653 |
} else {
|
654 |
$settings = Inbound_Options_API::get_option('inbound-pro', 'settings', array());
|
655 |
+
$double_optin_list_id = $inbound_settings['leads']['list-double-optin-list-id'];
|
656 |
}
|
657 |
|
658 |
// If the list doesn't already exist, create it
|
shared/shortcodes/shortcodes-fields.php
CHANGED
@@ -136,7 +136,7 @@ if ( !class_exists('Inbound_Shortcodes_Fields') ) {
|
|
136 |
case 'select' :
|
137 |
$output = $row_start;
|
138 |
$output .= '<select name="'. $key .'" id="'.$key.'" class="inbound-shortcodes-input select inbound-shortcodes-select">';
|
139 |
-
if ( isset( $option['options']
|
140 |
foreach( $option['options'] as $val => $opt ) {
|
141 |
$selected = ($std == $val) ? ' selected="selected"' : '';
|
142 |
$output .= '<option'. $selected .' value="'. $val .'">'. $opt .'</option>';
|
136 |
case 'select' :
|
137 |
$output = $row_start;
|
138 |
$output .= '<select name="'. $key .'" id="'.$key.'" class="inbound-shortcodes-input select inbound-shortcodes-select">';
|
139 |
+
if ( isset( $option['options']) && is_array($option['options']) ) {
|
140 |
foreach( $option['options'] as $val => $opt ) {
|
141 |
$selected = ($std == $val) ? ' selected="selected"' : '';
|
142 |
$output .= '<option'. $selected .' value="'. $val .'">'. $opt .'</option>';
|