那是我的wordpress插件代码
$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"',
) );