index.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. preg_match( '/^(\d+)(\.\d+)?/', WPB_VC_VERSION, $matches );
  6. $custom_tag = 'script'; // Update to wp_add_inline later
  7. ?>
  8. <div class="wrap vc-page-welcome about-wrap">
  9. <h1><?php echo sprintf( esc_html__( 'Welcome to WPBakery Page Builder %s', 'js_composer' ), esc_html( isset( $matches[0] ) ? $matches[0] : WPB_VC_VERSION ) ); ?></h1>
  10. <div class="about-text">
  11. <?php esc_html_e( 'Congratulations! You are about to use most powerful time saver for WordPress ever - page builder plugin with Frontend and Backend editors by WPBakery.', 'js_composer' ); ?>
  12. </div>
  13. <div class="wp-badge vc-page-logo">
  14. <?php echo sprintf( esc_html__( 'Version %s', 'js_composer' ), esc_html( WPB_VC_VERSION ) ); ?>
  15. </div>
  16. <p class="vc-page-actions">
  17. <?php
  18. if ( vc_user_access()
  19. ->wpAny( 'manage_options' )
  20. ->part( 'settings' )
  21. ->can( 'vc-general-tab' )
  22. ->get() && ( ! is_multisite() || ! is_main_site() )
  23. ) :
  24. ?>
  25. <a href="<?php echo esc_url( admin_url( 'admin.php?page=vc-general' ) ); ?>"
  26. class="button button-primary"><?php esc_html_e( 'Settings', 'js_composer' ); ?></a><?php endif; ?>
  27. <a href="https://twitter.com/share" class="twitter-share-button"
  28. data-via="wpbakery"
  29. data-text="Take full control over your #WordPress site with WPBakery Page Builder page builder"
  30. data-url="https://wpbakery.com" data-size="large">Tweet</a>
  31. <<?php echo esc_attr( $custom_tag ); ?>>! function ( d, s, id ) {
  32. var js, fjs = d.getElementsByTagName( s )[ 0 ], p = /^http:/.test( d.location ) ? 'http' : 'https';
  33. if ( ! d.getElementById( id ) ) {
  34. js = d.createElement( s );
  35. js.id = id;
  36. js.src = p + '://platform.twitter.com/widgets.js';
  37. fjs.parentNode.insertBefore( js, fjs );
  38. }
  39. }( document, 'script', 'twitter-wjs' );</<?php echo esc_attr( $custom_tag ); ?>>
  40. </p>
  41. <?php
  42. vc_include_template( '/pages/partials/_tabs.php', array(
  43. 'slug' => $page->getSlug(),
  44. 'active_tab' => $active_page->getSlug(),
  45. 'tabs' => $pages,
  46. ) );
  47. ?>
  48. <?php
  49. // @codingStandardsIgnoreLine
  50. print $active_page->render();
  51. ?>
  52. </div>