2014-01-07 85 views
1

enter image description here如何在下面的PHP代碼中添加額外的類?

這是我wordpresss插件代碼

$html .= $userMeta->createInput('remember', 'checkbox', array(
    'value'   => isset($_REQUEST['remember']) ? true : false, 
    'label'   => !empty($config['remember_label']) ? $config['remember_label'] : __('Remember Me', $userMeta->name), 
    'id'   => !empty($config['remember_id']) ? $config['remember_id'] : 'remember' . $uniqueID, 
    'class'   => !empty($config['remember_class']) ? $config['remember_class'] : 'um_remember_field', 
    'enclose'  => 'p', 
));  

我要添加上<p>標籤類給予額外的樣式特別顯示無.. `

+0

任何人的建議? –

回答

3

試試這個:

$html .= $userMeta->createInput('remember', 'checkbox', array(
    'value'   => isset($_REQUEST['remember']) ? true : false, 
    'label'   => !empty($config['remember_label']) ? $config['remember_label'] : __('Remember Me', $userMeta->name), 
    'id'   => !empty($config['remember_id']) ? $config['remember_id'] : 'remember' . $uniqueID, 
    'class'   => !empty($config['remember_class']) ? $config['remember_class'] : 'um_remember_field', 
    'enclose'  => 'p class="myclass"', 
));  
+0

哇感謝您的代碼..讓我試試 –

+0

它完美的作品..感謝bro –

+0

不客氣! –

相關問題