function bp_links_category_radio_options_with_all($selected_category_id = 1, $element_name = 'category', $element_class = '')
{
    do_action('bp_before_links_category_radio_options_with_all');
    // is this one selected?
    $selected = empty($selected_category_id) ? ' checked="checked"' : null;
    // has class string?
    $class_string = empty($element_class) ? null : sprintf(' class="%s"', $element_class);
    // output it
    echo sprintf('<input type="radio" name="%s" value=""%s%s />%s ', $element_name, $class_string, $selected, __('All', 'buddypress-links'));
    do_action('bp_after_links_category_radio_options_with_all');
    bp_links_category_radio_options();
}
示例#2
0
_e('Category', 'buddypress-links');
?>
		</label>
		<?php 
if (BP_LINKS_CREATE_CATEGORY_SELECT) {
    ?>
			<select name="link-category">
				<?php 
    bp_links_category_select_options(bp_get_link_details_form_category_id());
    ?>
			</select>
		<?php 
} else {
    ?>
			<?php 
    bp_links_category_radio_options(bp_get_link_details_form_category_id(), 'link-category', '');
    ?>
		<?php 
}
?>

		<label for="link-url">
			<?php 
_e('URL', 'buddypress-links');
?>
&nbsp;
		</label>
		<input type="text" name="link-url" id="link-url" value="<?php 
bp_link_details_form_url();
?>
"<?php