.pr_lastshown_key!==t&&parseInt(a[i].pr_lastshown_key,0),prevSlide:a[i].pr_lastshown_key!==t&&a[i].slides[a[i].pr_lastshown_key]};if(a[i].c.trigger("revolution.slide.onchange",n),a[i].c.trigger("revolution.slide.onafterswap",n),""+a[i].pr_lastshown_key!=""+a[i].pr_active_key&&"carousel"!==a[i].sliderType&&tpGS.gsap.set(n.prevSlide,{display:"none",delay:.01}),a[i].deepLinkListener||a[i].enableDeeplinkHash){var l=a.gA(a[i].slides[a[i].pr_active_key],"deeplink");l!==t&&l.length>0&&(a[i].ignoreDeeplinkChange=!0,window.location.hash=a.gA(a[i].slides[a[i].pr_active_key],"deeplink"))}a[i].pr_lastshown_key=a[i].pr_active_key,a[i].startWithSlide!==t&&"done"!==a[i].startWithSlide&&"carousel"===a[i].sliderType&&(a[i].firststart=0),a[i].duringslidechange=!1,a[i].pr_active_slide.length>0&&0!=a.gA(a[i].pr_active_slide[0],"hal")&&a.gA(a[i].pr_active_slide[0],"hal")<=a.gA(a[i].pr_active_slide[0],"sofacounter")&&a[i].c.revremoveslide(a[i].pr_active_slide.index());var d=a[i].pr_processing_key||a[i].pr_active_key||0;a[i].rowzones!=t&&(d=d>a[i].rowzones.length?a[i].rowzones.length:d),(a[i].rowzones!=t&&a[i].rowzones.length>0&&a[i].rowzones[d]!=t&&d>=0&&d<=a[i].rowzones.length&&a[i].rowzones[d].length>0||a.winH'),"horizontal"===r.style||"vertical"===r.style){if("module"===r.basedon){for(var o="",s=0;s";o+="";for(s=0;s";if(o+="","nogap"!==r.gaptype)for(s=0;s";a[i].progressC[0].innerHTML=o,!0===a[i].noDetach&&a[i].c.append(a[i].progressC),a[i].progressCBarBGS=a.getByTag(a[i].progressC[0],"RS-PROGRESS-BG"),a[i].progressCBarGAPS=a.getByTag(a[i].progressC[0],"RS-PROGRESS-GAP"),"nogap"!==r.gaptype&&tpGS.gsap.set(a[i].progressCBarGAPS,{backgroundColor:r.gapcolor,zIndex:"gapbg"===r.gaptype?17:27}),tpGS.gsap.set(a[i].progressCBarBGS,{backgroundColor:r.bgcolor})}else a[i].progressC[0].innerHTML="",!0===a[i].noDetach&&a[i].c.append(a[i].progressC);a[i].progressCBarInner=a.getByTag(a[i].progressC[0],"RS-PROGRESS-BAR"),tpGS.gsap.set(a[i].progressCBarInner,{background:r.color})}else a[i].progressC[0].innerHTML='',!0===a[i].noDetach&&a[i].c.append(a[i].progressC),a[i].progressCBarInner=a[i].progressC[0].getElementsByClassName("rs-progress-bar")[0],a[i].progressBCanvas=a[i].progressCBarInner.getContext("2d"),a[i].progressBar.degree="cw"===a[i].progressBar.style?360:0,T(i);if(!0!==a[i].noDetach&&a[i].progressC.detach(),a[i].progressBar.visibility[a[i].level]&&1!=a[i].progressBar.disableProgressBar)if("horizontal"===r.style||"vertical"===r.style){var n,l,d=a[i].slideamount-1;if("horizontal"===r.style){var c="grid"===r.alignby?a[i].gridwidth[a[i].level]:a[i].module.width;n=Math.ceil(c/a[i].slideamount),l=Math.ceil((c-d*r.gapsize)/a[i].slideamount),tpGS.gsap.set(a[i].progressC,{visibility:"visible",top:"top"===r.vertical?r.y+("grid"===r.alignby&&a[i].gridOffsetHeight!==t?Math.max(0,a[i].gridOffsetHeight):0):"center"===r.vertical?"50%":"auto",bottom:"top"===r.vertical||"center"===r.vertical?"auto":r.y+("grid"===r.alignby&&a[i].gridOffsetHeight!==t?Math.max(0,a[i].gridOffsetHeight):0),left:"left"===r.horizontal&&"grid"===r.alignby&&a[i].gridOffse WP_Post|object $post Post object.
*/
public function __construct( $post ) {
foreach ( get_object_vars( $post ) as $key => $value ) {
$this->$key = $value;
}
}
/**
* Isset-er.
*
* @since 3.5.0
*
* @param string $key Property to check if set.
* @return bool
*/
public function __isset( $key ) {
if ( 'ancestors' === $key ) {
return true;
}
if ( 'page_template' === $key ) {
return true;
}
if ( 'post_category' === $key ) {
return true;
}
if ( 'tags_input' === $key ) {
return true;
}
return metadata_exists( 'post', $this->ID, $key );
}
/**
* Getter.
*
* @since 3.5.0
*
* @param string $key Key to get.
* @return mixed
*/
public function __get( $key ) {
if ( 'page_template' === $key && $this->__isset( $key ) ) {
return get_post_meta( $this->ID, '_wp_page_template', true );
}
if ( 'post_category' === $key ) {
if ( is_object_in_taxonomy( $this->post_type, 'category' ) ) {
$terms = get_the_terms( $this, 'category' );
}
if ( empty( $terms ) ) {
return array();
}
return wp_list_pluck( $terms, 'term_id' );
}
if ( 'tags_input' === $key ) {
if ( is_object_in_taxonomy( $this->post_type, 'post_tag' ) ) {
$terms = get_the_terms( $this, 'post_tag' );
}
if ( empty( $terms ) ) {
return array();
}
return wp_list_pluck( $terms, 'name' );
}
// Rest of the values need filtering.
if ( 'ancestors' === $key ) {
$value = get_post_ancestors( $this );
} else {
$value = get_post_meta( $this->ID, $key, true );
}
if ( $this->filter ) {
$value = sanitize_post_field( $key, $value, $this->ID, $this->filter );
}
return $value;
}
/**
* {@Missing Summary}
*
* @since 3.5.0
*
* @param string $filter Filter.
* @return WP_Post
*/
public function filter( $filter ) {
if ( $this->filter === $filter ) {
return $this;
}
if ( 'raw' === $filter ) {
return self::get_instance( $this->ID );
}
return sanitize_post( $this, $filter );
}
/**
* Convert object to array.
*
* @since 3.5.0
*
* @return array Object as array.
*/
public function to_array() {
$post = get_object_vars( $this );
foreach ( array( 'ancestors', 'page_template', 'post_category', 'tags_input' ) as $key ) {
if ( $this->__isset( $key ) ) {
$post[ $key ] = $this->__get( $key );
}
}
return $post;
}
}