Diff
checker
Testo
Testo
Immagini
Documenti
Excel
Cartelle
Legal
Enterprise
Applicazione per desktop
Prezzi
Accedi
Scarica Diffchecker Desktop
Confronta il testo
Trova la differenza tra due file di testo
Strumenti
Cronologia
Editor live
Comprimi invariate
Senza a capo
Layout
Diviso
Unificato
Livello di dettaglio
Intelligente
Parola
Carattere
Evidenziazione sintassi
Scegli sintassi
Ignora
Trasforma testo
Vai alla prima modifica
Modifica input
Diffchecker Desktop
Il modo più sicuro per usare Diffchecker. Ottieni l'app Diffchecker Desktop: i tuoi diff non lasciano mai il tuo computer!
Ottieni Desktop
Untitled diff
Creato
9 anni fa
Il diff non scade mai
Eliminare
Esporta
Condividere
Spiegare
51 rimozioni
Linee
Totale
Rimosso
Caratteri
Totale
Rimosso
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
77 linee
Copia tutti
50 aggiunte
Linee
Totale
Aggiunto
Caratteri
Totale
Aggiunto
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
73 linee
Copia tutti
<?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/
*/
*/
Copia
Copiato
Copia
Copiato
// 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 ) {
Copia
Copiato
Copia
Copiato
global $post;
extract( shortcode_atts( array(
'limit' => -1,
'category' => '',
'name' => '',
'type' => 'page',
'id' => $post->ID
), $atts ) );
Copia
Copiato
Copia
Copiato
$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' )
);
Copia
Copiato
Copia
Copiato
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' ),
)
;
Copia
Copiato
Copia
Copiato
$loop = new WP_Query( $args );
$loop = new WP_Query( $args );
Copia
Copiato
Copia
Copiato
ob_start();
ob_start();
Copia
Copiato
Copia
Copiato
$i = 0;
$i = 0;
Copia
Copiato
Copia
Copiato
while ( $loop->have_posts() ) {
while ( $loop->have_posts() ) {
Copia
Copiato
Copia
Copiato
$loop->the_post();
$loop->the_post();
Copia
Copiato
Copia
Copiato
$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
Copia
Copiato
Copia
Copiato
$i++;
$i++;
Copia
Copiato
Copia
Copiato
}
}
Copia
Copiato
Copia
Copiato
$output = ob_get_clean
();
wp_reset_postdata
();
Copia
Copiato
Copia
Copiato
if (
$output
) {
$output
= ob_get_clean();
return '<div class="showcase-entry-grid">' . $output . '</div>';
}
Copia
Copiato
Copia
Copiato
wp_reset_query();
if ( $output ) {
return '<div class="showcase-entry-grid">' . $output . '</div>';
}
}
}
Diff salvati
Testo originale
Apri file
<?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(); }
Testo modificato
Apri file
<?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>'; } }
Trovare la differenza