We automate all our deployments here at Axelerant either through Features or via hook_update_N. In an upcoming release, there was a need to disable a custom panel page. After a little digging around in CTools module codebase, we ended up with the following code snippet.
$page = page_manager_get_page_cache('<page_name>'); // Replace <page_name> $function = ctools_plugin_get_function($page->subtask, 'enable callback'); $result = $function($page, TRUE); menu_rebuild();
This article was originally published January 3, 2014. It has been updated since then for clarity.