PluginProbe
Sight – Professional Image Gallery and Portfolio / 1.0.6
Sight – Professional Image Gallery and Portfolio v1.0.6
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8
sight / render / handler / post-area-custom.php

post-area-custom.php in Sight – Professional Image Gallery and Portfolio 1.0.6, at render/handler/post-area-custom.php

54 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Portfolio Custom
4 *
5 * @var $attributes - attributes
6 * @var $options - options
7 *
8 * @link https://codesupply.co
9 * @since 1.0.0
10 *
11 * @package Sight
12 */
13
14 $class_name = sight_portfolio_area_classes( $attributes, $options );
15
16 if ( $attributes['custom_images'] && count( $attributes['custom_images'] ) > $attributes['number_items'] ) {
17 $attributes['custom_images'] = array_slice( $attributes['custom_images'], 0, $attributes['number_items'] );
18 }
19
20 if ( $attributes['custom_images'] ) {
21 ?>
22 <div class="<?php echo esc_attr( $class_name ); ?>">
23
24 <div class="sight-portfolio-area__outer">
25 <div class="sight-portfolio-area__main" <?php sight_portfolio_area_main_attrs( $attributes, $options ); ?>>
26 <?php
27 // Start the Loop.
28 foreach ( $attributes['custom_images'] as $attachment_id ) {
29
30 // Get item project.
31 if ( wp_get_attachment_image( $attachment_id ) ) {
32
33 $portfolio_entry = new Sight_Entry( $attributes, $options );
34
35 // Set settings.
36 $portfolio_entry->attachment_id = $attachment_id;
37
38 // Init portfolio entry.
39 $portfolio_entry->init();
40
41 require apply_filters( 'sight_portfolio_item_path', SIGHT_PATH . 'render/handler/portfolio-entry.php', $attributes, $options, $portfolio_entry );
42 }
43 }
44 ?>
45 </div>
46 </div>
47 </div>
48 <?php
49 } else {
50 require SIGHT_PATH . 'render/handler/post-area-none.php';
51 }
52
53 wp_reset_postdata();
54