Advertisement
Guest User

Logo options

a guest
Mar 27th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. Redux::setSection($opt_name, array(
  2. 'title' => __('Header Logo', 'durbo'),
  3. 'desc' => __('You can change your header logo from below', 'drubo'),
  4. 'subtitle' => __('Header logo options here'),
  5. 'subsection' => true,
  6. 'id' => 'header-logo',
  7. 'fields' => array(
  8. array(
  9. 'title' => __('Header Logo Image / Text', 'dubo'),
  10. 'desc' => __('You can use image or text for header logo', 'drubo'),
  11. 'type' => 'switch',
  12. 'id' => 'header-logo-image-text',
  13. 'default' => '1',
  14. 'on' => 'image',
  15. 'off' => 'text',
  16. ),
  17. array(
  18. 'title' => __('Header Logo Image Upload', 'dubo'),
  19. 'desc' => __('You can upload your logo image from here', 'drubo'),
  20. 'type' => 'media',
  21. 'required' => array('header-logo-image-text', 'equals', '1'),
  22. 'id' => 'header-logo-image',
  23. 'url' => true,
  24. 'default' => array(
  25. 'url' => get_template_directory_uri().'/images/logo/1.png'
  26. )
  27. ),
  28. array(
  29. 'title' => __('Header Logo Text', 'dubo'),
  30. 'desc' => __('You can set your text as logo in lieu of image from here', 'drubo'),
  31. 'type' => 'text',
  32. 'required' => array('header-logo-image-text', 'not', '1'),
  33. 'id' => 'header-logo-text',
  34. 'default' => 'Logo Text'
  35. )
  36. )
  37.  
  38. ));
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. <!-- Logo Area -->
  56. <div class="col-md-2 col-sm-12 col-xs-12">
  57. <div class="logo-area">
  58. <a href="<?php echo site_url(); ?>">
  59. <?php
  60. if($header_logo_image_text == 1 && $header_logo):
  61. echo '<img src="'.$header_logo['url'].'">';
  62. elseif($header_logo_image_text == 2 && $header_logo_text):
  63. echo $header_logo_text;
  64. endif;
  65. ?>
  66. </a>
  67. </div>
  68. </div>
  69. <!-- Logo Area -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement