Advertisement
Guest User

functions.php

a guest
Feb 28th, 2012
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.42 KB | None | 0 0
  1. <?php
  2. function my_file_get_contents($url) {
  3.     $ch = curl_init();
  4.     $timeout = 5; // set to zero for no timeout
  5.     curl_setopt ($ch, CURLOPT_URL, $url);
  6.     curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  7.     curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  8.     $file_contents = curl_exec($ch);
  9.     curl_close($ch);
  10.     return $file_contents;
  11. }
  12.     // Add RSS links to <head> section
  13.     automatic_feed_links();
  14.        
  15.     // Load jQuery
  16.     if ( !is_admin() ) {
  17.        wp_deregister_script('jquery');
  18.        wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"), false);
  19.        wp_enqueue_script('jquery');
  20.     }
  21.  
  22.     // Clean up the <head>
  23.     function removeHeadLinks() {
  24.         remove_action('wp_head', 'rsd_link');
  25.         remove_action('wp_head', 'wlwmanifest_link');
  26.     }
  27.     add_action('init', 'removeHeadLinks');
  28.     remove_action('wp_head', 'wp_generator');
  29.  
  30.     if (function_exists('register_sidebar')) {
  31.         register_sidebar(array(
  32.             'name' => 'Sidebar Widgets',
  33.             'id'   => 'sidebar-widgets',
  34.             'description'   => 'These are widgets for the sidebar.',
  35.             'before_widget' => '<div id="%1$s" class="widget %2$s">',
  36.             'after_widget'  => '</div>',
  37.             'before_title'  => '<h2>',
  38.             'after_title'   => '</h2>'
  39.         ));
  40.     add_theme_support( 'post-thumbnails' );
  41.     set_post_thumbnail_size( 550, 80, true );
  42.     add_image_size( 'my_thumbnail', 550, 99999, true );
  43. }  
  44. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement