Guest User

Untitled

a guest
Jul 27th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.98 KB | None | 0 0
  1. <?php
  2. function wallstreet_social_customizer( $wp_customize ) {
  3. /* Header Section */
  4. $wp_customize->add_panel( 'social_link_options', array(
  5. 'priority' => 450,
  6. 'capability' => 'edit_theme_options',
  7. 'title' => __('Social Link Setting', 'wallstreet'),
  8. ) );
  9.  
  10. //Header social Icon
  11.  
  12. $wp_customize->add_section(
  13. 'social_icon',
  14. array(
  15. 'title' => 'Social Link ',
  16. 'priority' => 400,
  17. 'panel' => 'social_link_options',
  18. )
  19. );
  20.  
  21. //Show and hide Header Social Icons
  22. $wp_customize->add_setting(
  23. 'wallstreet_pro_options[header_social_media_enabled]'
  24. ,
  25. array(
  26. 'default' => true,
  27. 'capability' => 'edit_theme_options',
  28. 'sanitize_callback' => 'sanitize_text_field',
  29. 'type' => 'option',
  30. )
  31. );
  32. $wp_customize->add_control(
  33. 'wallstreet_pro_options[header_social_media_enabled]',
  34. array(
  35. 'label' => __('Enable social media links on header section','wallstreet'),
  36. 'section' => 'social_icon',
  37. 'type' => 'checkbox',
  38. )
  39. );
  40.  
  41. //About enable/disable social icon
  42. $wp_customize->add_setting(
  43. 'wallstreet_pro_options[about_social_media_enabled]'
  44. ,
  45. array(
  46. 'default' => true,
  47. 'capability' => 'edit_theme_options',
  48. 'sanitize_callback' => 'sanitize_text_field',
  49. 'type' => 'option',
  50. )
  51. );
  52. $wp_customize->add_control(
  53. 'wallstreet_pro_options[about_social_media_enabled]',
  54. array(
  55. 'label' => __('Enable social media links on about us section','wallstreet'),
  56. 'section' => 'social_icon',
  57. 'type' => 'checkbox',
  58. )
  59. );
  60.  
  61. //Footer enable/disable social icon
  62. $wp_customize->add_setting(
  63. 'wallstreet_pro_options[footer_social_media_enabled]'
  64. ,
  65. array(
  66. 'default' => true,
  67. 'capability' => 'edit_theme_options',
  68. 'sanitize_callback' => 'sanitize_text_field',
  69. 'type' => 'option',
  70. )
  71. );
  72. $wp_customize->add_control(
  73. 'wallstreet_pro_options[footer_social_media_enabled]',
  74. array(
  75. 'label' => __('Enable social media links on Footer section','wallstreet'),
  76. 'section' => 'social_icon',
  77. 'type' => 'checkbox',
  78. )
  79. );
  80.  
  81.  
  82. //twitter link
  83.  
  84. $wp_customize->add_setting(
  85. 'wallstreet_pro_options[social_media_twitter_link]',
  86. array(
  87. 'default' => '#',
  88. 'type' => 'theme_mod',
  89. 'sanitize_callback' => 'sanitize_text_field',
  90. 'type' => 'option',
  91. )
  92.  
  93. );
  94. $wp_customize->add_control(
  95. 'wallstreet_pro_options[social_media_twitter_link]',
  96. array(
  97. 'label' => __('Twitter Profile Link:','wallstreet'),
  98. 'section' => 'social_icon',
  99. 'type' => 'text',
  100. )
  101. );
  102.  
  103. // Facebook link
  104. $wp_customize->add_setting(
  105. 'wallstreet_pro_options[social_media_facebook_link]',
  106. array(
  107. 'default' => '#',
  108. 'sanitize_callback' => 'sanitize_text_field',
  109. 'type' => 'option',
  110. )
  111.  
  112. );
  113. $wp_customize->add_control(
  114. 'wallstreet_pro_options[social_media_facebook_link]',
  115. array(
  116. 'label' => __('Facebook Profile Link:','wallstreet'),
  117. 'section' => 'social_icon',
  118. 'type' => 'text',
  119. )
  120. );
  121.  
  122. //Google plus
  123.  
  124. $wp_customize->add_setting(
  125. 'wallstreet_pro_options[social_media_googleplus_link]' ,
  126. array(
  127. 'default' => '#',
  128. 'sanitize_callback' => 'sanitize_text_field',
  129. 'type' => 'option',
  130. )
  131.  
  132. );
  133. $wp_customize->add_control(
  134. 'wallstreet_pro_options[social_media_googleplus_link]',
  135. array(
  136. 'label' => __('Google Plus Profile Link:','wallstreet'),
  137. 'section' => 'social_icon',
  138. 'type' => 'text',
  139. )
  140. );
  141.  
  142.  
  143. //Linkdin link
  144.  
  145. $wp_customize->add_setting(
  146. 'wallstreet_pro_options[social_media_linkedin_link]' ,
  147. array(
  148. 'default' => '#',
  149. 'sanitize_callback' => 'sanitize_text_field',
  150. 'type' => 'option',
  151. )
  152.  
  153. );
  154. $wp_customize->add_control(
  155. 'wallstreet_pro_options[social_media_linkedin_link]',
  156. array(
  157. 'label' => __('Linkedin Profile Link:','wallstreet'),
  158. 'section' => 'social_icon',
  159. 'type' => 'text',
  160. )
  161. );
  162.  
  163. //Pinterest Profile Link:
  164.  
  165. $wp_customize->add_setting(
  166. 'wallstreet_pro_options[social_media_pinterest_link]' ,
  167. array(
  168. 'default' => '#',
  169. 'sanitize_callback' => 'sanitize_text_field',
  170. 'type' => 'option',
  171. )
  172.  
  173. );
  174. $wp_customize->add_control(
  175. 'wallstreet_pro_options[social_media_pinterest_link]',
  176. array(
  177. 'label' => __('Pinterest Profile Link:','wallstreet'),
  178. 'section' => 'social_icon',
  179. 'type' => 'text',
  180. )
  181. );
  182.  
  183. //Youtube Profile Link:
  184.  
  185. $wp_customize->add_setting(
  186. 'wallstreet_pro_options[social_media_youtube_link]' ,
  187. array(
  188. 'default' => '#',
  189. 'sanitize_callback' => 'sanitize_text_field',
  190. 'type' => 'option',
  191. )
  192.  
  193. );
  194. $wp_customize->add_control(
  195. 'wallstreet_pro_options[social_media_youtube_link]',
  196. array(
  197. 'label' => __('Youtube Profile Link:','wallstreet'),
  198. 'section' => 'social_icon',
  199. 'type' => 'text',
  200. )
  201. );
  202.  
  203. //Skype Profile Link:
  204. $wp_customize->add_setting(
  205. 'wallstreet_pro_options[social_media_skype_link]' ,
  206. array(
  207. 'default' => '#',
  208. 'sanitize_callback' => 'sanitize_text_field',
  209. 'type' => 'option',
  210. )
  211.  
  212. );
  213. $wp_customize->add_control(
  214. 'wallstreet_pro_options[social_media_skype_link]',
  215. array(
  216. 'label' => __('Skype Profile Link:','wallstreet'),
  217. 'section' => 'social_icon',
  218. 'type' => 'text',
  219. )
  220. );
  221.  
  222. //Rss Feed Link:
  223.  
  224. $wp_customize->add_setting(
  225. 'wallstreet_pro_options[social_media_rssfeed_link]' ,
  226. array(
  227. 'default' => '#',
  228. 'sanitize_callback' => 'sanitize_text_field',
  229. 'type' => 'option',
  230. )
  231.  
  232. );
  233. $wp_customize->add_control(
  234. 'wallstreet_pro_options[social_media_rssfeed_link]',
  235. array(
  236. 'label' => __('Rss Feed Link:','wallstreet'),
  237. 'section' => 'social_icon',
  238. 'type' => 'text',
  239. )
  240. );
  241.  
  242. //WordPress Profile Link:
  243.  
  244. $wp_customize->add_setting(
  245. 'wallstreet_pro_options[social_media_wordpress_link]' ,
  246. array(
  247. 'default' => '#',
  248. 'sanitize_callback' => 'sanitize_text_field',
  249. 'type' => 'option',
  250. )
  251.  
  252. );
  253. $wp_customize->add_control(
  254. 'wallstreet_pro_options[social_media_wordpress_link]',
  255. array(
  256. 'label' => __('WordPress Profile Link::','wallstreet'),
  257. 'section' => 'social_icon',
  258. 'type' => 'text',
  259. )
  260. );
  261.  
  262. //Dropbox Profile Link:
  263.  
  264. $wp_customize->add_setting(
  265. 'wallstreet_pro_options[social_media_dropbox_link]' ,
  266. array(
  267. 'default' => '#',
  268. 'sanitize_callback' => 'sanitize_text_field',
  269. 'type' => 'option',
  270. )
  271.  
  272. );
  273. $wp_customize->add_control(
  274. 'wallstreet_pro_options[social_media_dropbox_link]',
  275. array(
  276. 'label' => __('Instagram Profile Link:','wallstreet'),
  277. 'section' => 'social_icon',
  278. 'type' => 'text',
  279. )
  280. );
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289. }
  290. add_action( 'customize_register', 'wallstreet_social_customizer' );
  291. ?>
Add Comment
Please, Sign In to add comment