Deze plugin is niet getest met de laatste 3 grotere versies van WordPress. Mogelijk wordt het niet meer onderhouden of ondersteund. Ook kunnen er compatibiliteitsproblemen ontstaan wanneer het wordt gebruikt met recentere versies van WordPress.

Simple Subtitles

Beschrijving

Simple subtitles adds a field on posts, pages, or custom post types for adding a subtitle. Post types can be enabled/disabled in the writing settings section.

There are several functions in the plugin that allow you to easily get subtitles for different contexts. These functions mirror the functions in core for titles.

If you want to display the subtitle in your theme on your own, use the following filter:

<?php
    function mytheme_disable_subtitle_display( $show ) {
        return false;
    }
    add_filter( 'simple_subtitle_auto', 'mytheme_disable_subtitle_display' );
?>

By default, only tags are allowed in subtitles (with only class and style attributes). There is a filter this.

<?php
    function mytheme_simple_subtitle_allowed_html( $allowed ) {
        $allowed['strong'] = array();
        $allowed['div'] = array(
            'class' => true,
        );

        return $allowed;
    }
    add_filter( 'simple_subtitle_allowed_html', 'mytheme_simple_subtitle_allowed_html' );

?>

For more info on this, read into the wp_kses functions.

Get the subtitle.

<?php $subtitle = get_the_simple_subtitle( $post_id ); ?>

Display the current post’s subtitle. Should be used within the loop.

<?php $subtitle = the_simple_subtitle( $before = '', $after = '', $echo = true ); ?>

Get the subtitle for use in an HTML attribute.

<?php
    $args = array(
        'before' => '',
        'after' =>  '',
        'echo' => true
    );
    $subtitle = the_simple_subtitle_attribute( $args );
?><h3>Roadmap</h3>

* Add a column in the admin showing subtitles.
* Add a setting for selecting the subtitle HTML tag.

Schermafdrukken

  • Simple Subtitles on the edit screen.
  • Default Simple Subtitle display on the front end.

Installatie

  1. Upload the plugin files to the /wp-content/plugins/simple-subtitles directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. Use the Settings->Writing screen to configure enable subtitles for post types. Pages will be enabled by default.

FAQ

Why is this empty?

No one has asked us any questions yet! Use the support link to tell us what is on your mind.

Beoordelingen

Lees 1 beoordeling

Bijdragers & ontwikkelaars

“Simple Subtitles” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

Vertaal “Simple Subtitles” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.

Changelog

2.1.1

  • Fix bug where the automatic display of simple subtitles could not be turned off via filter.

2.1

  • Added upgrade class for processing any upgrades that happen.
  • Upgrade all meta keys on sites using an old install of the plugin.

2.0

  • Hello world! Subtitles for all.