コード例 #1
0
//**********************************************************************************
//* Taxonomies
//**********************************************************************************
//$tax_list = array("category", "group", "article-type");
$tax_list = $frontier_custom_tax;
$tax_layout_list = fp_get_tax_layout($frontier_custom_tax, $frontier_custom_tax_layout);
echo '<tr><td class="frontier_no_border">';
foreach ($tax_layout_list as $tmp_tax_name => $tmp_tax_layout) {
    if ($tmp_tax_layout != "hide") {
        // Cats_selected is set from script, but only for category
        if ($tmp_tax_name != 'category') {
            $cats_selected = wp_get_post_terms($thispost->ID, $tmp_tax_name, array("fields" => "ids"));
        }
        echo '<fieldset class="frontier_post_fieldset_tax frontier_post_fieldset_tax_' . $tmp_tax_name . '">';
        echo '<legend class="frontier_post_legend_tax" >' . fp_get_tax_label($tmp_tax_name) . '</legend>';
        frontier_tax_input($thispost->ID, $tmp_tax_name, $tmp_tax_layout, $cats_selected, $frontier_post_shortcode_parms, $tax_form_lists[$tmp_tax_name]);
        echo '</fieldset>';
        echo PHP_EOL;
    }
}
if (current_user_can('frontier_post_tags_edit') || fp_get_option_bool("fps_show_feat_img")) {
    //****************************************************************************************************
    // tags
    //****************************************************************************************************
    if (current_user_can('frontier_post_tags_edit')) {
        echo '<fieldset class="frontier_post_fieldset_tax frontier_post_fieldset_tax_tag">';
        echo '<legend>' . __("Tags", "frontier-post") . '</legend>';
        for ($i = 0; $i < $fp_tag_count; $i++) {
            $tmp_tag = isset($taglist[$i]) ? fp_tag_transform($taglist[$i]) : "";
            //$tmp_tag = array_key_exists($i, $taglist) ? fp_tag_transform($taglist[$i]) : "";
            echo '<input placeholder="' . __("Enter tag here", "frontier-post") . '" type="text" value="' . $tmp_tag . '" name="user_post_tag' . $i . '" id="user_post_tag"><br>';
コード例 #2
0
			<?php 
} else {
    ?>
				  <th class="frontier_heading" width="50%">&nbsp;</th>
			<?php 
}
?>
	  
		</tr><tr>
			<?php 
switch ($category_type) {
    case "hide":
        break;
    default:
        echo '<td class="frontier_border" width="50%"><div class="frontier-tax-box">';
        frontier_tax_input($thispost->ID, 'category', $category_type, $cats_selected, $frontier_post_shortcode_parms, $tax_form_lists['category']);
        echo '</br><div class="frontier_helptext">' . __("Select category, multiple can be selected using ctrl key", "frontier-post") . '</div>';
        echo '</td>';
        break;
}
?>
				
			<?php 
if (current_user_can('frontier_post_tags_edit')) {
    ?>
				<td class="frontier_border" width="50%">
					<input placeholder="<?php 
    _e("Enter tag here", "frontier-post");
    ?>
" type="text" value="<?php 
    if (isset($taglist[0])) {