Skip to content

Instantly share code, notes, and snippets.

@jackmahoney
Created July 31, 2012 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackmahoney/3214109 to your computer and use it in GitHub Desktop.
Save jackmahoney/3214109 to your computer and use it in GitHub Desktop.
Implementation of media access extension
<div class="clearfix">
<?php $metabox->the_field('cta-feature-img'); ?>
<?php $wpalchemy_media_access->setGroupName('cta-feature-img')->setInsertButtonLabel('Insert CTA Image')->setTab('type'); ?>
<p>
<span class="help">CTA Image - Please upload the Page CTA image at the dimensions: 280px x 146px</span>
<?php echo $wpalchemy_media_access->getField(array('name' => $metabox->get_the_name(), 'value' => $metabox->get_the_value())); ?>
<?php echo $wpalchemy_media_access->getButton(array('label' => 'Upload CTA Image')); ?>
<?php $metabox->the_field('cta-feature-img-meta'); ?>
<?php echo $wpalchemy_media_access->getMetaField(array('groupname'=>'cta-feature-img','name' => $metabox->get_the_name(), 'value' => $metabox->get_the_value())); ?>
</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment