Created
January 5, 2016 13:51
-
-
Save sxidsvit/117e769dccf775f9bfb6 to your computer and use it in GitHub Desktop.
Код галереи (Pinegrow bootstrap blocks for Wordpress)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <section class="content-block gallery-1 gallery-1-1"> | |
| <?php | |
| $gallery = blocks_get_gallery( get_theme_mod( 'blocks_gallery_1_1_source' ) ); | |
| ?> | |
| <div class="container"> | |
| <div class="underlined-title"> | |
| <h1><?php echo get_theme_mod( 'blocks_gallery_1_1_title', __( 'A selection of our work', 'blockdemo' ) ); ?></h1> | |
| <hr> | |
| <h2><?php echo get_theme_mod( 'blocks_gallery_1_1_subtitle', __( 'Hand-picked just for you', 'blockdemo' ) ); ?></h2> | |
| </div> | |
| <ul class="filter"> | |
| <li class="active"> | |
| <a href="#" data-filter="*"> | |
| <?php _e( 'All', 'blockdemo' ); ?> | |
| </a> | |
| </li> | |
| <?php foreach($gallery['tags'] as $tag_slug => $tag_name) : ?> | |
| <li> | |
| <a href="#" data-filter="<?php echo '.'.$tag_slug ?>"> | |
| <?php echo $tag_name ?> | |
| </a> | |
| </li> | |
| <?php endforeach; ?> | |
| </ul> | |
| <!-- /.gallery-filter --> | |
| <div class="row"> | |
| <div class="isotope-gallery-container"> | |
| <?php foreach($gallery['images'] as $image) : ?> | |
| <div class="col-md-3 col-sm-6 col-xs-12 gallery-item-wrapper <?php echo $image['tags_string'] ?>"> | |
| <div class="gallery-item"> | |
| <div class="gallery-thumb"> | |
| <img src="<?php echo $image['thumbnail'][0] ?>" class="img-responsive" alt="<?php echo $image['thumbnail']['alt'] ?>"> | |
| <div class="image-overlay"></div> | |
| <a href="<?php echo $image['image'][0] ?>" class="gallery-zoom" alt="<?php echo $image['alt'] ?>"><i class="fa fa-eye" alt="This is the title"></i></a> | |
| <a href="<?php echo $image['link'] ?>" class="gallery-link" target="_blank"><i class="fa fa-link"></i></a> | |
| </div> | |
| <div class="gallery-details"> | |
| <h5><?php echo $image['title'] ?></h5> | |
| </div> | |
| </div> | |
| </div> | |
| <?php endforeach; ?> | |
| <!-- /.gallery-item-wrapper --> | |
| <!-- /.gallery-item-wrapper --> | |
| <!-- /.gallery-item-wrapper --> | |
| <!-- /.gallery-item-wrapper --> | |
| <!-- /.gallery-item-wrapper --> | |
| <!-- /.gallery-item-wrapper --> | |
| <!-- /.gallery-item-wrapper --> | |
| </div> | |
| <!-- /.isotope-gallery-container --> | |
| </div> | |
| <!-- /.row --> | |
| </div> | |
| <!-- /.container --> | |
| </section> | |
| <!-- Functions.php section Customizer Controls --> | |
| $wp_customize->add_section( 'blocks_gallery_1_1', array( | |
| 'title' => __( 'Gallery 1-1', 'blockdemo' ) | |
| )); | |
| $wp_customize->add_setting( 'blocks_gallery_1_1_source', array( | |
| 'type' => 'theme_mod' | |
| )); | |
| $wp_customize->add_control( new WP_BlocksContentDropdown_Customize_Control( $wp_customize, 'blocks_gallery_1_1_source', array( | |
| 'label' => 'Content source (post with gallery)', | |
| 'type' => 'custom', | |
| 'section' => 'blocks_gallery_1_1' | |
| ) ) ); | |
| $wp_customize->add_setting( 'blocks_gallery_1_1_title', array( | |
| 'type' => 'theme_mod', | |
| 'default' => 'A selection of our work' | |
| )); | |
| $wp_customize->add_control( 'blocks_gallery_1_1_title', array( | |
| 'label' => __( 'Title', 'blockdemo' ), | |
| 'type' => 'text', | |
| 'section' => 'blocks_gallery_1_1' | |
| )); | |
| $wp_customize->add_setting( 'blocks_gallery_1_1_subtitle', array( | |
| 'type' => 'theme_mod', | |
| 'default' => 'Hand-picked just for you' | |
| )); | |
| $wp_customize->add_control( 'blocks_gallery_1_1_subtitle', array( | |
| 'label' => __( 'Subtitle', 'blockdemo' ), | |
| 'type' => 'textarea', | |
| 'section' => 'blocks_gallery_1_1' | |
| )); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment