Plugin Directory

Changeset 2029832


Ignore:
Timestamp:
02/13/2019 11:19:07 AM (7 years ago)
Author:
nikolam
Message:

Add pagination function

Location:
sermon-manager-for-wordpress/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • sermon-manager-for-wordpress/trunk/includes/sm-template-functions.php

    r2022760 r2029832  
    740740    return $template;
    741741}
     742
     743/**
     744 * Renders the pagination in views files.
     745 *
     746 * @since 2.15.14
     747 */
     748function sm_pagination() {
     749    if ( SermonManager::getOption( 'use_prev_next_pagination' ) ) {
     750        posts_nav_link();
     751    } else {
     752        if ( function_exists( 'wp_pagenavi' ) ) :
     753            wp_pagenavi();
     754        elseif ( function_exists( 'oceanwp_pagination' ) ) :
     755            oceanwp_pagination();
     756        elseif ( function_exists( 'pagination' ) ) :
     757            pagination();
     758        elseif ( function_exists( 'mfn_pagination' ) ) :
     759            echo mfn_pagination();
     760        elseif ( function_exists( 'presscore_complex_pagination' ) ) :
     761            presscore_complex_pagination( $GLOBALS['wp_query'] );
     762        elseif ( function_exists( 'cro_paging' ) ) :
     763            cro_paging();
     764        elseif ( function_exists( 'twentynineteen_the_posts_navigation' ) ) :
     765            twentynineteen_the_posts_navigation();
     766        elseif ( function_exists( 'exodoswp_pagination' ) ) :
     767            echo '<div class="modeltheme-pagination-holder col-md-12"><div class="modeltheme-pagination pagination">';
     768            exodoswp_pagination();
     769            echo '</div></div>';
     770        else :
     771            the_posts_pagination();
     772        endif;
     773    }
     774}
  • sermon-manager-for-wordpress/trunk/views/archive-wpfc_sermon.php

    r2016834 r2029832  
    2525
    2626    echo '<div class="sm-pagination ast-pagination">';
    27     if ( SermonManager::getOption( 'use_prev_next_pagination' ) ) {
    28         posts_nav_link();
    29     } else {
    30         if ( function_exists( 'wp_pagenavi' ) ) :
    31             wp_pagenavi();
    32         elseif ( function_exists( 'oceanwp_pagination' ) ) :
    33             oceanwp_pagination();
    34         elseif ( function_exists( 'pagination' ) ) :
    35             pagination();
    36         elseif ( function_exists( 'mfn_pagination' ) ) :
    37             echo mfn_pagination();
    38         elseif ( function_exists( 'presscore_complex_pagination' ) ) :
    39             presscore_complex_pagination( $GLOBALS['wp_query'] );
    40         elseif ( function_exists( 'cro_paging' ) ) :
    41             cro_paging();
    42         elseif ( function_exists( 'twentynineteen_the_posts_navigation' ) ) :
    43             twentynineteen_the_posts_navigation();
    44         elseif ( function_exists( 'exodoswp_pagination' ) ) :
    45             echo '<div class="modeltheme-pagination-holder col-md-12"><div class="modeltheme-pagination pagination">';
    46             exodoswp_pagination();
    47             echo '</div></div>';
    48         else :
    49             the_posts_pagination();
    50         endif;
    51     }
     27    sm_pagination();
    5228    echo '</div>';
    5329else :
  • sermon-manager-for-wordpress/trunk/views/taxonomy-wpfc_bible_book.php

    r1977462 r2029832  
    2626
    2727    echo '<div class="sm-pagination ast-pagination">';
    28     if ( SermonManager::getOption( 'use_prev_next_pagination' ) ) {
    29         posts_nav_link();
    30     } else {
    31         if ( function_exists( 'wp_pagenavi' ) ) :
    32             wp_pagenavi();
    33         elseif ( function_exists( 'oceanwp_pagination' ) ) :
    34             oceanwp_pagination();
    35         else :
    36             the_posts_pagination();
    37         endif;
    38     }
     28    sm_pagination();
    3929    echo '</div>';
    4030else :
  • sermon-manager-for-wordpress/trunk/views/taxonomy-wpfc_preacher.php

    r1977462 r2029832  
    2626
    2727    echo '<div class="sm-pagination ast-pagination">';
    28     if ( SermonManager::getOption( 'use_prev_next_pagination' ) ) {
    29         posts_nav_link();
    30     } else {
    31         if ( function_exists( 'wp_pagenavi' ) ) :
    32             wp_pagenavi();
    33         elseif ( function_exists( 'oceanwp_pagination' ) ) :
    34             oceanwp_pagination();
    35         else :
    36             the_posts_pagination();
    37         endif;
    38     }
     28    sm_pagination();
    3929    echo '</div>';
    4030else :
  • sermon-manager-for-wordpress/trunk/views/taxonomy-wpfc_sermon_series.php

    r1977462 r2029832  
    2626
    2727    echo '<div class="sm-pagination ast-pagination">';
    28     if ( SermonManager::getOption( 'use_prev_next_pagination' ) ) {
    29         posts_nav_link();
    30     } else {
    31         if ( function_exists( 'wp_pagenavi' ) ) :
    32             wp_pagenavi();
    33         elseif ( function_exists( 'oceanwp_pagination' ) ) :
    34             oceanwp_pagination();
    35         else :
    36             the_posts_pagination();
    37         endif;
    38     }
     28    sm_pagination();
    3929    echo '</div>';
    4030else :
  • sermon-manager-for-wordpress/trunk/views/taxonomy-wpfc_sermon_topics.php

    r1977462 r2029832  
    2626
    2727    echo '<div class="sm-pagination ast-pagination">';
    28     if ( SermonManager::getOption( 'use_prev_next_pagination' ) ) {
    29         posts_nav_link();
    30     } else {
    31         if ( function_exists( 'wp_pagenavi' ) ) :
    32             wp_pagenavi();
    33         elseif ( function_exists( 'oceanwp_pagination' ) ) :
    34             oceanwp_pagination();
    35         else :
    36             the_posts_pagination();
    37         endif;
    38     }
     28    sm_pagination();
    3929    echo '</div>';
    4030else :
  • sermon-manager-for-wordpress/trunk/views/taxonomy-wpfc_service_type.php

    r1977462 r2029832  
    2626
    2727    echo '<div class="sm-pagination ast-pagination">';
    28     if ( SermonManager::getOption( 'use_prev_next_pagination' ) ) {
    29         posts_nav_link();
    30     } else {
    31         if ( function_exists( 'wp_pagenavi' ) ) :
    32             wp_pagenavi();
    33         elseif ( function_exists( 'oceanwp_pagination' ) ) :
    34             oceanwp_pagination();
    35         else :
    36             the_posts_pagination();
    37         endif;
    38     }
     28    sm_pagination();
    3929    echo '</div>';
    4030else :
Note: See TracChangeset for help on using the changeset viewer.