Hi again :)
I noted the pager size wasn't working as expected.
Drupal actually has it's own built in pager theme function. I've converted the pager function to use it which should save a bit of code.
Let me know if there was a specific use case I didn't think of which the older code covered.
New function:
/**
* Get a pager for the search results.
*
* @return string
* The pager HTML code.
*/
function bcse_get_pager($pageinfo) {
$html = "<div class=\"item-list bing-custom-search-engine-pager\">\n";
$per_page = $pageinfo['pagesize'];
// Initialize the pager
pager_default_initialize($pageinfo['totalresults'], $per_page);
// Show the pager
$html .= theme('pager', ['quantity' => $pageinfo['pagersize']]);
$html .= "</div>\n";
return $html;
}
I've wrapped up this change and the other mentioned in the attached zip file.
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.