Diff
checker
文本
文本
圖像
文檔
Excel
文件夾
Legal
Enterprise
桌面版
定價
登入
下載 Diffchecker 桌面版
比較文本
尋找兩個文字檔案之間的差異
工具
歷史
即時編輯器
摺疊未變更行
關閉換行
檢視
拆分
統一
比對精度
智能
單詞
字符
語法突出顯示
選擇語法
忽略
文字轉換
前往第一個差異
編輯輸入
Diffchecker Desktop
執行Diffchecker最安全的方式。取得Diffchecker桌面應用程式:您的差異永遠不會離開您的電腦!
取得桌面版
Untitled diff
建立於
9 年前
差異永不過期
清除
匯出
分享
解釋
51 刪除
行
總計
刪除
字符
總計
刪除
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
77 行
全部複製
50 新增
行
總計
新增
字符
總計
新增
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
73 行
全部複製
<?php
<?php
/**
/**
* Showcase Pro
* Showcase Pro
*
*
* This file adds the entry grid shortcode to the Showcase Pro Theme.
* This file adds the entry grid shortcode to the Showcase Pro Theme.
*
*
* @package Showcase
* @package Showcase
* @author Bloom
* @author Bloom
* @license GPL-2.0+
* @license GPL-2.0+
* @link http://my.studiopress.com/themes/showcase/
* @link http://my.studiopress.com/themes/showcase/
*/
*/
複製
已複製
複製
已複製
// Add Entry Grid Shortcode
// Add Entry Grid Shortcode
add_shortcode( 'entry-grid', 'showcase_entry_grid_shortcode' );
add_shortcode( 'entry-grid', 'showcase_entry_grid_shortcode' );
function showcase_entry_grid_shortcode( $atts ) {
function showcase_entry_grid_shortcode( $atts ) {
複製
已複製
複製
已複製
global $post;
extract( shortcode_atts( array(
'limit' => -1,
'category' => '',
'name' => '',
'type' => 'page',
'id' => $post->ID
), $atts ) );
複製
已複製
複製
已複製
$args =
array(
extract( shortcode_atts(
array(
'post_type' => $type,
'limit' => -1,
'post_parent' => ($type == 'post') ? '' : $id,
'category' => '',
'posts_per_page' => $limit,
'name' => '',
'category_name' => $category,
'type'
=> '
page
',
'order' => 'ASC',
'id'
=> get_
the_ID(),
'orderby'
=> '
menu_order
',
), $atts )
);
'paged'
=> get_
query_var( 'paged' )
);
複製
已複製
複製
已複製
global $wp
_query
;
$args = array(
'post_type' => $type,
'post_parent' => ($type === 'post') ? '' : $id,
'posts_per_page' => $limit,
'category_name' => $category,
'order' => 'ASC',
'orderby' => 'menu_order',
'paged' => get
_query
_var( 'paged' ),
)
;
複製
已複製
複製
已複製
$loop = new WP_Query( $args );
$loop = new WP_Query( $args );
複製
已複製
複製
已複製
ob_start();
ob_start();
複製
已複製
複製
已複製
$i = 0;
$i = 0;
複製
已複製
複製
已複製
while ( $loop->have_posts() ) {
while ( $loop->have_posts() ) {
複製
已複製
複製
已複製
$loop->the_post();
$loop->the_post();
複製
已複製
複製
已複製
$classes = ($i % 4 == 0) ? 'one-fourth first' : ' one-fourth';
$classes = ($i % 4 == 0) ? 'one-fourth first' : ' one-fourth';
?>
?>
<div id="post-<?php the_ID(); ?>" <?php post_class($classes) ?>>
<div id="post-<?php the_ID(); ?>" <?php post_class($classes) ?>>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'showcase' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark">
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'showcase' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark">
<div class="overlay">
<div class="overlay">
<div class="overlay-inner">
<div class="overlay-inner">
<div class="overlay-details">
<div class="overlay-details">
<?php the_title( '<h4>', '</h4>' );?>
<?php the_title( '<h4>', '</h4>' );?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php if(has_post_thumbnail()) : the_post_thumbnail( 'showcase_entry_grid' ); endif; ?>
<?php if(has_post_thumbnail()) : the_post_thumbnail( 'showcase_entry_grid' ); endif; ?>
</a>
</a>
</div>
</div>
<?php
<?php
複製
已複製
複製
已複製
$i++;
$i++;
複製
已複製
複製
已複製
}
}
複製
已複製
複製
已複製
$output = ob_get_clean
();
wp_reset_postdata
();
複製
已複製
複製
已複製
if (
$output
) {
$output
= ob_get_clean();
return '<div class="showcase-entry-grid">' . $output . '</div>';
}
複製
已複製
複製
已複製
wp_reset_query();
if ( $output ) {
return '<div class="showcase-entry-grid">' . $output . '</div>';
}
}
}
已保存差異
原始文本
開啟檔案
<?php /** * Showcase Pro * * This file adds the entry grid shortcode to the Showcase Pro Theme. * * @package Showcase * @author Bloom * @license GPL-2.0+ * @link http://my.studiopress.com/themes/showcase/ */ // Add Entry Grid Shortcode add_shortcode( 'entry-grid', 'showcase_entry_grid_shortcode' ); function showcase_entry_grid_shortcode( $atts ) { global $post; extract( shortcode_atts( array( 'limit' => -1, 'category' => '', 'name' => '', 'type' => 'page', 'id' => $post->ID ), $atts ) ); $args = array( 'post_type' => $type, 'post_parent' => ($type == 'post') ? '' : $id, 'posts_per_page' => $limit, 'category_name' => $category, 'order' => 'ASC', 'orderby' => 'menu_order', 'paged' => get_query_var( 'paged' ) ); global $wp_query; $loop = new WP_Query( $args ); ob_start(); $i = 0; while ( $loop->have_posts() ) { $loop->the_post(); $classes = ($i % 4 == 0) ? 'one-fourth first' : ' one-fourth'; ?> <div id="post-<?php the_ID(); ?>" <?php post_class($classes) ?>> <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'showcase' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"> <div class="overlay"> <div class="overlay-inner"> <div class="overlay-details"> <?php the_title( '<h4>', '</h4>' );?> </div> </div> </div> <?php if(has_post_thumbnail()) : the_post_thumbnail( 'showcase_entry_grid' ); endif; ?> </a> </div> <?php $i++; } $output = ob_get_clean(); if ( $output ) { return '<div class="showcase-entry-grid">' . $output . '</div>'; } wp_reset_query(); }
更改後文本
開啟檔案
<?php /** * Showcase Pro * * This file adds the entry grid shortcode to the Showcase Pro Theme. * * @package Showcase * @author Bloom * @license GPL-2.0+ * @link http://my.studiopress.com/themes/showcase/ */ // Add Entry Grid Shortcode add_shortcode( 'entry-grid', 'showcase_entry_grid_shortcode' ); function showcase_entry_grid_shortcode( $atts ) { extract( shortcode_atts( array( 'limit' => -1, 'category' => '', 'name' => '', 'type' => 'page', 'id' => get_the_ID(), ), $atts ) ); $args = array( 'post_type' => $type, 'post_parent' => ($type === 'post') ? '' : $id, 'posts_per_page' => $limit, 'category_name' => $category, 'order' => 'ASC', 'orderby' => 'menu_order', 'paged' => get_query_var( 'paged' ), ); $loop = new WP_Query( $args ); ob_start(); $i = 0; while ( $loop->have_posts() ) { $loop->the_post(); $classes = ($i % 4 == 0) ? 'one-fourth first' : ' one-fourth'; ?> <div id="post-<?php the_ID(); ?>" <?php post_class($classes) ?>> <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'showcase' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"> <div class="overlay"> <div class="overlay-inner"> <div class="overlay-details"> <?php the_title( '<h4>', '</h4>' );?> </div> </div> </div> <?php if(has_post_thumbnail()) : the_post_thumbnail( 'showcase_entry_grid' ); endif; ?> </a> </div> <?php $i++; } wp_reset_postdata(); $output = ob_get_clean(); if ( $output ) { return '<div class="showcase-entry-grid">' . $output . '</div>'; } }
尋找差異