theme_links example
theme links使用实例:
$links = array( 'item1' => array( 'title' => '1st Item', 'href' => 'path/one' , 'attributes' => array()), 'item2' => array( 'title' => '2nd Item', 'href' => 'path/two' , 'attributes' => array()), ); $vars = array( 'links' => $links, 'attributes' => array('class' => 'outclass') ); print theme('links', $vars);
执行以上,将会输出如下结果: