Esempio n. 1
0
 function testPaginateLinksWithOutTrailingSlash()
 {
     $args = array('total' => 20);
     $this->setPermalinkStructure('/%year%/%post_id%');
     $pagination = \Timber\Pagination::paginate_links($args);
     foreach ($pagination as $page) {
         if (array_key_exists('link', $page) && !empty($page['link'])) {
             $this->assertFalse(self::endsWith(substr($page['link'], -1), '/'));
         }
     }
 }
Esempio n. 2
0
 /**
  *
  * @deprecated since 1.1.2
  * @param array  $args
  * @return array
  */
 public static function paginate_links($args = array())
 {
     Helper::warn('Helper/paginate_links has been moved to Pagination/paginate_links');
     return Pagination::paginate_links($args);
 }