image_align_input_fields [ WordPress Function ]
image_align_input_fields ( $post, $checked = '' )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: image_link_input_fields, image_size_input_fields, get_plugin_files, comment_id_fields, image_attachment_fields_to_edit
Retrieve HTML for the image alignment radio buttons with the specified one checked.
Source
<?php
function image_align_input_fields( $post, $checked = '' ) {
if ( empty($checked) )
$checked = get_user_setting('align', 'none');
$alignments = array('none' => __('None'), 'left' => __('Left'), 'center' => __('Center'), 'right' => __('Right'));
if ( !array_key_exists( (string) $checked, $alignments ) )
$checked = 'none';
$out = array();
foreach ( $alignments as $name => $label ) {
$name = esc_attr($name);
$out[] = "<input type='radio' name='attachments[{$post->ID}][align]' id='image-align-{$name}-{$post->ID}' value='$name'".
( $checked == $name ? " checked='checked'" : "" ) .
" /><label for='image-align-{$name}-{$post->ID}' class='align image-align-{$name}-label'>$label</label>";
}
return join("\n", $out);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Docs for page media.php
Retrieve HTML for the image alignment radio buttons with the specified one checked. since: 2.7.0. unknown image_align_input_fields (unknown_type $post, ...
phpdoc.wordpress.org - PHPXRef 0.7 : WordPress : Detail view of media.php
image_align_input_fields() image_size_input_fields() ...
phpxref.ftwr.co.uk - image_attachment_fields_to_edit | A HitchHackers guide through ...
Feb 12, 2011... 'html' => image_align_input_fields($post, get_option('image_default_align')), ); $form_fields['image-size'] = image_size_input_fields( $post, ...
hitchhackerguide.com - Wordpress Prevent Users from posting full size image uploads ...
... 'html' => image_align_input_fields($post, get_option('image_default_align')), ); $form_fields['image-size'] = MY_image_size_input_fields( ...
stackoverflow.com