Actualiza listas y resaltado de sintaxis código
Detalle: - Se revisan las listas y se crea una nueva plantilla sólo para páginas recientes. - Se sustituye el plugin de resaltado de sintaxis por otro que usa Prism.js y se integra bien con Enfold. Se ajustan estilos. - Se actualizan algunos estilos básicos.
This commit is contained in:
parent
29d3a19129
commit
516b5f4413
7 changed files with 504 additions and 18 deletions
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
/**
|
||||
* Flexible Posts Widget: Old Default widget template
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* This is the ORIGINAL default template used by the plugin.
|
||||
* There is a new default template (default.php) that will be
|
||||
* used by default if no template was specified in a widget.
|
||||
*/
|
||||
|
||||
// Block direct requests
|
||||
if ( !defined('ABSPATH') )
|
||||
die('-1');
|
||||
|
||||
echo $before_widget;
|
||||
|
||||
if ( !empty($title) )
|
||||
echo $before_title . $title . $after_title;
|
||||
|
||||
if( $flexible_posts->have_posts() ):
|
||||
?>
|
||||
<ul class="dpe-flexible-posts list-pages">
|
||||
<?php while( $flexible_posts->have_posts() ) : $flexible_posts->the_post(); global $post; ?>
|
||||
<li id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<?php
|
||||
global $wp;
|
||||
$permalink = get_permalink();
|
||||
$current_url = home_url( add_query_arg( array(), $wp->request ) );
|
||||
echo '<a href="' . $permalink . ( trim( $permalink, '/' ) == $current_url ? '" class="active">' : '">' );
|
||||
if( $thumbnail == true ) {
|
||||
// If the post has a feature image, show it
|
||||
if( has_post_thumbnail() ) {
|
||||
the_post_thumbnail( $thumbsize );
|
||||
// Else if the post has a mime type that starts with "image/" then show the image directly.
|
||||
} elseif( 'image/' == substr( $post->post_mime_type, 0, 6 ) ) {
|
||||
echo wp_get_attachment_image( $post->ID, $thumbsize );
|
||||
}
|
||||
}
|
||||
?>
|
||||
<h4 class="title"><?php the_title(); ?></h4>
|
||||
<p class="meta"><?php echo 'del '; the_modified_time('d \d\e F \d\e Y'); ?></p>
|
||||
</a>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
</ul><!-- .dpe-flexible-posts -->
|
||||
<?php else: // We have no posts ?>
|
||||
<div class="dpe-flexible-posts no-posts">
|
||||
<p><?php _e( 'No post found', 'flexible-posts-widget' ); ?></p>
|
||||
</div>
|
||||
<?php
|
||||
endif; // End have_posts()
|
||||
|
||||
echo $after_widget;
|
Loading…
Add table
Add a link
Reference in a new issue