ru-se.com

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

start-with-frontpage.php (3292B)


      1 <div id="extendthemes_start_with_homepage">
      2     <div class="extendthemes-container-fluid">
      3         <div class="extendthemes-row reverse">
      4             <div class="extendthemes-col">
      5                 <div class="title">
      6                     <h1 class="">
      7 						<?php
      8 						printf(
      9 							esc_html__(
     10 								'Would you like to install the predesigned %s homepage?',
     11 								'materialis'
     12 							),
     13 							apply_filters( 'materialis_start_with_front_page_name', 'Materialis' )
     14 						);
     15 						?>
     16                     </h1>
     17 
     18                 </div>
     19 
     20                 <div>
     21                     <span>
     22                         <?php
     23                         $materialis_label = esc_html__(
     24 	                        sprintf(
     25 		                        __( 'Install %s homepage', 'materialis' ),
     26 		                        apply_filters( 'materialis_start_with_front_page_name', 'Materialis' )
     27 	                        )
     28                         );
     29 
     30                         if ( \Materialis\Companion_Plugin::$plugin_state['installed'] ) {
     31 	                        $materialis_link = \Materialis\Companion_Plugin::get_activate_link();
     32                         } else {
     33 	                        $materialis_link = \Materialis\Companion_Plugin::get_install_link();
     34                         }
     35                         printf( '<a class="button button-hero button-primary" href="%1$s" onclick="window.location=this.href;this.href=\'javascript:void(0)\';">%2$s</a>',
     36 	                        esc_url( $materialis_link ),
     37 	                        $materialis_label );
     38                         ?>
     39                     </span>
     40                     <span>
     41                         <button class="button-link maybe-later">
     42                             <?php esc_html_e(
     43 	                            'Maybe later',
     44 	                            'materialis'
     45                             ); ?>
     46                         </button>
     47                     </span>
     48                 </div>
     49                 <div>
     50                     <p class="description"><?php
     51 						esc_html_e(
     52 							sprintf(
     53 								__( 'This action will install the %s plugin', 'materialis' ),
     54 								apply_filters( 'materialis_start_with_front_page_plugin', 'Materialis Companion' )
     55 							)
     56 						)
     57 						?>
     58                     </p>
     59                 </div>
     60 
     61             </div>
     62             <div class="extendthemes-col fit">
     63                 <div class="image-wrapper"
     64 						style="background-image: url('<?php echo esc_url( get_template_directory_uri() . "/customizer/images/front-page.jpg" ) ?>');">
     65                 </div>
     66             </div>
     67         </div>
     68     </div>
     69     <script type="text/javascript">
     70         jQuery('.materialis-welcome-notice').on('click', '.notice-dismiss', function () {
     71             jQuery.post(
     72                 ajaxurl,
     73                 {
     74                     value: 1,
     75                     action: "companion_disable_popup",
     76                     companion_disable_popup_wpnonce: '<?php echo wp_create_nonce( "companion_disable_popup" ); ?>'
     77                 }
     78             )
     79         });
     80 
     81         jQuery('.maybe-later').on('click', function () {
     82             var $notice = jQuery(this).closest('.notice.is-dismissible');
     83             $notice.slideUp('fast', function () {
     84                 $notice.remove();
     85             });
     86         });
     87 
     88     </script>
     89 </div>