Change views pager programmatically
Try some thing like this and see if it helps

function views_pag_views_pre_build(&amp;$view) {
    if ($view-&gt;name == "pagination") {
            $view-&gt;init_pager();
            $view-&gt;set_items_per_page('10');

    }
}