Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. <?php
  2. define( 'ACF_LITE' , true ); // turn of custom fields editable options
  3.  
  4. if( !class_exists('acf') ){
  5. include_once('includes/advanced-custom-fields/acf.php' );
  6. }
  7.  
  8. if( !class_exists('acf_repeater_plugin') ) {
  9. include_once('includes/acf-repeater/acf-repeater.php' );
  10. }
  11.  
  12. if( !class_exists('acf_options_page_plugin') ) {
  13. include_once('includes/acf-options-page/acf-options-page.php' );
  14. }
  15.  
  16. /// loading theme options fields
  17. include_once("includes/advanced-custom-fields/data.php");
  18. add_theme_support('menus');
  19. add_theme_support( 'post-thumbnails' );
  20.  
  21. function image_function( $atts, $content ){
  22. $a = shortcode_atts( array( 'src' => '' ), $atts );
  23. $image = "";
  24.  
  25. $image = $a['src'];
  26.  
  27. $image ='<div class="half">
  28. <img src="'.$image.'" alt="mock" />
  29. '.$content.'
  30. </div>';
  31. return $image;
  32.  
  33. }
  34.  
  35. add_shortcode( 'image', 'image_function' );
  36.  
  37.  
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement