'quadro-recents-widget', 'description' => __('Quadro Recent Posts with Thumbnails.', 'quadro') ); /* Widget control settings. */ $control_ops = array( 'id_base' => 'quadro-recent-posts' ); /* Create the widget. */ $this->WP_Widget( 'quadro-recent-posts', __('Quadro Recent Posts', 'quadro'), $widget_ops, $control_ops ); } /* How to display the widget on the screen */ function widget( $args, $controls ) { extract( $args ); /* Our variables from the widget settings */ $title = apply_filters('widget_title', $controls['title'] ); $post_count = $controls['post_count']; echo $before_widget; if ( $title ) echo $before_title . esc_attr( $title, 'quadro' ) . $after_title; ?>
'quadro-featured-widget', 'description' => __('Quadro Featured Post.', 'quadro') ); /* Widget control settings. */ $control_ops = array( 'id_base' => 'quadro-featured-post' ); /* Create the widget. */ $this->WP_Widget( 'quadro-featured-post', __('Quadro Featured Post', 'quadro'), $widget_ops, $control_ops ); } /* How to display the widget on the screen */ function widget( $args, $controls ) { extract( $args ); /* Our variables from the widget settings */ $title = apply_filters('widget_title', $controls['title'] ); echo $before_widget; if ( $title ) echo $before_title . esc_attr( $title, 'quadro' ) . $after_title; ?> 1, 'p' => $controls['feat_post'] ); $featposts = get_posts( $args ); foreach( $featposts as $post ) : setup_postdata($post); ?> '', 'feat_post' => 3 ); $controls = wp_parse_args( (array) $controls, $defaults ); ?>
'post', 'posts_per_page' => -1 ); $select_query = get_posts( $args ); // List them if( !empty($select_query) ) : echo ''; endif; wp_reset_postdata(); ?>
(',' (',$output); $output = str_replace(')',') ',$output); return $output; } // Modify the next and prev month links in Calendar Widget add_filter('get_calendar', 'quadro_month_link'); function quadro_month_link($output) { $output = str_replace(array('«', '»'), array('←', '→'), $output); return $output; } /** * Quadro Image Widget Class. */ class quadro_image_widget extends WP_Widget { /* Widget setup */ function quadro_image_widget() { /* Widget settings */ $widget_ops = array( 'classname' => 'quadro-image-widget', 'description' => __('Quadro Image Widget.', 'quadro') ); /* Widget control settings */ $control_ops = array( 'id_base' => 'quadro-image-widget' ); /* Create the widget */ $this->WP_Widget( 'quadro-image-widget', __('Quadro Image Widget', 'quadro'), $widget_ops, $control_ops ); } /* How to display the widget on the screen */ function widget( $args, $controls ) { extract( $args ); /* Our variables from the widget settings */ $title = apply_filters('widget_title', $controls['title'] ); $image_url = $controls['image_url']; if ( $controls['image_url'] != '' ) { echo $before_widget; if ( $title ) echo $before_title . esc_attr( $title, 'quadro' ) . $after_title; ?> '', 'image_url' => '' ); $controls = wp_parse_args( (array) $controls, $defaults ); ?>