Guest User

Untitled

a guest
Mar 20th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.33 KB | None | 0 0
  1. // 3.0 Register another setting, "company_website"
  2. $wp_customize->add_setting( 'company_website',
  3. array(
  4. 'default' => '',
  5. 'type' => 'theme_mod',
  6. 'capability' => 'edit_theme_options',
  7. 'transport' => 'refresh',
  8. )
  9. );
  10.  
  11. // 3.1 Define an input for the new "company_website" setting
  12. $wp_customize->add_control( new WP_Customize_Control(
  13. $wp_customize,
  14. 'ts_company_website_control',
  15. array(
  16. 'label' => __( 'Company Address', 'mytheme' ),
  17. 'settings' => 'company_website',
  18. 'type' => 'text',
  19. 'section' => 'ts_company_details',
  20. )
  21. ) );
  22.  
  23.  
  24. // 3.0 Register another setting, "company_address"
  25. $wp_customize->add_setting( 'company_address',
  26. array(
  27. 'default' => '',
  28. 'type' => 'theme_mod',
  29. 'capability' => 'edit_theme_options',
  30. 'transport' => 'refresh',
  31. )
  32. );
  33.  
  34. // 3.1 Define an input for the new "company_address" setting
  35. $wp_customize->add_control( new WP_Customize_Control(
  36. $wp_customize,
  37. 'ts_company_address_control',
  38. array(
  39. 'label' => __( 'Company Address', 'mytheme' ),
  40. 'settings' => 'company_address',
  41. 'type' => 'textarea',
  42. 'section' => 'ts_company_details',
  43. )
  44. ) );
  45.  
  46.  
  47.  
  48. // 3.0 Register another setting, "copyright"
  49. $wp_customize->add_setting( 'copyright',
  50. array(
  51. 'default' => '',
  52. 'type' => 'theme_mod',
  53. 'capability' => 'edit_theme_options',
  54. 'transport' => 'refresh',
  55. )
  56. );
  57.  
  58. // 3.1 Define an input for the new "copyright" setting
  59. $wp_customize->add_control( new WP_Customize_Control(
  60. $wp_customize,
  61. 'ts_company_copyright_control',
  62. array(
  63. 'label' => __( 'Copyright', 'mytheme' ),
  64. 'settings' => 'copyright',
  65. 'type' => 'textarea',
  66. 'section' => 'ts_company_details',
  67. )
  68. ) );
  69.  
  70.  
  71. /*
  72. * Social media
  73. * Started
  74. *
  75. */
  76. // Define a new section for the Appearance -> Customize page
  77. $wp_customize->add_section( 'ts_social_details',
  78. array(
  79. 'title' => __( 'Social Media', 'liccabe_options' ),
  80. 'priority' => 1, // Determines what order this appears in (1 = top)
  81. 'capability' => 'edit_theme_options', // Capability needed to tweak
  82. 'description' => __('Set your Social Media details.', 'liccabe_options'),
  83. )
  84. );
  85. // 2.0 Register the new "company_name" setting
  86. $wp_customize->add_setting( 'liccabe_facebook', // id of the setting, no need to prefix when using 'theme_mod' as type
  87. array(
  88. 'default' => '', // Default setting/value to save
  89. 'type' => 'theme_mod', // 'theme_mod' or 'option'. [print-theme-settings] only supports theme related settings (theme_mod)
  90. 'capability' => 'edit_theme_options', // Optional. Special permissions for accessing this setting.
  91. 'transport' => 'refresh', // What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant).
  92. )
  93. );
  94. // 2.1 Define an input for the "company_name" setting
  95. $wp_customize->add_control( new WP_Customize_Control(
  96. $wp_customize,
  97. 'ts_liccabe_facebook_control', // unique ID for the control
  98. array(
  99. 'label' => __( 'Facebook URL', 'liccabe_options' ),
  100. 'settings' => 'liccabe_facebook', // id of previously created setting "company_name"
  101. 'type' => 'text',
  102. 'section' => 'ts_social_details', // ID of our "Company Details" section
  103. )
  104. ) );
  105. // 2.0 Register the new "company_name" setting
  106. $wp_customize->add_setting( 'liccabe_twitter', // id of the setting, no need to prefix when using 'theme_mod' as type
  107. array(
  108. 'default' => '', // Default setting/value to save
  109. 'type' => 'theme_mod', // 'theme_mod' or 'option'. [print-theme-settings] only supports theme related settings (theme_mod)
  110. 'capability' => 'edit_theme_options', // Optional. Special permissions for accessing this setting.
  111. 'transport' => 'refresh', // What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant).
  112. )
  113. );
  114. // 2.1 Define an input for the "company_name" setting
  115. $wp_customize->add_control( new WP_Customize_Control(
  116. $wp_customize,
  117. 'ts_liccabe_twitter_control', // unique ID for the control
  118. array(
  119. 'label' => __( 'Twitter URL', 'liccabe_options' ),
  120. 'settings' => 'liccabe_twitter', // id of previously created setting "company_name"
  121. 'type' => 'text',
  122. 'section' => 'ts_social_details', // ID of our "Company Details" section
  123. )
  124. ) );
  125. // 2.0 Register the new "company_name" setting
  126. $wp_customize->add_setting( 'liccabe_gplus', // id of the setting, no need to prefix when using 'theme_mod' as type
  127. array(
  128. 'default' => '', // Default setting/value to save
  129. 'type' => 'theme_mod', // 'theme_mod' or 'option'. [print-theme-settings] only supports theme related settings (theme_mod)
  130. 'capability' => 'edit_theme_options', // Optional. Special permissions for accessing this setting.
  131. 'transport' => 'refresh', // What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant).
  132. )
  133. );
  134. // 2.1 Define an input for the "company_name" setting
  135. $wp_customize->add_control( new WP_Customize_Control(
  136. $wp_customize,
  137. 'ts_liccabe_gplus_control', // unique ID for the control
  138. array(
  139. 'label' => __( 'Goole Plus URL', 'liccabe_options' ),
  140. 'settings' => 'liccabe_gplus', // id of previously created setting "company_name"
  141. 'type' => 'text',
  142. 'section' => 'ts_social_details', // ID of our "Company Details" section
  143. )
  144. ) );
  145. // 2.0 Register the new "company_name" setting
  146. $wp_customize->add_setting( 'liccabe_dribble', // id of the setting, no need to prefix when using 'theme_mod' as type
  147. array(
  148. 'default' => '', // Default setting/value to save
  149. 'type' => 'theme_mod', // 'theme_mod' or 'option'. [print-theme-settings] only supports theme related settings (theme_mod)
  150. 'capability' => 'edit_theme_options', // Optional. Special permissions for accessing this setting.
  151. 'transport' => 'refresh', // What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant).
  152. )
  153. );
  154. // 2.1 Define an input for the "company_name" setting
  155. $wp_customize->add_control( new WP_Customize_Control(
  156. $wp_customize,
  157. 'ts_liccabe_dribble_control', // unique ID for the control
  158. array(
  159. 'label' => __( 'Dribble URL', 'liccabe_options' ),
  160. 'settings' => 'liccabe_dribble', // id of previously created setting "company_name"
  161. 'type' => 'text',
  162. 'section' => 'ts_social_details', // ID of our "Company Details" section
  163. )
  164. ) );
  165. // 2.0 Register the new "company_name" setting
  166. $wp_customize->add_setting( 'liccabe_behance', // id of the setting, no need to prefix when using 'theme_mod' as type
  167. array(
  168. 'default' => '', // Default setting/value to save
  169. 'type' => 'theme_mod', // 'theme_mod' or 'option'. [print-theme-settings] only supports theme related settings (theme_mod)
  170. 'capability' => 'edit_theme_options', // Optional. Special permissions for accessing this setting.
  171. 'transport' => 'refresh', // What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant).
  172. )
  173. );
  174. // 2.1 Define an input for the "company_name" setting
  175. $wp_customize->add_control( new WP_Customize_Control(
  176. $wp_customize,
  177. 'ts_liccabe_behance_control', // unique ID for the control
  178. array(
  179. 'label' => __( 'Behance URL', 'liccabe_options' ),
  180. 'settings' => 'liccabe_behance', // id of previously created setting "company_name"
  181. 'type' => 'text',
  182. 'section' => 'ts_social_details', // ID of our "Company Details" section
  183. )
  184. ) );
  185.  
  186.  
  187.  
  188.  
  189. }
Add Comment
Please, Sign In to add comment