Advertisement
Guest User

Untitled

a guest
May 4th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <?php if ( !function_exists( 'optionsframework_init' ) ) {
  2. /*-----------------------------------------------------------------------------------*/
  3. /* Options Framework Theme
  4. /*-----------------------------------------------------------------------------------*/
  5. /* Set the file path based on whether the Options Framework Theme is a parent theme or child theme */
  6.  
  7. define('OPTIONS_FRAMEWORK_URL', get_template_directory() . '/themeOptions/admin/');
  8. define('OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/themeOptions/admin/');
  9.  
  10. require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.php');
  11. }
  12. /*
  13. * This is an example of how to add custom scripts to the options panel.
  14. * This one shows/hides the an option when a checkbox is clicked.
  15. */
  16. add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts');
  17. function optionsframework_custom_scripts() { ?>
  18. <script type="text/javascript">
  19. jQuery(document).ready(function() {
  20. jQuery('#example_showhidden').click(function() {
  21. jQuery('#section-example_text_hidden').fadeToggle(400);
  22. });
  23. if (jQuery('#example_showhidden:checked').val() !== undefined) {
  24. jQuery('#section-example_text_hidden').show();
  25. }
  26. });
  27. </script>
  28. <?php
  29. }
  30. /*
  31. * Turns off the default options panel from Twenty Eleven
  32. */
  33. add_action('after_setup_theme','remove_twentyeleven_options', 100);
  34. function remove_twentyeleven_options() {
  35. remove_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
  36. }
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement