Advertisement
Guest User

Untitled

a guest
Sep 29th, 2015
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. <?php
  2. /**Theme Name : Quality
  3. * Theme Core Functions and Codes
  4. */
  5. /**Includes reqired resources here**/
  6. define('QUALITY_TEMPLATE_DIR_URI',get_template_directory_uri());
  7. define('QUALITY_TEMPLATE_DIR',get_template_directory());
  8. define('QUALITY_THEME_FUNCTIONS_PATH',QUALITY_TEMPLATE_DIR.'/functions');
  9. define('QUALITY_THEME_OPTIONS_PATH',QUALITY_TEMPLATE_DIR_URI.'/functions/theme_options');
  10.  
  11. require( QUALITY_THEME_FUNCTIONS_PATH . '/menu/new_Walker.php'); //NEW Walker Class Added.
  12. require_once( QUALITY_THEME_FUNCTIONS_PATH . '/scripts/scripts.php'); //Theme Scripts And Styles
  13. require( QUALITY_THEME_FUNCTIONS_PATH . '/resize_image/resize_image.php'); //Image Resizing
  14. require( QUALITY_THEME_FUNCTIONS_PATH . '/commentbox/comment-function.php'); //Comment Handling
  15. require( QUALITY_THEME_FUNCTIONS_PATH . '/widget/custom-sidebar.php'); //Sidebar Registration
  16.  
  17.  
  18. //Customizer
  19. require( QUALITY_THEME_FUNCTIONS_PATH . '/customizer/customizer-service.php');
  20. require( QUALITY_THEME_FUNCTIONS_PATH . '/customizer/customizer-slider.php');
  21. require( QUALITY_THEME_FUNCTIONS_PATH . '/customizer/customizer-copyright.php');
  22. require( QUALITY_THEME_FUNCTIONS_PATH . '/customizer/customizer-home.php');
  23. require( QUALITY_THEME_FUNCTIONS_PATH . '/customizer/customizer-project.php');
  24. require( QUALITY_THEME_FUNCTIONS_PATH . '/customizer/customizer-blog.php');
  25. require( QUALITY_THEME_FUNCTIONS_PATH . '/customizer/customizer-pro.php');
  26.  
  27.  
  28.  
  29. add_action( 'after_setup_theme', 'quality_setup' );
  30. function quality_setup()
  31. {
  32. //content width
  33. if ( ! isset( $content_width ) ) $content_width = 700;//In PX
  34. // Load text domain for translation-ready
  35. load_theme_textdomain( 'quality', QUALITY_THEME_FUNCTIONS_PATH . '/lang' );
  36. add_theme_support( "title-tag" ); //Support title tag
  37. add_theme_support( 'post-thumbnails' ); //supports featured image
  38. // This theme uses wp_nav_menu() in one location.
  39. register_nav_menu( 'primary', __( 'Primary Menu', 'quality' ) ); //Navigation
  40. // theme support
  41. add_theme_support( 'automatic-feed-links');
  42.  
  43. require_once('theme_setup_data.php');
  44. // setup admin pannel defual data for index page
  45. $quality_pro_options=theme_data_setup();
  46. }
  47. // Read more tag to formatting in blog page
  48. function quality_new_content_more($more)
  49. { global $post;
  50. return '<div class="blog-btn-col"><a href="' . get_permalink() . "#more-{$post->ID}\" class=\"qua_blog_btn\">Read More<i class='fa fa-long-arrow-right'></i></a></div>";
  51. }
  52. add_filter( 'the_content_more_link', 'quality_new_content_more' );
  53.  
  54.  
  55.  
  56. add_filter( "the_excerpt", "quality_add_class_to_excerpt" );
  57. function quality_add_class_to_excerpt( $excerpt ) {
  58. return str_replace('<p', '<p class="qua-blog-post-description"', $excerpt);
  59. }
  60.  
  61.  
  62. add_action('admin_menu', 'quality_admin_menu_pannel');
  63. function quality_admin_menu_pannel()
  64. {
  65. add_theme_page( __('Option panel','quality'), __('Option panel','quality'), 'edit_theme_options', 'option_panel', 'quality_option_page' );
  66. }
  67. function quality_option_page ()
  68. {require_once('option-panel.php');}
  69. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement