function wcla_font_file_cb($post) { //wp_nonce_field(__FILE__, 'mma_nonce'); $files = get_post_meta($post->ID, 'wcla_font_file', true); ?> <p> <label for="wcla_font_family"><?php echo __('Font Family', 'liveart'); ?> :</label> <input type="text" id="wcla_font_family" name="wcla_font_family" value="<?php echo get_post_meta($post->ID, 'wcla_font_family', true); ?> " class="wide50pct" /> </p> <div class="note" ><?php echo __('The Font Family', 'liveart'); ?> .</div> <p> <label for="wcla_font_system_name"><?php echo __('System Name', 'liveart'); ?> :</label> <input type="text" id="wcla_font_system_name" name="wcla_font_system_name" value="<?php echo get_post_meta($post->ID, 'wcla_font_system_name', true); ?> " class="wide50pct" /> </p> <div class="note wide50pct" ><?php echo __('Need for converting. Use <b>bold</b> name from System Fonts below (font should appear there after saving)', 'liveart'); ?> .</div> <p> <label for="wcla_font_file"> <?php echo __('File(Normal)', 'liveart'); ?> : </label> <input type="file" id="wcla_font_file" name="wcla_font_file[normal_normal]" value="" /> <?php if (isset($files["normal_normal"])) { ?> <br> <span class="font-filename"><?php echo $files["normal_normal"]; ?> </span> <?php } ?> </p> <p> <label for="wcla_font_file"> <?php echo __('File(Bold)', 'liveart'); ?> : </label> <input type="file" id="wcla_font_file" name="wcla_font_file[bold_normal]" value="" /> <?php if (isset($files["bold_normal"])) { ?> <br> <span class="font-filename"><?php echo $files["bold_normal"]; ?> </span> <?php } ?> </p> <p> <label for="wcla_font_file"> <?php echo __('File(Italic)', 'liveart'); ?> : </label> <input type="file" id="wcla_font_file" name="wcla_font_file[normal_italic]" value="" /> <?php if (isset($files["normal_italic"])) { ?> <br> <span class="font-filename"><?php echo $files["normal_italic"]; ?> </span> <?php } ?> </p> <p> <label for="wcla_font_file"> <?php echo __('File(Bold & Italic)', 'liveart'); ?> : </label> <input type="file" id="wcla_font_file" name="wcla_font_file[bold_italic]" value="" /> <?php if (isset($files["bold_italic"])) { ?> <br> <span class="font-filename"><?php echo $files["bold_italic"]; ?> </span> <?php } ?> </p> <p> <label for="wcla_font_ascent"><?php echo __('Ascent', 'liveart'); ?> :</label> <input type="text" id="wcla_font_ascent" name="wcla_font_ascent" value="<?php echo get_post_meta($post->ID, 'wcla_font_ascent', true); ?> " class="wide50pct" /> </p> <p> <?php echo WCLA_Utilities::selectYesNo('wcla_font_bold_allowed', 'Bold Allowed', get_post_meta($post->ID, 'wcla_font_bold_allowed', true)); ?> </p> <p> <?php echo WCLA_Utilities::selectYesNo('wcla_font_italic_allowed', 'Italic Allowed', get_post_meta($post->ID, 'wcla_font_italic_allowed', true)); ?> </p> <p> <label for="wcla_font_vector_file"> <?php echo __('Vector File', 'liveart'); ?> : </label> <input type="file" id="wcla_font_vector_file" name="wcla_font_vector_file" value="" /> <?php if (get_post_meta($post->ID, 'wcla_font_vector_file', true)) { ?> <br> <span class="font-filename"><?php echo get_post_meta($post->ID, 'wcla_font_vector_file', true); ?> </span> <?php } ?> </p> <?php wp_nonce_field(plugin_basename(__FILE__), 'font_file_nonce'); ?> <?php }
function wcla_graphics_details_cb($post) { ?> <p> <?php if (get_post_meta($post->ID, 'wcla_graphics_file_url', true) != '') { ?> <a href="<?php echo get_post_meta($post->ID, 'wcla_graphics_file_url', true); ?> " style="float:left"><img src="<?php echo get_post_meta($post->ID, 'wcla_graphics_file_url', true); ?> " height="40" width="40"></a> <?php } ?> <label for="wcla_graphics_image_file"><?php echo __('Image', 'liveart'); ?> :</label> <input type="file" id="wcla_graphics_image_file" name="wcla_graphics_image_file" value="" accept="image/*" /> </p> <div style="clear:both"></div> <p> <?php if (get_post_meta($post->ID, 'wcla_graphics_thumb_file_url', true) != '') { ?> <a href="<?php echo get_post_meta($post->ID, 'wcla_graphics_thumb_file_url', true); ?> " style="float:left"><img src="<?php echo get_post_meta($post->ID, 'wcla_graphics_thumb_file_url', true); ?> " height="40" width="40"></a> <?php } ?> <label for="wcla_graphics_image_thumb_file"><?php echo __('Thumbnail', 'liveart'); ?> :</label> <input type="file" id="wcla_graphics_image_thumb_file" name="wcla_graphics_image_thumb_file" value="" accept="image/*"/> </p> <p> <label for="category_id"><?php echo __('Category', 'liveart'); ?> :</label> <?php echo WCLA_LAGraphics_Post_Type::getTaxonomyCombo('lagraphics_categories', 'category_id', get_post_meta($post->ID, 'wcla_graphics_category_id', true) == '' ? 0 : get_post_meta($post->ID, 'wcla_graphics_category_id', true)); ?> </p> <div class="note wide50pct" ><?php echo __('Graphic category', 'liveart'); ?> .</div> <p> <label for="wcla_graphics_desc"><?php echo __('Description', 'liveart'); ?> :</label> <textarea type="text" id="wcla_graphics_desc" name="wcla_graphics_desc" class="wide50pct" ><?php echo get_post_meta($post->ID, 'wcla_graphics_desc', true); ?> </textarea> </p> <p> <label for="wcla_graphics_price"><?php echo __('Price', 'liveart'); ?> :</label> <input type="text" id="wcla_graphics_price" name="wcla_graphics_price" value="<?php echo get_post_meta($post->ID, 'wcla_graphics_price', true); ?> " class="wide50pct"/> </p> <div class="note wide50pct" ><?php echo __('Extra price', 'liveart'); ?> </div> <p> <?php echo WCLA_Utilities::selectYesNo('wcla_graphics_colorizable', 'Colorizable', get_post_meta($post->ID, 'wcla_graphics_colorizable', true)); ?> </p> <p> <label for="wcla_graphics_colors"><?php echo __('Colors', 'liveart'); ?> :</label> <input type="text" id="wcla_graphics_colors" name="wcla_graphics_colors" value="<?php echo get_post_meta($post->ID, 'wcla_graphics_colors', true); ?> " class="wide50pct" /> </p> <div class="note wide50pct" > <ul> <li> <code class="prettyprint">"-1"</code> — <?php echo __('process colors are required, e.g. if the graphic is photo', 'liveart'); ?> ; </li> <li> <code class="prettyprint">"0"</code> — default value (need graphic to be <code class="prettyprint">Colorizable = Yes</code> and get colors information from selected fill color/outline/multicolor layers); </li> <li> <?php echo __('integer (e.g. <code class="prettyprint">"5"</code>) — number of unique graphic colors', 'liveart'); ?> ;</li> <li> <?php echo __('array of hex web colors (e.g. <code class="prettyprint">["#FFFFFF", "#000000"]</code>) — list of colors for accurate counting', 'liveart'); ?> </li> </ul> </div> <?php wp_nonce_field(plugin_basename(__FILE__), 'graphic_file_nonce'); ?> <?php }