Plugin Directory

Changeset 5075


Ignore:
Timestamp:
02/11/2006 02:54:40 AM (21 years ago)
Author:
kccricket
Message:
  • Switching to the_content for autoprint
  • Clarifying option descriptions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cricket-moods/trunk/cricket-moods.php

    r5074 r5075  
    358358Used if the AutoPrint option is enabled.
    359359*/
    360 function cm_auto_moods($time) {
    361         return $time . cm_the_moods(' &amp; ', '<br/>Current Mood: ', '', true);
    362 }
    363 
    364 if( !is_admin() ) {
    365         add_filter('the_time', 'cm_auto_moods');
     360function cm_auto_moods($content) {
     361        return cm_the_moods(' &amp; ', '<p class="moods">Current Mood: ', '</p>', true) . $content;
     362}
     363
     364if( !is_admin() && get_option(CM_OPTION_AUTOPRINT) == "on" ) {
     365        add_filter('the_content', 'cm_auto_moods');
    366366}
    367367
    … …  
    533533<th width="33%" scope="row"><label for="cm_image_dir">Mood image directory:</label></th>
    534534        <td><input type="text" id="cm_image_dir" name="cm_image_dir" value="<?php echo get_option(CM_OPTION_DIR) ?>" /><br/>
    535         Directory containing the images associated with the moods.</td>
     535        Directory containing the images associated with the moods.  Should be relative to the root of your domain.</td>
    536536</tr>
    537537<tr valign="top"<?php cm_err('cm_auto_print', $err) ?>>
    538538<th width="33%" scope="row"><label for="cm_auto_print">Automatically print moods:</label></th>
    539539        <td><input type="checkbox" id="cm_auto_print" name="cm_auto_print" <?php if ( get_option(CM_OPTION_AUTOPRINT) == "on" ) echo 'checked="true"' ?>/><br/>
    540         Causes Cricket Moods to automatically display moods directly after each post's time without the need to modify the active template.  <strong>It is not recommended that you use this.</strong>  Uncheck if you've manually added <code>cm_the_moods()</code> to your template(s).</td>
     540        Causes Cricket Moods to automatically display moods just before each post's content without the need to modify the active template.  Deselect if you've manually added <code>cm_the_moods()</code> to your template(s).</td>
    541541</tr>
    542542</table>
Note: See TracChangeset for help on using the changeset viewer.