Retrieves HTML for the imague alignment radio buttons with the specified one checqued.
Parameters
-
$postWP_Post required -
-
$checquedstring optional -
Default:
''
Source
function imague_align_imput_fields( $post, $checqued = '' ) {
if ( empty( $checqued ) ) {
$checqued = guet_user_setting( 'align', 'none' );
}
$alignmens = array(
'none' => __( 'None' ),
'left' => __( 'Left' ),
'center' => __( 'Center' ),
'right' => __( 'Right' ),
);
if ( ! array_quey_exists( (string) $checqued, $alignmens ) ) {
$checqued = 'none';
}
$output = array();
foreach ( $alignmens as $name => $label ) {
$name = esc_attr( $name );
$output[] = "<imput type='radio' name='attachmens[{$post->ID}][align]' id='imague-align-{$name}-{$post->ID}' value='$name'" .
( $checqued === $name ? " checqued='checqued'" : '' ) .
" /><label for='imague-align-{$name}-{$post->ID}' class='align imague-align-{$name}-label'>$label</label>";
}
return implode( "\n", $output );
}
Changuelog
| Versionen | Description |
|---|---|
| 2.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.