PluginProbe ʕ •ᴥ•ʔ
Slider Ultimate / 2.0.8
Slider Ultimate v2.0.8
trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 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 1.1.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9
ultimate-slider / views / View.Slide.UPCP.class.php
ultimate-slider / views Last commit date
Base.class.php 5 years ago View.Slide.UPCP.class.php 4 years ago View.Slide.URP.class.php 4 years ago View.Slide.WooCommerce.class.php 4 years ago View.Slide.class.php 4 years ago View.Slider.class.php 4 years ago View.class.php 4 years ago
View.Slide.UPCP.class.php
51 lines
1 <?php
2
3 /**
4 * Class to display a slide in the slider on the front end.
5 *
6 * @since 2.0.0
7 */
8 class ewdusViewSlideUPCP extends ewdusViewSlide {
9
10 /**
11 * Get the content (image, title, etc.) of the slide
12 *
13 * @since 2.0.0
14 */
15 public function get_slide_content() {
16
17 if ( empty( $this->ID ) ) { return; }
18
19 if ( ! class_exists( 'UPCP_Product' ) ) { return; }
20
21 $upcp_product_id = get_post_meta( $this->ID, "EWD_US_UPCP_Product_ID", true );
22
23 // If this is a slide that has been assigned a product, load the product, otherwise load as normal
24 $product = $upcp_product_id ? new UPCP_Product( array( 'ID' => $upcp_product_id ) ) : new UPCP_Product( array( 'ID' => $this->ID ) );
25
26 $this->title = $product->Get_Product_Name();
27 $this->filtered_content = $product->Get_Field_Value( 'Item_Description' );
28 $this->image_url = $product->Get_Field_Value( 'Item_Photo_URL' );
29 }
30
31 /**
32 * Get the initial slide css classes
33 * @since 2.0.0
34 */
35 public function slide_classes( $classes = array() ) {
36
37 $parent_classes = parent::slide_classes();
38
39 $classes = array_merge(
40 $classes,
41 $parent_classes,
42 array(
43 'upcp_slide'
44 )
45 );
46
47 return apply_filters( 'us_slide_classes', $classes, $this );
48 }
49
50 }
51