if( function_exists('oxygen_vsb_register_condition') ) {
oxygen_vsb_register_condition('User more than X posts', array('options'=>array(), 'custom'=>true), array('==', '!=', '>=', '<=', '>', '<'), 'sec_user_post_count_callback', 'Post');
function sec_user_post_count_callback($value, $operator) {
$counted_posts = count_user_posts(get_current_user_id(),'post');
$value = intval($value);
global $OxygenConditions;
return $OxygenConditions->eval_int($counted_posts, $value, $operator);
}
}
document.addEventListner('contextmenu', event =>{
event.preventDefault();
});
jQuery(document).ready(function($) {
const lightboxSelector = '.oxy-lightbox';
$(lightboxSelector).on('extras_lightbox:visible', function() {
// do something
});
});
const headlineFooter = document.querySelector('#headline-footer')
const fancyIcon546 = document.querySelector('#fancy_icon-546-12')
const fancyIcon588 = document.querySelector('#fancy_icon-588-12')
let rect = fancyIcon546.getBoundingClientRect();
headlineFooter.addEventListener('mouseenter',function(){
headlineFooter.style.borderTop= '4px dashed'
headlineFooter.style.borderBottom= '4px dashed'
fancyIcon546.style.transform= 'scale(1.3) rotate(47deg) translateX(' + (-50) + 'px)'
fancyIcon588.style.transform= 'scale(1.3)rotate(-47deg) translateX(' + (50) + 'px)'
})
headlineFooter.addEventListener('mouseleave',function(){
headlineFooter.style.borderTop= '3px dotted'
headlineFooter.style.borderBottom= '3px dotted'
fancyIcon546.style.transform= 'scale(1) rotate(0deg)'
fancyIcon588.style.transform= 'scale(1) rotate(0deg)'
})
<?php
$args = array(
'post_type' => array( 'photo' )
);
// The Query
$the_query = new WP_Query( $args );
// The Loop
if ( $the_query->have_posts() ) {
echo '<ul>';
while ( $the_query->have_posts() ) {
$the_query->the_post();
echo '<li>' . get_the_title() . '</li>';
$images = rwmb_meta( 'my_field_id', ['size' => 'thumbnail'], get_the_ID() ); ?>
<h3>Uploaded images</h3>
<ul>
<?php foreach ( $images as $image ) : ?>
<li><img src="<?= $image['url']; ?>"></li>
<?php endforeach ?>
</ul>
<?php
}
echo '</ul>';
} else {
// no posts found
}
/* Restore original Post Data */
wp_reset_postdata();