1: 2: 3: 4: 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: 172: 173: 174: 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: 606: 607: 608: 609: 610: 611: 612: 613: 614: 615: 616: 617: 618: 619: 620: 621: 622: 623: 624: 625: 626: 627: 628: 629: 630: 631: 632: 633:
<?php
if ( ! defined( 'ABSPATH' ) ) { exit; }
class LandingPages_Welcome {
public $minimum_capability = 'manage_options';
public function __construct() {
add_action( 'admin_menu', array( $this, 'admin_menus') );
add_action( 'admin_head', array( $this, 'admin_head' ) );
add_action( 'admin_init', array( $this, 'welcome' ) );
add_action('admin_footer', array( $this, 'force_permalink_flush' ) );
}
public function admin_menus() {
add_dashboard_page(
__( 'Welcome to WordPress Landing Pages', 'landing-pages'),
__( 'Welcome to WordPress Landing Pages', 'landing-pages'),
$this->minimum_capability,
'lp-quick-start',
array( $this, 'quick_start_screen' )
);
add_dashboard_page(
__( 'About the Inbound Now Marketing Platform', 'landing-pages'),
__( 'About the Inbound Now Marketing Platform', 'landing-pages'),
$this->minimum_capability,
'about-inboundnow',
array( $this, 'about_inboundnow_screen' )
);
add_dashboard_page(
__( 'Developers and Designers', 'landing-pages'),
__( 'Developers and Designers', 'landing-pages'),
$this->minimum_capability,
'inbound-developers',
array( $this, 'dev_designer_screen' )
);
}
public function admin_head() {
remove_submenu_page( 'index.php', 'lp-quick-start' );
remove_submenu_page( 'index.php', 'about-inboundnow' );
remove_submenu_page( 'index.php', 'inbound-developers' );
?>
<style type="text/css" media="screen">
.edd-badge {
padding-top: 130px;
height: 52px;
width: 185px;
color:
font-weight: bold;
font-size: 14px;
text-align: center;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
margin: 0 -5px;
}
.about-wrap .edd-badge {
position: absolute;
top: 0;
right: 0;
}
.edd-welcome-screenshots {
float: right;
margin-left: 10px!important;
}
margin-left: 0px;
padding-left: 0px;
}
width: 31.333333%;
}
width: 64.333333%;
}
padding-top: 0px;
font-size: 22px;
margin-top: 0px;
text-align: center;
}
text-align: center;
}
.inbound-button-holder {
}
background:
border: 1px solid rgba(0, 0, 0, 0.15);
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15),inset 1px 1px 1px rgba(255, 255, 255, 0.2);
-moz-box-shadow: 0 2px 3px rgba(0,0,0,.15),inset 1px 1px 1px rgba(255,255,255,.2);
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15),inset 1px 1px 1px rgba(255, 255, 255, 0.2);
color:
cursor: pointer;
display: inline-block;
font-family: inherit;
font-size: 20px;
font-weight: 500;
text-align: center;
padding: 8px 20px;
text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15);
text-decoration: none;
}
margin-top: 10px;
}
float: left;
min-height: 1px;
padding-left: 10px;
padding-right: 10px;}
background:
border: 1px solid
-webkit-box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.5);
-moz-box-shadow: inset 1px 1px 1px rgba(255,255,255,0.5);
box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.5);
margin: 0px 0px 20px;
padding: 20px 15px 20px;
position: relative;
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
min-height: 245px;
}
margin: 0px 135px 0px 0;
}
.grid.one-third p:last-of-type {
padding-bottom: 24px;
}
.grid.one-third:nth-last-of-type(1) p:last-of-type {
padding-bottom: 0px;
}
padding-right: 0px;
}
background:
background-image: -webkit-gradient(linear,left bottom,left top,from(
background-image: -webkit-linear-gradient(bottom,
background-image: -moz-linear-gradient(bottom,
background-image: -o-linear-gradient(bottom,
background-image: linear-gradient(to top,
border-color:
-webkit-box-shadow: inset 0 1px 0
box-shadow: inset 0 1px 0
-webkit-border-radius: 3px;
border-radius: 3px;
margin-bottom: 20px;
margin-top: 20px;
padding: 0;
border-width: 1px;
border-style: solid;
line-height: 1;
padding-bottom: 10px;
}
padding-left: 10px;
margin-top: 10px;
width: 93%;
}
margin-top: 0px;
padding-top: 10px;
padding-left: 10px;
margin-bottom: 5px;
font-size: 1.2em;
text-decoration: underline;
}
list-style: disc;
padding-left: 25px;
}
font-size: 31px; margin-top: 30px; line-height: 30px;margin-bottom: 15px;
}
-moz-transition:color .25s ease-in;
-o-transition:color .25s ease-in;
transition:color .25s ease-in;}
-webkit-transition:color .25s ease-in;
-moz-transition:color .25s ease-in;
-o-transition:color .25s ease-in;
transition:color .25s ease-in; }
</style>
<?php
}
static function render_nav_menu() {
$current_view = $_GET['page'];
$page_array = array('lp-quick-start' => "Quick Start Guide",
'about-inboundnow' => "About the Platform",
'inbound-developers' => 'Developers & Designers'
);
echo '<h2 class="nav-tab-wrapper" style="margin-left: -40px; padding-left: 40px;">';
foreach ($page_array as $key => $value) {
$active = ($current_view === $key) ? 'nav-tab-active' : '';
echo '<a class="nav-tab '.$active.'" href="'.esc_url( admin_url( add_query_arg( array( 'page' => $key ), 'index.php' ) ) ).'">';
echo _e( $value, 'landing-pages');
echo '</a>';
}
echo '</h2>';
}
public function quick_start_screen() {
list( $display_version ) = explode( '-', LANDINGPAGES_CURRENT_VERSION );
$Recommended = "";
$cta_install = "";
$leads_install = "";
$rec_end = "";
if (!is_plugin_active('cta/wordpress-cta.php')) {
$Recommended = "<div id='recommended-other-plugins'><h4>Recommended Other Plugins</h4>";
$cta_install = "<a href='".esc_url( admin_url( add_query_arg( array( 'tab' => 'search', 's' => 'wordpress+call+to+action' ), 'plugin-install.php' ) ) )."'><img src='".LANDINGPAGES_URLPATH."assets/images/cta-install.png'></a>";
$rec_end = "</div>";
}
if (!is_plugin_active('leads/wordpress-leads.php')) {
$Recommended = "<div id='recommended-other-plugins'><h4>Install Recommended Plugins</h4>";
$leads_install = "<a href='".esc_url( admin_url( add_query_arg( array( 'tab' => 'search', 's' => 'WordPress%20Leads' ), 'plugin-install.php' ) ) )."'><img src='".LANDINGPAGES_URLPATH."assets/images/leads-install.png'></a>";
$rec_end = "</div>";
}
?>
<style type="text/css">
.about-text {
font-size: 19px;
}</style>
<div class="wrap about-wrap" id="inbound-plugins">
<h1><?php printf( __( 'Welcome to WordPress Landing Pages %s', 'landing-pages'), $display_version ); ?></h1>
<div class="about-text" id="in-sub-head"><?php printf( __( 'Thank you for updating to the latest version! WordPress Landing Pages %s is help you convert more leads!', 'landing-pages'), $display_version ); ?></div>
<div class="edd-badge"><?php printf( __( 'Version %s', 'landing-pages'), $display_version ); ?></div>
<?php self::render_nav_menu();?>
<div class="row">
<div class='grid two-third'>
<div id="creating-landing-page">
<h4><?php _e( 'Create Your First Landing Page', 'landing-pages');?></h4>
<iframe width="640" height="360" src="//www.youtube.com/embed/-VuaBUc_yfk" frameborder="0" allowfullscreen></iframe>
</div>
<div id="creating-landing-page">
<h4><?php _e( 'How to Create Forms', 'landing-pages');?></h4>
<iframe width="640" height="360" src="//www.youtube.com/embed/Y4M_g9wkRXw" frameborder="0" allowfullscreen></iframe>
</div>
<div id="creating-landing-page">
<h4><?php _e( 'Creating Landing Pages with your Current Theme Template', 'landing-pages');?></h4>
<iframe width="640" height="360" src="//www.youtube.com/embed/pQzmx4ooL1M?list=UUCqiE-EcfDjaKGXSxtegcyg" frameborder="0" allowfullscreen></iframe>
</div>
<div id="creating-landing-page">
<!-- Creating Landing Page with current active Theme -->
</div>
<div id="creating-landing-page">
</div>
</div>
<div class='grid one-third'>
<?php echo $Recommended . $leads_install . $cta_install . $rec_end; ?>
<h4>Quick Links</h4>
<ul id="inbound-setting-links">
<li>
<a href="<?php echo esc_url( admin_url( add_query_arg( array( 'post_type' => 'landing-page', 'page' => 'lp_global_settings' ), 'edit.php' ) ) ); ?>"><?php _e( 'Go to WordPress Landing Pages Settings', 'landing-pages'); ?></a>
</li>
<li>
<a href="<?php echo esc_url( admin_url( add_query_arg( array( 'post_type' => 'landing-page', 'page' => 'lp_manage_templates' ), 'edit.php' ) ) ); ?>"><?php _e( 'Manage Your Landing Page Templates', 'landing-pages'); ?></a>
</li>
<li>
<a href="<?php echo esc_url( admin_url( add_query_arg( array( 'post_type' => 'landing-page' ), 'post-new.php' ) ) ); ?>"><?php _e( 'Create New Landing Page', 'landing-pages'); ?></a>
</li>
<li>
<a href="<?php echo esc_url( admin_url( add_query_arg( array( 'post_type' => 'landing-page', 'page' => 'inbound-forms-redirect' ), 'edit.php' ) ) ); ?>"><?php _e( 'Create Landing Page Forms', 'landing-pages'); ?></a>
</li>
</ul>
</div>
</div> <!-- end row -->
</div>
<?php
}
public function about_inboundnow_screen() {
list( $display_version ) = explode( '-', LANDINGPAGES_CURRENT_VERSION );
$leads_active_class = "Download For Free";
$lp_active_class = "Download For Free";
$cta_active_class = "Download For Free";
$active_class = "";
$leadactive = "";
$ctaactive = "";
if (is_plugin_active('landing-pages/landing-pages.php')) {
$lp_active_class = "Already Installed!";
$lpactive = " plugin-active";
}
if (is_plugin_active('cta/wordpress-cta.php')) {
$cta_active_class = "Already Installed!";
$ctaactive = " plugin-active";
}
if (is_plugin_active('leads/wordpress-leads.php')) {
$leads_active_class = "Already Installed!";
$leadactive = " plugin-active";
}
?>
<style type="text/css">
text-align: center;
font-weight: 200;
margin-bottom: 0px;
margin-top: 0px;
}
.inbound-check {
color:
padding-right: 0px;
padding-top: 5px;
display: inline-block;
clear: both;
vertical-align: top;
}
background:
.intro-p {
display: inline-block;
width: 96%;
vertical-align: top;
margin-top: 0px;
padding-top: 0px;
margin-right: -20px;
line-height: 1.4em;
}
.circle-wrap {
float: left;
margin-right: 0px;
width: 25px;
height: 25px;
margin-left: -5px;
margin-right: 6px;
margin-top: 5px;
border-radius: 50%;
background: linear-gradient(to bottom,
box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3), inset 0 2px 0 -1px rgba(98, 98, 98, 0.3), 0 3px 7px -3px rgba(0, 0, 0, 0.4);
color:
text-align: center;
font-size: 18px;
line-height: 17px;
cursor: default;
transition: color .3s ease;
}
.inbound-button-holder {
text-align: center;
}
</style>
<div class="wrap about-wrap">
<h1><?php printf( __( 'Turbo Charge Your Marketing', 'landing-pages'), $display_version ); ?></h1>
<div class="about-text" id="in-sub-head"><?php printf( __( 'WordPress Landing Pages is only one piece of Inbound Now\'s Marketing Platform', 'landing-pages'), $display_version ); ?></div>
<?php self::render_nav_menu();?>
<p class="about-description"><?php _e( 'To have an effective marketing strategy for your site you need to incorporate a comprehensive conversion strategy to capture visitors attention, get them clicking, and convert them on a web form or landing page.', 'landing-pages'); ?></p>
<div class="row" id="inbound-plugins">
<div class="grid one-third">
<div class="content-box default">
<h4><?php _e('Capture visitor attention with' , 'landing-pages'); ?></h4>
<h3 style="text-align: center;">WordPress Calls to Action</h3>
<div class='circle-wrap'>
<span class="inbound-check">?</span>
</div>
<p class="intro-p"><?php _e('<b>Convert more website traffic</b> with visually
appealing calls to action' , 'landing-pages'); ?></p>
<div class='circle-wrap'>
<span class="inbound-check">?</span>
</div>
<p class="intro-p"><?php _e('A/B test your marketing tactics and <b>improve your
sites conversion rates' , 'landing-pages'); ?></b></p>
<div class="inbound-button-holder">
<div class='dl-button'>
<a class="in-button<?php echo $ctaactive;?>" href=
"http://wordpress.org/plugins/cta/"><i class=
"icon-download"></i><?php echo $cta_active_class;?></a>
</div>
</div>
</div>
</div>
<div class="grid one-third">
<div class="content-box default">
<h4><?php _e( 'Convert website visitors with' , 'landing-pages'); ?></h4>
<h3>WordPress Landing Pages</h3>
<div class='circle-wrap'>
<span class="inbound-check">?</span>
</div>
<p class="intro-p"><?php _e('<b>Generate more web leads</b> with pages specifically designed for conversion' , 'landing-pages'); ?></p>
<div class='circle-wrap'>
<span class="inbound-check">?</span>
</div>
<p class="intro-p"><?php _e('A/B Test Landing Page effectiveness for <b>continual optimization & improvement</b>' , 'landing-pages'); ?></p>
<div class="inbound-button-holder">
<div class='dl-button'>
<a class="in-button<?php echo $lpactive;?>" href=
"http://wordpress.org/plugins/landing-pages/"><i class=
"icon-download"></i><?php echo $lp_active_class;?></a>
</div>
</div>
</div>
</div>
<div class="grid one-third">
<div class="content-box default">
<h4><?php _e('Followup & Close the deal with' , 'landing-pages'); ?></h4>
<h3>WordPress Leads</h3>
<div class='circle-wrap'>
<span class="inbound-check">?</span>
</div>
<p class="intro-p"><?php _e('Gather & leverage lead intelligence on
visitors to <b>close more deals</b>' , 'landing-pages'); ?></p>
<div class='circle-wrap'>
<span class="inbound-check">?</span>
</div>
<p class="intro-p"><?php _e('Track page views, site conversions,
demographics, geolocation, social media data and more.' , 'landing-pages'); ?></p>
<p class="intro-p"><?php _e('Know everything a lead has seen and done on your site before you contact them' , 'landing-pages'); ?></p>
<div class="inbound-button-holder">
<div class='dl-button'>
<a class="in-button<?php echo $leadactive;?>" href=
"http://wordpress.org/plugins/leads/"><i class=
"icon-download"></i><?php echo $leads_active_class;?></a>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
}
public function dev_designer_screen() {
list( $display_version ) = explode( '-', LANDINGPAGES_CURRENT_VERSION );
?>
<style type="text/css">
text-decoration: none;
text-align: center;
font-size: 38px;
padding: 38px;
vertical-align: top;
padding-top: 24px;
padding-bottom: 46px;
color:
}</style>
<div class="wrap about-wrap" id="inbound-plugins">
<h1><?php printf( __( 'Welcome to WordPress Landing Pages %s', 'landing-pages'), $display_version ); ?></h1>
<div class="about-text" id="in-sub-head"><?php printf( __( 'Learn How to Build Custom Templates & Add Value to Your Clients', 'landing-pages'), $display_version ); ?></div>
<div class="edd-badge"><?php printf( __( 'Version %s', 'landing-pages'), $display_version ); ?></div>
<?php self::render_nav_menu();?>
<div class="row">
<div class='grid two-third'>
<p class="about-description"><?php _e( 'WordPress Landing Pages was built as a platform to allow anyone to create and use their own landing page designs.', 'landing-pages'); ?></p>
<p class="about-description"><?php _e( 'Infuse your designs with powerful A/B testing functionality and give clients the ability to edit options on the backend with ease.', 'landing-pages'); ?></p>
<h1 style="text-decoration: none; text-align: center;"><a target="_blank" id="create-templates" class='button' href="http://docs.inboundnow.com/guide/creating-landing-page-templates/">Create Your Own Templates</a></h1>
<p class="about-description">WordPress Landing Pages is third party extendable. We have a variety of <a href="#documentation-pending">hooks</a>, actions, and filters to add your own functionality</p>
</div>
<div class='grid one-third' id="inbound-contribute" style="text-align: center;">
<p class="about-description" style=""><a href="https://github.com/inboundnow/landing-pages" target="_blank"><b>Contribute Code</b> + <span style="font-size:21px"><b>Submit Feature Requests</b></span></a></p>
<a href="https://github.com/inboundnow/landing-pages" target="_blank"><img src="<?php echo LANDINGPAGES_URLPATH;?>assets/images/github-help.jpg"></a>
</div>
</div>
</div>
<?php
}
public function force_permalink_flush(){
if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
return;
}
$hasFlushed = get_option( 'inbound_permalink_flush' );
if($hasFlushed) {
return;
} else {
update_option( 'inbound_permalink_flush', true);
$link = admin_url( 'options-permalink.php' );
echo "<script type='text/javascript'>
jQuery(document).ready(function($) {
var link = '$link';
setTimeout(function() {
if(window.location.href !== link) {
jQuery('#flush_permalinks').attr('src', link);
}
}, 100);
});
</script>";
echo '<iframe style="display:none;" id="flush_permalinks"></iframe>';
}
}
public function welcome() {
if ( ! get_transient( '_landing_page_activation_redirect' ) ) {
return;
}
delete_transient( '_landing_page_activation_redirect' );
if ( is_network_admin() || isset( $_GET['activate-multi'] ) ){
return;
}
wp_safe_redirect( admin_url( 'index.php?page=lp-quick-start' ) ); exit;
}
}
new LandingPages_Welcome();