WordPress.org

Plugin Directory

Changeset 794870


Ignore:
Timestamp:
10/28/13 16:00:19 (6 months ago)
Author:
joedolson
Message:

Commit updated dev

Location:
my-content-management/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • my-content-management/trunk/mcm-custom-posts.php

    r775600 r794870  
    210210    $upload_mb = min($max_upload, $max_post, $memory_limit); 
    211211    $label_format = 
    212         '<div class="mcm_text_field mcm_field"><label for="%1$s"><strong>%2$s</strong></label><br />'. 
     212        '<div class="mcm_text_field mcm_field"><input type="hidden" name="%1$s" id="%1$s" value="%3$s" /><label for="%1$s"><strong>%2$s</strong></label><br />'. 
    213213        '<input style="width: 80%;" type="file" name="%1$s" id="%1$s" /><br />'. 
    214214        sprintf( __( "Upload limit: %s MB",'my-content-management' ),$upload_mb ); 
  • my-content-management/trunk/my-content-management.php

    r781388 r794870  
    66Author: Joseph C Dolson 
    77Author URI: http://www.joedolson.com 
    8 Version: 1.4.1 
     8Version: 1.4.2 
    99*/ 
    1010/*  Copyright 2011-2012  Joe Dolson (email : joe@joedolson.com) 
     
    2626if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 
    2727 
    28 $mcm_version = '1.4.1'; 
     28$mcm_version = '1.4.2'; 
    2929// Enable internationalisation 
    3030load_plugin_textdomain( 'my-content-management',false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );  
     
    165165} 
    166166 
     167 
    167168function mcm_search_custom($atts) { 
    168169    extract(shortcode_atts(array( 
     
    178179    return mcm_munge( $address ); 
    179180} 
     181 
     182function mcm_terms($atts,$content) { 
     183    extract( shortcode_atts( array( 
     184                'taxonomy'=>'', 
     185                'hide_empty'=>'false', 
     186                'show_count'=>'false' 
     187            ), $atts, 'my_terms' ) ); 
     188    return mcm_list_terms($taxonomy); 
     189} 
     190 
    180191// Shortcodes  
    181192add_shortcode('my_content','mcm_show_posts'); 
     
    183194add_shortcode('my_archive','mcm_show_archive');  
    184195add_shortcode('email','mcm_munger'); 
     196add_shortcode('my_terms','mcm_terms' ); 
    185197// Filters 
    186198//add_filter('the_content', 'mcm_pre_process_shortcode', 7); 
     
    192204add_action( 'init', 'mcm_posttypes' ); 
    193205add_action( 'admin_menu', 'mcm_add_custom_boxes' ); 
     206 
     207function mcm_list_terms( $taxonomy, $hide_empty, $show_count ) { 
     208    $hide_empty = ( $hide_empty == 'true' ) ? true : false;  
     209    $args = array( 'taxonomy' => $taxonomy, 'hide_empty'=>$hide_empty ); 
     210    $terms = get_terms( $taxonomy , $args); 
     211    $count = count($terms); $i=0; 
     212    if ($count > 0) { 
     213        $term_list = "<ul class='mcm-term-archive $taxonomy'>"; 
     214        foreach ($terms as $term) { 
     215            $i++; 
     216            $count = ( $show_count == 'true' ) ? " <span class='term-count mcm-$term->slug'>($term->count)</span>" : '';  
     217            $term_list .= '<li><a href="' . get_term_link( $term ) . '">' . $term->name . "</a>$count</li>"; 
     218        } 
     219        $term_list .= "</ul>"; 
     220        return $term_list; 
     221    } 
     222} 
    194223 
    195224//Theme support -- not having post thumbnails enabled can cause fatal errors when thumbnail is requested by info query. 
  • my-content-management/trunk/readme.txt

    r781388 r794870  
    44Tags: custom post types, post types, faq, testimonials, staff, glossary, sidebars, content management 
    55Requires at least: 3.2.1 
    6 Tested up to: 3.6.1 
     6Tested up to: 3.7.0 
    77License: GPLv2 or later 
    88Stable tag: 1.4.1 
     
    6464== Changelog == 
    6565 
     66= 1.4.2 = 
     67 
     68* Add shortcode to produce list of term category links. [my_terms taxonomy='' show_count='true/false' hide_empty='true/false'] 
     69* Bug fix in HTML file uploader (removed uploads on edit.) 
     70 
    6671= 1.4.1 = 
    6772 
     
    292297== Upgrade Notice == 
    293298 
    294  * 1.3.3 Important! Glossary Filter is no longer packaged with this plug-in. It must be downloaded separately. 
     299 * 1.4.2 I don't have a notice for 1.4.2. :) 
Note: See TracChangeset for help on using the changeset viewer.