hook

有關 hook_menu 的 title arguments

hook_menu 中有一個選項是 title arguments
page arguments 大家可能用得比較多
而使用 title arguments 的機會比較少
而 API reference 也沒有有關的例子可以參考
我便約略介紹一下

首先,有關 title 的參數有三個:
title,字符,是未經翻譯的標題,會用於 <title> 內,一般的 theme 也會在 content 用 h1 輸出
title callback,可選參數,預設是 t(),這讓上面的 title 會預設經過翻譯然後輸出,所以上面的 title 不需要使用 t() 包起來
title argument,可選參數,必需是陣列,例如array(1)

hook_apachesolr_prepare_query()

Apache solr/PHP solr client 可以使用的 development API 其實還有很多
這次介紹的是其中一個最常用的 hook_apachesolr_prepare_query()

Google