WordPress.org

Plugin Directory

Changeset 490865


Ignore:
Timestamp:
01/16/12 23:33:43 (2 years ago)
Author:
eddiemoya
Message:

oops, wrong plugin

Location:
media-categories-2/trunk
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
  • media-categories-2/trunk/readme.txt

    r490863 r490865  
    1 === Category Template Hierarchy === 
     1=== Media Categories === 
    22Contributors: eddiemoya 
    33Donate link: http://eddiemoya.com 
    4 Tags: plugin, theme development, theme, template, hierarchy, category, template hierarchy, subcategory, parent category, child category, parent category, category template 
    5 Requires at least: unknown 
    6 Tested up to: 3.2.1 
     4Tags: media categories, media, category, categories, attachment categories, taxonomy, category metabox, metabox, admin, media library, media editor, attachment editor 
     5Requires at least: 3.0 
     6Tested up to: 3.3.1 
    77Stable tag: trunk 
    88 
    9 Adds parent-category.php & child-category.php to the template hierarchy with all the normal hierarchical behavior with conditional tags to match 
     9Allows users to assign categories to items in their Media Library with a clean and simplified, filterable version of the standard category meta box  
    1010 
    1111== Description == 
    1212 
    13 Adds `parent-category.php` and `child-category.php` with all the normal hierarchical behavior of the native category templates. This greatly extends the natural hierarchy of theme templates with regard to categories. Theme developers can now easily create separate templates for categories with have children, the children themselves, and categories which are neither. As a happy accident to how this was written, developers can also target templates that both are a parent, and have a parent. 
     13Allows users to assign categories to items in their Media Library with a clean and simplified, filterable version of the standard category meta box.  
     14The filter allows you to narrow your search for category as you type - this filter is not native to WordPress but is instead borrowed from Jason Corradino's  
     15[Searchable Categories](http://wordpress.org/extend/plugins/searchable-categories/) plugin. If you would like to enable this feature for your posts and pages 
     16[download his plugin here](http://wordpress.org/extend/plugins/searchable-categories/) 
    1417 
    15 Also adds `is_parent_category()` and `is_child_category()` functions for easy use in themes. 
     18== Related Plugins == 
    1619 
    17 == Developer Notes: Template Hierarchy == 
     20As stated in the description, the filtering ability in this plugin is taken from Jason Corradino's  
     21[Searchable Categories](http://wordpress.org/extend/plugins/searchable-categories/) plugin. While I do 
     22not employ the plugin directory, the javascript used for filtering is in fact derived with consent from  
     23that plugin. To enable this feature on all you category metabox, the  
     24[Searchable Categories](http://wordpress.org/extend/plugins/searchable-categories/) plugin 
    1825 
    19 What follows are the lists by which the new hierarchical elements will cascade - realize that all these lists are essentially just branches off of the existing [Template Hierarchy](http://codex.wordpress.org/Template_Hierarchy#Visual_Overview). 
     26I'd like to point out that I drew some inspiration from the ['WOS Media Categories'](http://suburbia.org.uk/page/projects.html#wos_media_categories) plugin which 
     27is not generally easy to find since its not in the plugin directory. However [WOS Media Categories](http://suburbia.org.uk/page/projects.html#wos_media_categories) 
     28was missing the clean simple to use hierarchical category interface that we are used to in 
     29WordPress. A couple of my projects were dependant that plugin, but as the scale of the project 
     30increased and the number of categories grew exponentially, the disorganized grid of checkboxes 
     31were no longer a viable option. 
    2032 
    21 If category has no children and has no parent (stand-alone category): 
    22    
    23 * `category-{slug}.php` 
    24 * `category-{term_id}.php` 
    25 * `category.php` 
    26 * `archive.php` 
    27 * `index.php` 
    28    
    29 If category is a parent (has children): 
    30    
    31 * parent-category-{slug}.php 
    32 * parent-category-{term_id}.php 
    33 * parent-category.php 
    34 * category.php 
    35 * archive.php 
    36 * index.php 
     33= TL;DR = 
     34Checkout these related plugins from which I borrowed code and drew inspiration. 
    3735 
    38 If category is a child (has a parent): 
    39    
    40 * child-category-{slug}.php 
    41 * child-category-{term_id}.php 
    42 * child-category.php 
    43 * category.php 
    44 * archive.php 
    45 * index.php 
     36* [Searchable Categories](http://wordpress.org/extend/plugins/searchable-categories/) by Jason Corradino 
     37* [WOS Media Categories](http://suburbia.org.uk/page/projects.html#wos_media_categories) by Rick Curran 
    4638 
    47  
    48 Additionally, as a happy accident, you can also target categories that are both parents and children: 
    49  
    50 * parent-child-category-{slug}.php 
    51 * parent-child-category-{term_id}.php 
    52 * parent-child-category.php 
    53 * parent-category.php 
    54 * archive.php 
    55 * index.php 
    56  
    57  
    58 == Developer Notes: Condional Tags == 
    59  
    60 With this plugin comes two additional [conditional tags](http://codex.wordpress.org/Conditional_Tags) which behave much like any other in WordPress. In a similar fashion to how one might use [is_category()](http://codex.wordpress.org/Function_Reference/is_category), developers may, with this plugin, use the following functions: 
    61  
    62  
    63 `is_parent_category()` 
    64 `is_child_category()` 
    65  
    66 = Description = 
    67 These conditional tags checks if the page being displayed is for hierarchical category that has children (e.g. is a parent category), or has a parent (is a child) respectively. They are boolean functions, meaning they return either TRUE or FALSE. 
    68  
    69 = Usage = 
    70 `<?php is_parent_category( $category ); ?>` 
    71 `<?php is_child_category( $category ); ?>` 
    72  
    73  
    74 = Parameters = 
    75  
    76 $category (integer/string/object) (optional) Category ID, Category Slug, Category Object. Default: Current Category 
    77  
    78 Note: Unlike is_category(), these functions will not take arrays of categories or category titles. I'll work on that. Sorry. 
    79  
    80 = Return Values = 
    81 (boolean) True on success, false on failure. 
    82  
    83 = Examples = 
    84 ` 
    85 is_parent_category() 
    86 is_child_category() 
    87 // When any parent/child category archive page is being displayed 
    88  
    89 is_parent_category( '9' ); 
    90 is_child_category( '9' ); 
    91 // When the archive page for Category 9 is being displayed AND its a parent/child. 
    92  
    93 is_parent_category( 'blue-cheese' ); 
    94 is_child_category( 'blue-cheese' ); 
    95 // When the archive page for the Category with Category Slug "blue-cheese" is being displayed AND its a parent/child. 
    96 ` 
    97  
    98 = Notes = 
    99 * Clearly there is a need to have is_child_category_of() and is_parent_category_of(). They will be made available in future releases. 
    100  
    101  
     39WOS is not as relevant since this plugin supplants that one, but the Searchable Categories plugin is a 
     40great simple plugin which adds very useful functionality that I think should be included in WordPress Core. 
    10241 
    10342== Installation == 
     
    10746 
    10847 
    109 == Frequently Asked Questions == 
     48== Changelog == 
    11049 
    111 = Do you have any Frequently Asked Questions? = 
    112  
    113 No. 
    114  
    115 = Why not? = 
    116  
    117 Because I only just recently released the plugin. I feel that I've done a decent job of documentation, so I can't guess what people may ask on this broadly applicable plugin. 
    118  
    119 = Can I ask you a question = 
    120  
    121 Please do! Feel free to ask on the tools provided right in the WordPress plugin directory, or on my website [eddiemoya.com](http://eddiemoya.com/) 
    122 No, plugins are not loaded during installation. For alternative solutions see  
    123 "Other manifestations, alternative solutions" on the plugin home page. 
     50= 1.0 = 
     51* Initial commit. 
Note: See TracChangeset for help on using the changeset viewer.