This repository has been archived by the owner on Jul 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
68 lines (59 loc) · 1.9 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
//Use Google JS Library
if( !is_admin()){
wp_deregister_script('jquery');
wp_register_script('jquery', ("https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"), false, '1.5.0');
wp_enqueue_script('jquery');
}
//Remove WordPress Version For Security Reasons
remove_action('wp_head', 'wp_generator');
//Activate post-image functionality (WP 2.9+)
if ( function_exists( 'add_theme_support' ) )
add_theme_support( 'post-thumbnails' );
// featured image sizes
if ( function_exists( 'add_image_size' ) ) {
add_image_size( 'full-size', 9999, 9999, false );
add_image_size( 'post-image', 280, 190, true );
add_image_size( 'related-posts', 130, 100, true );
}
// Register Navigation Menus
register_nav_menus(
array(
'primary'=>__('Primary Menu'),
)
);
/// add home link to menu
function home_page_menu_args( $args ) {
$args['show_home'] = true;
return $args;
}
add_filter( 'wp_page_menu_args', 'home_page_menu_args' );
// menu fallback
function default_menu() {
require_once (TEMPLATEPATH . '/includes/default-menu.php');
}
//Add Pagination Support
include('functions/pagination.php');
//Include Theme Options
include ('function_options.php');
//Photo Gallery Shortcode
function photos( $atts, $content = null) {
$content = do_shortcode( shortcode_unautop( $content ) );
if ( '</p>' == substr( $content, 0, 4 )
and '<p>' == substr( $content, strlen( $content ) - 3 ) )
$content = substr( $content, 4, strlen( $content ) - 7 );
return '
<ul class="photo_gallery">
' . $content . '
</ul>
';
}
add_shortcode('photos', 'photos');
function img($atts, $content = null) {
extract(shortcode_atts(array(
"url" => 'http://'
), $atts));
return '<li><a class="thumb" href="'.$url.'" name="'.$content.'" title="'.$content.'"><img src="http://www.aoclarkejr.com/myphoto/wp-content/themes/MyPhoto/timthumb/timthumb.php?src='.$url.'&h=75&w=75" alt="'.$content.'" /></a></li>';
}
add_shortcode("img", "img");
?>