Diff
checker
Texto
Texto
Imágenes
Documentos
Excel
Carpetas
Legal
Enterprise
Aplicación de escritorio
Precios
Iniciar sesión
Descargar Diffchecker Desktop
Comparar texto
Encuentra la diferencia entre dos archivos de texto
Herramientas
Historial
Editor live
Ocultar sin cambios
Sin ajuste de línea
Vista
Dividido
Unificado
Nivel de detalle
Inteligente
Palabra
Letra
Resaltado de sintaxis
Elegir sintaxis
Ignorar
Transformar texto
Ir al primer cambio
Editar entrada
Diffchecker Desktop
La forma más segura de usar Diffchecker. ¡Obtén la app de Diffchecker Desktop: tus diffs nunca salen de tu computadora!
Obtener Desktop
Untitled diff
Creado
hace 9 años
El diff nunca expira
Borrar
Exportar
Compartir
Explicar
51 eliminaciones
Líneas
Total
Eliminado
Caracteres
Total
Eliminado
Para continuar usando esta función, actualice a
Diff
checker
Pro
Ver precios
77 líneas
Copiar todo
50 adiciones
Líneas
Total
Añadido
Caracteres
Total
Añadido
Para continuar usando esta función, actualice a
Diff
checker
Pro
Ver precios
73 líneas
Copiar todo
<?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/
*/
*/
Copiar
Copiado
Copiar
Copiado
// 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 ) {
Copiar
Copiado
Copiar
Copiado
global $post;
extract( shortcode_atts( array(
'limit' => -1,
'category' => '',
'name' => '',
'type' => 'page',
'id' => $post->ID
), $atts ) );
Copiar
Copiado
Copiar
Copiado
$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' )
);
Copiar
Copiado
Copiar
Copiado
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' ),
)
;
Copiar
Copiado
Copiar
Copiado
$loop = new WP_Query( $args );
$loop = new WP_Query( $args );
Copiar
Copiado
Copiar
Copiado
ob_start();
ob_start();
Copiar
Copiado
Copiar
Copiado
$i = 0;
$i = 0;
Copiar
Copiado
Copiar
Copiado
while ( $loop->have_posts() ) {
while ( $loop->have_posts() ) {
Copiar
Copiado
Copiar
Copiado
$loop->the_post();
$loop->the_post();
Copiar
Copiado
Copiar
Copiado
$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
Copiar
Copiado
Copiar
Copiado
$i++;
$i++;
Copiar
Copiado
Copiar
Copiado
}
}
Copiar
Copiado
Copiar
Copiado
$output = ob_get_clean
();
wp_reset_postdata
();
Copiar
Copiado
Copiar
Copiado
if (
$output
) {
$output
= ob_get_clean();
return '<div class="showcase-entry-grid">' . $output . '</div>';
}
Copiar
Copiado
Copiar
Copiado
wp_reset_query();
if ( $output ) {
return '<div class="showcase-entry-grid">' . $output . '</div>';
}
}
}
Diferencias guardadas
Texto original
Abrir archivo
<?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(); }
Texto modificado
Abrir archivo
<?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>'; } }
Encontrar la diferencia