ru-se.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

companion-popup.php (2977B)


      1 <div id="materialis_homepage" style="display:none; ">
      2     <div class="materialis-popup" style="">
      3         <div>
      4             <div class="materialis_cp_column">
      5                 <h3 class="materialis_title"><?php esc_html_e( 'Please Install the Materialis Companion Plugin to Enable All the Theme Features',
      6 						'materialis' ) ?></h3>
      7                 <h4><?php esc_html_e( 'Here\'s what you\'ll get:', 'materialis' ); ?></h4>
      8                 <ul class="materialis-features-list">
      9                     <li><?php esc_html_e( 'Beautiful ready-made homepage', 'materialis' ); ?></li>
     10                     <li><?php esc_html_e( 'Drag and drop page customization', 'materialis' ); ?></li>
     11                     <li><?php esc_html_e( '35+ predefined content sections', 'materialis' ); ?></li>
     12                     <li><?php esc_html_e( 'Live content editing', 'materialis' ); ?></li>
     13                     <li><?php esc_html_e( '5 header types', 'materialis' ); ?></li>
     14                     <li><?php esc_html_e( '3 footer types', 'materialis' ); ?></li>
     15                     <li><?php esc_html_e( 'and many other features', 'materialis' ); ?></li>
     16                 </ul>
     17             </div>
     18             <div class="materialis_cp_column">
     19                 <img class="popup-theme-screenshot"
     20                      src="<?php echo esc_attr( get_template_directory_uri() . "/screenshot.jpg" ) ?>"/>
     21             </div>
     22             <div class="clearfix"></div>
     23         </div>
     24         <div class="footer">
     25             <label class="disable-popup-cb">
     26 				<?php
     27 
     28 				$checkbox_atts     = "";
     29 				$is_popup_disabled = get_option( "materialis_companion_disable_popup", 0 );
     30 
     31 				if ( intval( $is_popup_disabled ) ) {
     32 					$checkbox_atts = "checked";
     33 				}
     34 
     35 				?>
     36                 <input <?php echo $checkbox_atts; ?> type="checkbox" id="disable-popup-cb"/>
     37 				<?php esc_html_e( "Don't show this popup in the future", 'materialis' ); ?>
     38             </label>
     39             <script type="text/javascript">
     40                 jQuery('.materialis-welcome-notice').on('click', '.notice-dismiss', function () {
     41                     jQuery.post(
     42                         ajaxurl,
     43                         {
     44                             value: 1,
     45                             action: "companion_disable_popup",
     46                             companion_disable_popup_wpnonce: '<?php echo wp_create_nonce( "companion_disable_popup" ); ?>'
     47                         }
     48                     )
     49                 });
     50             </script>
     51 			<?php
     52 
     53 			if ( \Materialis\Companion_Plugin::$plugin_state['installed'] ) {
     54 				$link  = \Materialis\Companion_Plugin::get_activate_link();
     55 				$label = esc_html__( 'Activate now', 'materialis' );
     56 			} else {
     57 				$link  = \Materialis\Companion_Plugin::get_install_link();
     58 				$label = esc_html__( 'Install now', 'materialis' );
     59 			}
     60 			printf( '<a class="install-now button button-primary button-hero" href="%1$s">%2$s</a>', esc_url( $link ),
     61 				$label );
     62 
     63 			?>
     64         </div>
     65     </div>
     66 </div>