Skip to content

Commit

Permalink
Minor template tag and shortcode updates.
Browse files Browse the repository at this point in the history
Also some minor changes to the read me files.
  • Loading branch information
Michael Sisk committed Aug 4, 2012
1 parent b28c4ad commit 16a5de6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
11 changes: 5 additions & 6 deletions -/php/shortcodes.php
Expand Up @@ -439,7 +439,7 @@ public function the_webcomic_term_link( $atts, $content, $name ) {
* // render the storyline title
* [webcomic_storyline_title]
*
* // render the title of the cvharacter with an id of 1 in the 'webcomic42' collection with a prefix
* // render the title of the character with an id of 1 in the 'webcomic42' collection with a prefix
* [webcomic_character_title term="1" collection="webcomic42"]Character: [/webcomic_character_title]
* </code>
*
Expand Down Expand Up @@ -489,13 +489,10 @@ public function webcomic_term_title( $atts, $content, $name ) {
*/
public function webcomic_term_description( $atts, $content, $name ) {
extract( shortcode_atts( array(
'prefix' => '',
'term' => 0,
'collection' => ''
), $atts ) );

$prefix = $content ? do_shortcode( $content ) : $prefix;

if ( false !== strpos( $name, 'storyline' ) ) {
$tax = 'storyline';
} else if ( false !== strpos( $name, 'character' ) ) {
Expand All @@ -504,7 +501,7 @@ public function webcomic_term_description( $atts, $content, $name ) {
$tax = '';
}

return WebcomicTag::webcomic_term_title( $prefix, $term, $collection ? "{$collection}_{$tax}" : '' );
return WebcomicTag::webcomic_term_description( $term, $collection ? "{$collection}_{$tax}" : '' );
}

/** Handle webcomic_(storyline|character)_(cover|avatar) shortcode.
Expand Down Expand Up @@ -580,10 +577,12 @@ public function webcomic_collection_title( $atts, $content, $name ) {
* </code>
*
* @param array $atts Shortcode attributes.
* @param string $content Shortcode content.
* @param string $name Shortcode name.
* @return string
* @uses WebcomicTag::webcomic_collection_description()
*/
public function webcomic_collection_description( $atts ) {
public function webcomic_collection_description( $atts, $content, $name ) {
extract( shortcode_atts( array(
'collection' => ''
), $atts ) );
Expand Down
16 changes: 8 additions & 8 deletions -/php/tags.php
Expand Up @@ -3121,7 +3121,7 @@ function previous_webcomic_link( $format = '%link', $link = '&lsaquo;', $in_same
* next_webcomic_link( '%link', '%thumbnail' );
*
* // render a link to the next webcomic in the current storylines, excluding the storyline with an ID of 42
* next_webcomic_link( '<b>%link</b>', '&lt; Previous', true, 42 );
* next_webcomic_link( '<b>%link</b>', 'Next &gt;', true, 42 );
* </code>
*
* @package Webcomic
Expand All @@ -3148,7 +3148,7 @@ function next_webcomic_link( $format = '%link', $link = '&rsaquo;', $in_same_ter
* first_webcomic_link( '%link', '%thumbnail' );
*
* // render a link to the first webcomic in the current storylines, excluding the storyline with an ID of 42
* first_webcomic_link( '<b>%link</b>', '&lt; Previous', true, 42 );
* first_webcomic_link( '<b>%link</b>', '&lt;&lt; First', true, 42 );
*
* // render a link to the first webcomic with a large preview in collection 42
* first_webcomic_link( '%link', '%large', false, false, '', 'webcomic42' );
Expand Down Expand Up @@ -3179,7 +3179,7 @@ function first_webcomic_link( $format = '%link', $link = '&laquo;', $in_same_ter
* last_webcomic_link( '%link', '%thumbnail' );
*
* // render a link to the last webcomic in the current storylines, excluding the storyline with an ID of 42
* last_webcomic_link( '<b>%link</b>', '&lt; Previous', true, 42 );
* last_webcomic_link( '<b>%link</b>', 'Last &gt;&gt;', true, 42 );
*
* // render a link to the last webcomic with a large preview in collection 42
* last_webcomic_link( '%link', '%large', false, false, '', 'webcomic42' );
Expand Down Expand Up @@ -3209,11 +3209,11 @@ function last_webcomic_link( $format = '%link', $link = '&raquo;', $in_same_term
* // render a link to a random webcomic with a small preview
* random_webcomic_link( '%link', '%thumbnail' );
*
* //render a link to a random webcomic in the current storylines, excluding the storyline with an ID of 42
* random_webcomic_link( '<b>%link</b>', '&lt; Previous', true, 42 );
* // render a link to a random webcomic in the current storylines, excluding the storyline with an ID of 42
* random_webcomic_link( '<b>%link</b>', 'Random Comic', true, 42 );
*
* // render a link to a random webcomic with a large preview in collection 42 using a parameterized url
* random_webcomic_link( '%link', '%large', false, false, '', 'webcomic42', true );
* random_webcomic_link( '%link', '%large', false, false, '', 'webcomic42', false );
* </code>
*
* @package Webcomic
Expand Down Expand Up @@ -3494,7 +3494,7 @@ function last_webcomic_storyline_link( $format = '%link', $link = '%title &raquo
* random_webcomic_storyline_link( '%link', 'Random Storyline', 'random', array(), 'webcomic42' );
*
* // render a link to a random webcomic with a large cover in collection 42 using a parameterized url
* random_webcomic_storyline_link( '%link', '%large', 'last', array(), 'webcomic42', true );
* random_webcomic_storyline_link( '%link', '%large', 'last', array(), 'webcomic42', false );
* </code>
*
* @package Webcomic
Expand Down Expand Up @@ -3672,7 +3672,7 @@ function last_webcomic_character_link( $format = '%link', $link = '%title &raquo
* random_webcomic_character_link( '%link', 'Random Character', 'random', array(), 'webcomic42' );
*
* // render a link to the last webcomic in a random character with a large avatar in collection 42 using a parameterized url
* random_webcomic_character_link( '%link', '%large', 'last', array(), 'webcomic42', true );
* random_webcomic_character_link( '%link', '%large', 'last', array(), 'webcomic42', false );
* </code>
*
* @package Webcomic
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Expand Up @@ -33,9 +33,9 @@ You can install Webcomic from the **Plugins > Add New** page in the administrati

Once installed and activated you can use Webcomic in one of three ways:

1. Turn on the **Integrate** option found on the **Settings > Webcomic** page in the administrative dashboard.
1. Turn on the [**Integrate** option](//github.com/mgsisk/webcomic/Wiki/Configuring#Integrate) found on the **Settings > Webcomic** page in the administrative dashboard.
2. Use an [official Webcomic theme](http://webcomic.nu/download) to get the most out of Webcomic's features with minimal hassle.
3. Leverage Webcomic's new template tags, widgets, and shortcodes to [modify an existing theme](//wordpress.org/extend/themes) or [build your own](//codex.wordpress.org/Theme_Development).
3. Leverage Webcomic's new [template tags, shortcodes]((//github.com/mgsisk/webcomic/Wiki/Template-Tags-and-Shortcodes), and [widgets](//github.com/mgsisk/webcomic/Wiki/Widgets) to [modify an existing theme](//wordpress.org/extend/themes) or [build your own](//codex.wordpress.org/Theme_Development).

### Where can I get help with Webcomic?

Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Expand Up @@ -47,9 +47,9 @@ You can install Webcomic from the **Plugins > Add New** page in the administrati

Once installed and activated you can use Webcomic in one of three ways:

1. Turn on the **Integrate** option found on the **Settings > Webcomic** page in the administrative dashboard.
1. Turn on the [**Integrate** option](//github.com/mgsisk/webcomic/Wiki/Configuring#Integrate) found on the **Settings > Webcomic** page in the administrative dashboard.
2. Use an [official Webcomic theme](http://webcomic.nu/download) to get the most out of Webcomic's features with minimal hassle.
3. Leverage Webcomic's new template tags, widgets, and shortcodes to [modify an existing theme](//wordpress.org/extend/themes) or [build your own](//codex.wordpress.org/Theme_Development).
3. Leverage Webcomic's new [template tags, shortcodes]((//github.com/mgsisk/webcomic/Wiki/Template-Tags-and-Shortcodes), and [widgets](//github.com/mgsisk/webcomic/Wiki/Widgets) to [modify an existing theme](//wordpress.org/extend/themes) or [build your own](//codex.wordpress.org/Theme_Development).

= Where can I get help with Webcomic? =

Expand Down

0 comments on commit 16a5de6

Please sign in to comment.