Plugin Directory

Changeset 734578


Ignore:
Timestamp:
07/01/2013 10:42:54 AM (12 years ago)
Author:
Mike_Cowobo
Message:

Updating to version 0.5.1

Location:
wp-tiles
Files:
3 added
3 edited
15 copied

Legend:

Unmodified
Added
Removed
  • wp-tiles/tags/0.5.1/readme.txt

    r730881 r734578  
    66Requires at least: 3.4.2
    77Tested up to: 3.5.1
    8 Stable tag: 0.5
     8Stable tag: 0.5.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    158158== Changelog ==
    159159
     160= 0.5.1 =
     161
     162* Made all template functions pluggable
     163* Fixed dates showing date of parent post
     164
    160165= 0.5 =
     166
    161167* Updated to new version of Tiles.js
    162168* Added customizable cellpadding option
  • wp-tiles/tags/0.5.1/wp-tiles.class.php

    r730881 r734578  
    277277                        break;
    278278                    case 'date1' :
    279                         $byline = get_the_date();
     279                        $byline = $this->get_the_date( $post );
    280280                        break;
    281281                    case 'date2' :
    282                         $byline = get_the_date('d-m-Y');
     282                        $byline = $this->get_the_date( $post, 'd-m-Y' );
    283283                        break;
    284284                    case 'date3' :
    285                         $byline = get_the_date('m-d-Y');
     285                        $byline = $this->get_the_date( $post, 'm-d-Y' );
    286286                        break;
    287287                    case 'cats' :
     
    309309        }
    310310
     311        private function get_the_date( $post, $d = '' ) {
     312            $the_date = '';
     313
     314            if ( '' == $d )
     315                $the_date .= mysql2date(get_option('date_format'), $post->post_date);
     316            else
     317                $the_date .= mysql2date($d, $post->post_date);
     318
     319            return apply_filters('get_the_date', $the_date, $d);
     320        }
     321
    311322        private function HexToRGB($hex) {
    312323            $hex = ereg_replace("#", "", $hex);
     
    433444    }
    434445
    435     /**
    436      * Show the WP Tiles. Use as template tag.
    437      *      *
    438      * @param string|array $atts
    439      */
    440     function the_wp_tiles ( $atts = array() ) {
    441 
    442         // Allow $atts to be just the post_query as a string or object
    443         $atts = wp_tiles()->parse_post_query_string( $atts );
    444 
    445         // Backward compatibility - this is going out! Use the_category_wp_tiles instead
    446         if ( ( is_category() || is_single() ) && ! isset ( $atts['posts_query']['category'] ) ) {
    447             $categories = get_the_category();
    448             $cats = array();
    449             foreach ( $categories as $category ) {
    450                 $cats[] = $category->term_id;
    451             }
    452 
    453             $atts['posts_query']['category'] = implode ( ', ', $cats );
    454 
    455         }
    456 
    457         wp_tiles()->show_tiles ( $atts );
    458     }
    459 
    460     /**
    461      * Show the WP Tiles for the current category
    462      *
    463      * @since 0.4.2
    464      */
    465     function the_category_wp_tiles( $atts ) {
    466         $atts = wp_tiles()->parse_post_query_string( $atts );
    467 
    468         // If is single and no cat is given, use posts from current categories
    469         if ( ! is_category() && ! is_single() )
    470             _doing_it_wrong( 'the_wp_tiles', "Only use the_category_wp_tiles on category pages or single posts/pages", '0.4.2' );
    471         else if ( isset ( $atts['posts_query']['category'] ) && ! empty ( $atts['posts_query']['category'] ) ) {
    472             _doing_it_wrong( 'the_wp_tiles', "Don't pass a category into the_category_wp_tiles(), use the_wp_tiles() instead.", '0.4.2' );
    473         } else {
    474             $categories = get_the_category();
    475             $cats = array();
    476             foreach ( $categories as $category ) {
    477                 $cats[] = $category->term_id;
    478             }
    479 
    480             $atts['posts_query']['category'] = implode ( ', ', $cats );
    481         }
    482 
    483         wp_tiles()->show_tiles ( $atts );
    484 
    485     }
    486 
    487     /**
    488      * Show the posts in the current query.
    489      *
    490      * Can be used to replace the loop.
    491      *
    492      * @since 0.4.2
    493      */
    494     function the_loop_wp_tiles() {
    495 
    496         global $wp_query;
    497         $posts = $wp_query->get_posts();
    498 
    499         wp_tiles()->show_tiles ( $posts );
    500     }
    501 
    502446endif;
  • wp-tiles/tags/0.5.1/wp-tiles.php

    r730881 r734578  
    11<?php
     2
    23/*
    3 Plugin Name: WP Tiles
    4 Plugin URI: http://trenvo.com/wp-tiles/
    5 Description: Add fully customizable dynamic tiles to your WordPress posts and pages.
    6 Version: 0.5
    7 Author: Mike Martel
    8 Author URI: http://trenvo.com
     4  Plugin Name: WP Tiles
     5  Plugin URI: http://trenvo.com/wp-tiles/
     6  Description: Add fully customizable dynamic tiles to your WordPress posts and pages.
     7  Version: 0.5.1
     8  Author: Mike Martel
     9  Author URI: http://trenvo.com
    910 */
    1011
    1112// Exit if accessed directly
    12 if (!defined('ABSPATH'))
     13if ( !defined( 'ABSPATH' ) )
    1314    exit;
    1415
     
    1819 * @since 0.1
    1920 */
    20 define('WPTILES_VERSION', '0.5');
     21define( 'WPTILES_VERSION', '0.5.1' );
    2122
    2223/**
     
    2526 * @since 0.1
    2627 */
    27 define('WPTILES_DIR', plugin_dir_path(__FILE__));
    28 define('WPTILES_URL', plugin_dir_url(__FILE__));
    29 define('WPTILES_TEMPLATES_DIR', WPTILES_DIR . 'templates/');
    30 define('WPTILES_TEMPLATES_URL', WPTILES_URL . 'templates/');
    31 define('WPTILES_INC_URL', WPTILES_URL . '_inc/');
     28define( 'WPTILES_DIR', plugin_dir_path( __FILE__ ) );
     29define( 'WPTILES_URL', plugin_dir_url( __FILE__ ) );
     30define( 'WPTILES_TEMPLATES_DIR', WPTILES_DIR . 'templates/' );
     31define( 'WPTILES_TEMPLATES_URL', WPTILES_URL . 'templates/' );
     32define( 'WPTILES_INC_URL', WPTILES_URL . '_inc/' );
    3233
    3334/**
     
    3940if ( is_admin() )
    4041    require_once ( WPTILES_DIR . '/wp-tiles-admin.php' );
     42
     43add_action( 'plugins_loaded', 'wptiles_load_pluggables' );
     44function wptiles_load_pluggables() {
     45    require_once( WPTILES_DIR . '/wp-tiles-pluggables.php' );
     46}
  • wp-tiles/trunk/readme.txt

    r730881 r734578  
    66Requires at least: 3.4.2
    77Tested up to: 3.5.1
    8 Stable tag: 0.5
     8Stable tag: 0.5.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    158158== Changelog ==
    159159
     160= 0.5.1 =
     161
     162* Made all template functions pluggable
     163* Fixed dates showing date of parent post
     164
    160165= 0.5 =
     166
    161167* Updated to new version of Tiles.js
    162168* Added customizable cellpadding option
  • wp-tiles/trunk/wp-tiles.class.php

    r730881 r734578  
    277277                        break;
    278278                    case 'date1' :
    279                         $byline = get_the_date();
     279                        $byline = $this->get_the_date( $post );
    280280                        break;
    281281                    case 'date2' :
    282                         $byline = get_the_date('d-m-Y');
     282                        $byline = $this->get_the_date( $post, 'd-m-Y' );
    283283                        break;
    284284                    case 'date3' :
    285                         $byline = get_the_date('m-d-Y');
     285                        $byline = $this->get_the_date( $post, 'm-d-Y' );
    286286                        break;
    287287                    case 'cats' :
     
    309309        }
    310310
     311        private function get_the_date( $post, $d = '' ) {
     312            $the_date = '';
     313
     314            if ( '' == $d )
     315                $the_date .= mysql2date(get_option('date_format'), $post->post_date);
     316            else
     317                $the_date .= mysql2date($d, $post->post_date);
     318
     319            return apply_filters('get_the_date', $the_date, $d);
     320        }
     321
    311322        private function HexToRGB($hex) {
    312323            $hex = ereg_replace("#", "", $hex);
     
    433444    }
    434445
    435     /**
    436      * Show the WP Tiles. Use as template tag.
    437      *      *
    438      * @param string|array $atts
    439      */
    440     function the_wp_tiles ( $atts = array() ) {
    441 
    442         // Allow $atts to be just the post_query as a string or object
    443         $atts = wp_tiles()->parse_post_query_string( $atts );
    444 
    445         // Backward compatibility - this is going out! Use the_category_wp_tiles instead
    446         if ( ( is_category() || is_single() ) && ! isset ( $atts['posts_query']['category'] ) ) {
    447             $categories = get_the_category();
    448             $cats = array();
    449             foreach ( $categories as $category ) {
    450                 $cats[] = $category->term_id;
    451             }
    452 
    453             $atts['posts_query']['category'] = implode ( ', ', $cats );
    454 
    455         }
    456 
    457         wp_tiles()->show_tiles ( $atts );
    458     }
    459 
    460     /**
    461      * Show the WP Tiles for the current category
    462      *
    463      * @since 0.4.2
    464      */
    465     function the_category_wp_tiles( $atts ) {
    466         $atts = wp_tiles()->parse_post_query_string( $atts );
    467 
    468         // If is single and no cat is given, use posts from current categories
    469         if ( ! is_category() && ! is_single() )
    470             _doing_it_wrong( 'the_wp_tiles', "Only use the_category_wp_tiles on category pages or single posts/pages", '0.4.2' );
    471         else if ( isset ( $atts['posts_query']['category'] ) && ! empty ( $atts['posts_query']['category'] ) ) {
    472             _doing_it_wrong( 'the_wp_tiles', "Don't pass a category into the_category_wp_tiles(), use the_wp_tiles() instead.", '0.4.2' );
    473         } else {
    474             $categories = get_the_category();
    475             $cats = array();
    476             foreach ( $categories as $category ) {
    477                 $cats[] = $category->term_id;
    478             }
    479 
    480             $atts['posts_query']['category'] = implode ( ', ', $cats );
    481         }
    482 
    483         wp_tiles()->show_tiles ( $atts );
    484 
    485     }
    486 
    487     /**
    488      * Show the posts in the current query.
    489      *
    490      * Can be used to replace the loop.
    491      *
    492      * @since 0.4.2
    493      */
    494     function the_loop_wp_tiles() {
    495 
    496         global $wp_query;
    497         $posts = $wp_query->get_posts();
    498 
    499         wp_tiles()->show_tiles ( $posts );
    500     }
    501 
    502446endif;
  • wp-tiles/trunk/wp-tiles.php

    r730881 r734578  
    11<?php
     2
    23/*
    3 Plugin Name: WP Tiles
    4 Plugin URI: http://trenvo.com/wp-tiles/
    5 Description: Add fully customizable dynamic tiles to your WordPress posts and pages.
    6 Version: 0.5
    7 Author: Mike Martel
    8 Author URI: http://trenvo.com
     4  Plugin Name: WP Tiles
     5  Plugin URI: http://trenvo.com/wp-tiles/
     6  Description: Add fully customizable dynamic tiles to your WordPress posts and pages.
     7  Version: 0.5.1
     8  Author: Mike Martel
     9  Author URI: http://trenvo.com
    910 */
    1011
    1112// Exit if accessed directly
    12 if (!defined('ABSPATH'))
     13if ( !defined( 'ABSPATH' ) )
    1314    exit;
    1415
     
    1819 * @since 0.1
    1920 */
    20 define('WPTILES_VERSION', '0.5');
     21define( 'WPTILES_VERSION', '0.5.1' );
    2122
    2223/**
     
    2526 * @since 0.1
    2627 */
    27 define('WPTILES_DIR', plugin_dir_path(__FILE__));
    28 define('WPTILES_URL', plugin_dir_url(__FILE__));
    29 define('WPTILES_TEMPLATES_DIR', WPTILES_DIR . 'templates/');
    30 define('WPTILES_TEMPLATES_URL', WPTILES_URL . 'templates/');
    31 define('WPTILES_INC_URL', WPTILES_URL . '_inc/');
     28define( 'WPTILES_DIR', plugin_dir_path( __FILE__ ) );
     29define( 'WPTILES_URL', plugin_dir_url( __FILE__ ) );
     30define( 'WPTILES_TEMPLATES_DIR', WPTILES_DIR . 'templates/' );
     31define( 'WPTILES_TEMPLATES_URL', WPTILES_URL . 'templates/' );
     32define( 'WPTILES_INC_URL', WPTILES_URL . '_inc/' );
    3233
    3334/**
     
    3940if ( is_admin() )
    4041    require_once ( WPTILES_DIR . '/wp-tiles-admin.php' );
     42
     43add_action( 'plugins_loaded', 'wptiles_load_pluggables' );
     44function wptiles_load_pluggables() {
     45    require_once( WPTILES_DIR . '/wp-tiles-pluggables.php' );
     46}
Note: See TracChangeset for help on using the changeset viewer.