cptbc_image_url

The CPT Bootstrap Carousel cptbc image url function.

Description

cptbc_image_url(); 

Usage

  1. if ( !function_exists( 'cptbc_image_url' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'cpt-bootstrap-carousel/cptbc-admin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = cptbc_image_url(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/cptbc-admin.php  
  1. function cptbc_image_url() { 
  2. global $post; 
  3. $custom = get_post_custom($post->ID); 
  4. $cptbc_image_url = isset($custom['cptbc_image_url']) ? $custom['cptbc_image_url'][0] : ''; 
  5. $cptbc_image_url_openblank = isset($custom['cptbc_image_url_openblank']) ? $custom['cptbc_image_url_openblank'][0] : '0'; 
  6. $cptbc_image_link_text = isset($custom['cptbc_image_link_text']) ? $custom['cptbc_image_link_text'][0] : ''; 
  7. ?> 
  8. <label><?php _e('Image URL', 'cpt-bootstrap-carousel'); ?>:</label> 
  9. <input name="cptbc_image_url" value="<?php echo $cptbc_image_url; ?>" /> <br /> 
  10. <small><em><?php _e('(optional - leave blank for no link)', 'cpt-bootstrap-carousel'); ?></em></small><br /><br /> 
  11.  
  12. <label><input type="checkbox" name="cptbc_image_url_openblank" <?php if($cptbc_image_url_openblank == 1) { echo ' checked="checked"'; } ?> value="1" /> <?php _e('Open link in new window?', 'cpt-bootstrap-carousel'); ?></label><br /><br /> 
  13.  
  14. <label><?php _e('Button Text', 'cpt-bootstrap-carousel'); ?>:</label> 
  15. <input name="cptbc_image_link_text" value="<?php echo $cptbc_image_link_text; ?>" /> <br /> 
  16. <small><em><?php _e('(optional - leave blank for default, only shown if using link buttons)', 'cpt-bootstrap-carousel'); ?></em></small> 
  17. <?php