Diff
checker
텍스트
텍스트
이미지
문서
Excel
폴더
Legal
Enterprise
데스크톱
요금제
로그인
데스크톱 앱 다운로드
텍스트 비교
두 텍스트 파일의 차이점을 찾아보세요
도구
기록
실시간 편집
변경 없는 행 숨기기
줄바꿈 비활성화
레이아웃
나란히 보기
합쳐 보기
비교 단위
스마트
단어
글자
구문 강조
언어 선택
제외
텍스트 변환
첫 변경으로
수정
Diffchecker Desktop
가장 안전하게 Diffchecker를 사용하는 방법. 데스크톱 앱을 사용하면 비교 데이터가 외부로 전송되지 않습니다!
데스크톱 앱 받기
Untitled diff
생성일
11년 전
비교 결과 만료 없음
초기화
내보내기
공유
설명
8 삭제
행
총
삭제
글자
총
삭제
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
71 행
복사
0 추가
행
총
추가
글자
총
추가
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
68 행
복사
<?php
<?php
/**
/**
* @package Spun
* @package Spun
* @since Spun 1.0
* @since Spun 1.0
*/
*/
/*
/*
* Get the post thumbnail; if one does not exist, try to get the first attached image.
* Get the post thumbnail; if one does not exist, try to get the first attached image.
* If no images exist, let's print the post title instead.
* If no images exist, let's print the post title instead.
*/
*/
global $post;
global $post;
$postclass = '';
$postclass = '';
$url = '';
$url = '';
$custom_link = '';
$custom_link = '';
// Get the custom link
// Get the custom link
if ( function_exists( 'get_custom_field' ) ) {
if ( function_exists( 'get_custom_field' ) ) {
$custom_link = get_custom_field( 'custom_link' );
$custom_link = get_custom_field( 'custom_link' );
} else {
} else {
$custom_link = '';
$custom_link = '';
}
}
// Check if the custom link exists
// Check if the custom link exists
if ( !empty( $custom_link ) ) {
if ( !empty( $custom_link ) ) {
복사
복사됨
복사
복사됨
//Add in "http://" if it isn't there already
//Add in "http://" if it isn't there already
if ( strpos( $custom_link,'http://') === false ){
if ( strpos( $custom_link,'http://') === false ){
$custom_link = 'http://' . $custom_link;
$custom_link = 'http://' . $custom_link;
}
}
복사
복사됨
복사
복사됨
$url = $custom_link;
$url = $custom_link;
} else {
} else {
$url = the_permalink();
$url = the_permalink();
}
}
복사
복사됨
복사
복사됨
if ( '' != get_the_post_thumbnail() ) {
if ( '' != get_the_post_thumbnail() ) {
$thumb = get_the_post_thumbnail( $post->ID, 'post-thumbnail', array( 'title' => esc_attr( get_the_title() ) ) );
$thumb = get_the_post_thumbnail( $post->ID, 'post-thumbnail', array( 'title' => esc_attr( get_the_title() ) ) );
}
}
else {
else {
$args = array(
$args = array(
'post_type' => 'attachment',
'post_type' => 'attachment',
'numberposts' => 1,
'numberposts' => 1,
'post_status' => null,
'post_status' => null,
'post_mime_type' => 'image',
'post_mime_type' => 'image',
'post_parent' => $post->ID,
'post_parent' => $post->ID,
);
);
$first_attachment = get_children( $args );
$first_attachment = get_children( $args );
if ( $first_attachment ) {
if ( $first_attachment ) {
foreach ( $first_attachment as $attachment ) {
foreach ( $first_attachment as $attachment ) {
$thumb = wp_get_attachment_image( $attachment->ID, 'post-thumbnail', false, array( 'title' => esc_attr( get_the_title() ) ) );
$thumb = wp_get_attachment_image( $attachment->ID, 'post-thumbnail', false, array( 'title' => esc_attr( get_the_title() ) ) );
}
}
}
}
else {
else {
$thumb = '<span class="no-thumbnail">' . get_the_title() . '</span>';
$thumb = '<span class="no-thumbnail">' . get_the_title() . '</span>';
$postclass = 'no-thumbnail';
$postclass = 'no-thumbnail';
}
}
복사
복사됨
복사
복사됨
}
}
?>
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( $postclass ); ?>>
<article id="post-<?php the_ID(); ?>" <?php post_class( $postclass ); ?>>
복사
복사됨
복사
복사됨
<a
href="<?php echo $url ?
>" title="<?php echo esc_attr( the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php echo $thumb; ?></a>
<a
>" title="<?php echo esc_attr( the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php echo $thumb; ?></a>
</article><!-- #post-<?php the_ID(); ?> -->
</article><!-- #post-<?php the_ID(); ?> -->
저장된 비교 결과
원본
파일 열기
<?php /** * @package Spun * @since Spun 1.0 */ /* * Get the post thumbnail; if one does not exist, try to get the first attached image. * If no images exist, let's print the post title instead. */ global $post; $postclass = ''; $url = ''; $custom_link = ''; // Get the custom link if ( function_exists( 'get_custom_field' ) ) { $custom_link = get_custom_field( 'custom_link' ); } else { $custom_link = ''; } // Check if the custom link exists if ( !empty( $custom_link ) ) { //Add in "http://" if it isn't there already if ( strpos( $custom_link,'http://') === false ){ $custom_link = 'http://' . $custom_link; } $url = $custom_link; } else { $url = the_permalink(); } if ( '' != get_the_post_thumbnail() ) { $thumb = get_the_post_thumbnail( $post->ID, 'post-thumbnail', array( 'title' => esc_attr( get_the_title() ) ) ); } else { $args = array( 'post_type' => 'attachment', 'numberposts' => 1, 'post_status' => null, 'post_mime_type' => 'image', 'post_parent' => $post->ID, ); $first_attachment = get_children( $args ); if ( $first_attachment ) { foreach ( $first_attachment as $attachment ) { $thumb = wp_get_attachment_image( $attachment->ID, 'post-thumbnail', false, array( 'title' => esc_attr( get_the_title() ) ) ); } } else { $thumb = '<span class="no-thumbnail">' . get_the_title() . '</span>'; $postclass = 'no-thumbnail'; } } ?> <article id="post-<?php the_ID(); ?>" <?php post_class( $postclass ); ?>> <a href="<?php echo $url ?>" title="<?php echo esc_attr( the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php echo $thumb; ?></a> </article><!-- #post-<?php the_ID(); ?> -->
수정본
파일 열기
<?php /** * @package Spun * @since Spun 1.0 */ /* * Get the post thumbnail; if one does not exist, try to get the first attached image. * If no images exist, let's print the post title instead. */ global $post; $postclass = ''; $url = ''; $custom_link = ''; // Get the custom link if ( function_exists( 'get_custom_field' ) ) { $custom_link = get_custom_field( 'custom_link' ); } else { $custom_link = ''; } // Check if the custom link exists if ( !empty( $custom_link ) ) { //Add in "http://" if it isn't there already if ( strpos( $custom_link,'http://') === false ){ $custom_link = 'http://' . $custom_link; } $url = $custom_link; } else { $url = the_permalink(); } if ( '' != get_the_post_thumbnail() ) { $thumb = get_the_post_thumbnail( $post->ID, 'post-thumbnail', array( 'title' => esc_attr( get_the_title() ) ) ); } else { $args = array( 'post_type' => 'attachment', 'numberposts' => 1, 'post_status' => null, 'post_mime_type' => 'image', 'post_parent' => $post->ID, ); $first_attachment = get_children( $args ); if ( $first_attachment ) { foreach ( $first_attachment as $attachment ) { $thumb = wp_get_attachment_image( $attachment->ID, 'post-thumbnail', false, array( 'title' => esc_attr( get_the_title() ) ) ); } } else { $thumb = '<span class="no-thumbnail">' . get_the_title() . '</span>'; $postclass = 'no-thumbnail'; } } ?> <article id="post-<?php the_ID(); ?>" <?php post_class( $postclass ); ?>> <a>" title="<?php echo esc_attr( the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php echo $thumb; ?></a> </article><!-- #post-<?php the_ID(); ?> -->
비교하기