This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (has_post_thumbnail()) { | |
$image_url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'large'); | |
$tempalte_path = get_template_directory_uri(); | |
echo '<img src="' . $tempalte_path . '/timthumb.php?src=' . $image_url[0] . '&h=500&w=1000&zc=1" alt="' . the_title_attribute('echo=0') . '" >'; | |
echo '</a>'; | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE wp_posts SET comment_status='closed' WHERE post_date<'2011-05-01 00:00:00' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wp_generate_attachment_metadata', 'delete_fullsize_image' ); | |
function delete_fullsize_image( $metadata ) | |
{ | |
$upload_dir = wp_upload_dir(); | |
$full_image_path = trailingslashit( $upload_dir['basedir'] ) . $metadata['file']; | |
$deleted = unlink( $full_image_path ); | |
return $metadata; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (ICL_LANGUAGE_CODE == en) { | |
$showrum = '1343'; | |
} else { | |
$showrum = '1096'; | |
} ?> |