A3rr0r Pro Manager
Path:
/www/wwwroot/www.smszp.cn/wp-content/themes/boke-x/genericons
.
|
Edit
|
Rename
..
|
Edit
|
Rename
Genericons-Regular.otf
|
Edit
|
Rename
font
|
Edit
|
Rename
genericons
|
Edit
|
Rename
genericons.php
|
Edit
|
Rename
genericons_1430.php
|
Edit
|
Rename
genericons_2956.php
|
Edit
|
Rename
genericons_3816.php
|
Edit
|
Rename
genericons_3889.php
|
Edit
|
Rename
genericons_5400.php
|
Edit
|
Rename
genericons_5752.php
|
Edit
|
Rename
genericons_7903.php
|
Edit
|
Rename
'widget-boke-x-recent widget_posts_thumbnail', 'description' => __( '显示最新的文章', 'boke-x' ) ); // Create the widget. parent::__construct( 'boke_x-recent', // $this->id_base __( '» 最新的文章', 'boke-x' ), // $this->name $widget_options // $this->widget_options ); // Flush the transient. add_action( 'save_post' , array( $this, 'flush_widget_transient' ) ); add_action( 'deleted_post', array( $this, 'flush_widget_transient' ) ); add_action( 'switch_theme', array( $this, 'flush_widget_transient' ) ); } /** * Outputs the widget based on the arguments input through the widget controls. * * @since 1.0.0 */ function widget( $args, $instance ) { extract( $args ); // Output the theme's $before_widget wrapper. echo $before_widget; // If the title not empty, display it. if ( $instance['title'] ) { echo $before_title . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . $after_title; } // Posts query arguments. $args = array( 'post_type' => 'post', 'posts_per_page' => $instance['limit'], 'post__not_in' => get_option( 'sticky_posts' ) ); // globalize $wp_query global $wp_query; // process the query query_posts( $args ); $i = 1; if ( have_posts() ) { echo '
'; while ( have_posts() ) : the_post(); if($i < 2) { echo '
'; if ( has_post_thumbnail() ) { echo '
' . '
'; the_post_thumbnail('boke_x_widget_thumb'); echo '
' . '
'; } else { echo '
' . '
'; echo '
'; echo '
' . '
'; } echo '
'; boke_x_custom_title(); echo '
'; } else { echo '
'; echo '
'; boke_x_custom_title(); echo '
'; } $i++; endwhile; echo '
'; } wp_reset_query(); wp_reset_postdata(); // Close the theme's widget wrapper. echo $after_widget; } /** * Updates the widget control options for the particular instance of the widget. * * @since 1.0.0 */ function update( $new_instance, $old_instance ) { $instance = $new_instance; $instance['title'] = strip_tags( $new_instance['title'] ); $instance['limit'] = (int) $new_instance['limit']; // Delete our transient. $this->flush_widget_transient(); return $instance; } /** * Flush the transient. * * @since 1.0.0 */ function flush_widget_transient() { delete_transient( 'boke_x_recent_widget_' . $this->id ); } /** * Displays the widget control options in the Widgets admin screen. * * @since 1.0.0 */ function form( $instance ) { // Default value. $defaults = array( 'title' => esc_html__( '近期文章', 'boke-x' ), 'limit' => 6 ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>