rozanchetta

wordpress wpalchemy full-meta.php

Sep 22nd, 2011
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.86 KB | None | 0 0
  1. <?php
  2. <div class="my_meta_control">
  3.  
  4.     <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
  5.     Cras orci lorem, bibendum in pharetra ac, luctus ut mauris.</p>
  6.  
  7.     <label>Name</label>
  8.  
  9.     <p>
  10.         <input type="text" name="<?php $metabox->the_name('name'); ?>" value="<?php $metabox->the_value('name'); ?>"/>
  11.         <span>Enter in a name</span>
  12.     </p>
  13.  
  14.     <label>Description <span>(optional)</span></label>
  15.  
  16.     <p>
  17.         <?php $metabox->the_field('description'); ?>
  18.         <textarea name="<?php $metabox->the_name(); ?>" rows="3"><?php $metabox->the_value(); ?></textarea>
  19.         <span>Enter in a description</span>
  20.     </p>
  21.  
  22.     <label>Authors <span>(Enter in each authors name)</span></label>
  23.  
  24.     <?php while($metabox->have_fields('authors',3)): ?>
  25.     <p>
  26.         <input type="text" name="<?php $metabox->the_name(); ?>" value="<?php $metabox->the_value(); ?>"/>
  27.     </p>
  28.     <?php endwhile; ?>
  29.  
  30.     <label>Info</label>
  31.  
  32.     <p>
  33.         <!-- instead of using helper methods, you can also use array notation: name="custom_meta[info]" -->
  34.         <input type="text" name="<?php $metabox->the_id(); ?>[info]" value="<?php if(!empty($meta['info'])) echo $meta['info']; ?>"/>
  35.         <span>Enter in the info</span>
  36.     </p>
  37.  
  38.     <label>Links <span>(Enter in the link title and url)</span></label>
  39.  
  40.     <?php while($metabox->have_fields('links',5)): ?>
  41.     <p>
  42.         <?php $metabox->the_field('title'); ?>
  43.         <input type="text" name="<?php $metabox->the_name(); ?>" value="<?php $metabox->the_value(); ?>"/>
  44.  
  45.         <input type="text" name="<?php $metabox->the_name('url'); ?>" value="<?php $metabox->the_value('url'); ?>"/>
  46.  
  47.         <br/><?php $metabox->the_field('nofollow'); ?>
  48.         <input type="checkbox" name="<?php $metabox->the_name(); ?>" value="1"<?php if ($metabox->get_the_value()) echo ' checked="checked"'; ?>/> Use <code>nofollow</code>
  49.  
  50.         <?php $selected = ' selected="selected"'; ?>
  51.  
  52.         <br/><?php $metabox->the_field('target'); ?>
  53.         <select name="<?php $metabox->the_name(); ?>">
  54.         <option value=""></option>
  55.         <option value="_self"<?php if ($metabox->get_the_value() == '_self') echo $selected; ?>>_self</option>
  56.         <option value="_blank"<?php if ($metabox->get_the_value() == '_blank') echo $selected; ?>>_blank</option>
  57.         <option value="_parent"<?php if ($metabox->get_the_value() == '_parent') echo $selected; ?>>_parent</option>
  58.         <option value="_top"<?php if ($metabox->get_the_value() == '_top') echo $selected; ?>>_top</option>
  59.         </select>
  60.     </p>
  61.     <?php endwhile; ?>
  62.  
  63.     <p>And one field and field groups will initially display a
  64.     single field, when new values are added and extra field is
  65.     displayed allowing a user to add another value, and so on.</p>
  66.  
  67.     <label>And One... <span>(Enter in a value)</span></label>
  68.  
  69.     <?php while($metabox->have_fields_and_one('and_one')): ?>
  70.     <p>
  71.         <input type="text" name="<?php $metabox->the_name(); ?>" value="<?php $metabox->the_value(); ?>"/>
  72.     </p>
  73.     <?php endwhile; ?>
  74.  
  75.     <label>And One Group <span>(Enter in the link title and description)</span></label>
  76.  
  77.     <?php while($metabox->have_fields_and_one('and_one_group')): ?>
  78.     <p>
  79.         <?php $metabox->the_field('title'); ?>
  80.         <input type="text" name="<?php $metabox->the_name(); ?>" value="<?php $metabox->the_value(); ?>"/>
  81.        
  82.         <?php $metabox->the_field('description'); ?>
  83.         <input type="text" name="<?php $metabox->the_name(); ?>" value="<?php $metabox->the_value(); ?>"/>
  84.     </p>
  85.     <?php endwhile; ?>
  86.  
  87.     <h4>Documents</h4>
  88.  
  89.     <a style="float:right; margin:0 10px;" href="#" class="dodelete-docs button">Remove All</a>
  90.  
  91.     <p>Add documents to the library by entering in a title,
  92.     URL and selecting a level of access. Upload new documents
  93.     using the "Add Media" box.</p>
  94.  
  95.     <?php while($mb->have_fields_and_multi('docs')): ?>
  96.     <?php $mb->the_group_open(); ?>
  97.  
  98.         <?php $mb->the_field('title'); ?>
  99.         <label>Title and URL</label>
  100.         <p><input type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/></p>
  101.  
  102.         <?php $mb->the_field('link'); ?>
  103.         <p><input type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/></p>
  104.  
  105.         <?php $mb->the_field('access'); ?>
  106.         <p><strong>Access:</strong>
  107.             <input type="radio" name="<?php $mb->the_name(); ?>" value="admin"<?php echo $mb->is_value('admin')?' checked="checked"':''; ?>/> Admin
  108.             <input type="radio" name="<?php $mb->the_name(); ?>" value="editor"<?php echo $mb->is_value('editor')?' checked="checked"':''; ?>/> Editor
  109.             <input type="radio" name="<?php $mb->the_name(); ?>" value="subscriber"<?php echo $mb->is_value('subscriber')?' checked="checked"':''; ?>/> Subscriber
  110.  
  111.             <a href="#" class="button" style="margin-left:10px;" onclick="jQuery(this).siblings().removeAttr('checked'); return false;">Remove Access</a>
  112.             <a href="#" class="dodelete button">Remove Document</a>
  113.         </p>
  114.  
  115.     <?php $mb->the_group_close(); ?>
  116.     <?php endwhile; ?>
  117.  
  118.     <p style="margin-bottom:15px; padding-top:5px;"><a href="#" class="docopy-docs button">Add Document</a></p>
  119.  
  120. </div>
Advertisement
Add Comment
Please, Sign In to add comment