Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // START
- <?php if ( have_rtmedia () ) { ?>
- <ul class="rtmedia-list rtmedia-list-media <?php echo rtmedia_media_gallery_class (); ?>">
- <?php
- // Edit by Gabriel - Start
- $show = false;
- $mycred = false;
- $user_id = get_current_user_id();
- // Prevent crash if myCRED is disabled
- if ( class_exists( 'myCRED_Sell_Content_Module' ) ) {
- $mycred = new myCRED_Sell_Content_Module();
- }
- // The Loop
- while ( have_rtmedia () ) : rtmedia ();
- // If myCRED is enabled
- if ( $mycred !== false ) {
- // If user is logged in and has paid, show the content
- if ( $user_id > 0 && $mycred->user_paid( $user_id, get_the_ID() ) )
- $show = true;
- }
- if ( $show )
- include ('media-gallery-item.php');
- // You can replace this with anything you might want to show to a user who does not have access.
- else
- echo 'No access to this content.';
- endwhile;
- // Edit by Gabriel - End
- ?>
- </ul>
- <div class='rtmedia_next_prev row'>
- <!-- these links will be handled by backbone later
- -- get request parameters will be removed -->
- <?php
- // $display = '';
- // if ( rtmedia_offset () != 0 )
- // $display = 'style="display:block;"';
- // else
- // $display = 'style="display:none;"';
- ?>
- <!-- <a id="rtMedia-galary-prev" <?php //echo $display; ?> href="<?php //echo rtmedia_pagination_prev_link (); ?>"><?php //_e( 'Prev', 'rtmedia' ); ?></a>-->
- <?php
- global $rtmedia;
- $general_options = $rtmedia->options;
- if( isset( $rtmedia->options['general_display_media'] ) && $general_options[ 'general_display_media' ] == 'pagination') {
- echo rtmedia_media_pagination();
- } else {
- $display = '';
- if ( rtmedia_offset () + rtmedia_per_page_media () < rtmedia_count () )
- $display = 'style="display:block;"';
- else
- $display = 'style="display:none;"';
- ?>
- <a id="rtMedia-galary-next" <?php echo $display; ?> href="<?php echo rtmedia_pagination_next_link (); ?>"><?php echo __( 'Load More', 'rtmedia' ); ?></a>
- <?php
- }
- ?>
- // FINE IF START ELSE
- </div>
- <?php } else { ?>
- <p class="rtmedia-no-media-found">
- <?php
- $message = __ ( "Oops !! There's no media found for the request !!", "rtmedia" );
- echo apply_filters('rtmedia_no_media_found_message_filter', $message);
- ?>
- </p>
- <?php } ?>
- // END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement