Пример #1
0
/**
 * Reduces the length of excerpts on the BP Docs doc list
 *
 * @package BuddyPress Docs
 * @since 1.0-beta
 *
 * @uses apply_filters() Plugins can filter bp_docs_excerpt_length to change the default
 * @param int $length WordPress's default excerpt length
 * @return int $length The filtered excerpt length
 */
function bp_docs_excerpt_length($length)
{
    if (bp_docs_is_bp_docs_page()) {
        $length = bp_docs_get_excerpt_length();
    }
    return $length;
}
Пример #2
0
    public function excerpt_length_setting_markup()
    {
        $length = bp_docs_get_excerpt_length();
        ?>
		<input name="bp-docs-excerpt-length" id="bp-docs-excerpt-length" type="text" value="<?php 
        echo esc_html($length);
        ?>
" />
		<p class="description"><?php 
        _e("Excerpts are shown on Docs directories, to provide better context. If your theme or language requires longer or shorter excerpts, change this value. Set to <code>0</code> to disable these excerpts.", 'bp-docs');
        ?>
</p>

		<?php 
    }
Пример #3
0
        }
        ?>

			<td class="title-cell">
				<a href="<?php 
        bp_docs_doc_link();
        ?>
"><?php 
        the_title();
        ?>
</a> <?php 
        bp_docs_doc_trash_notice();
        ?>

				<?php 
        if (bp_docs_get_excerpt_length()) {
            ?>
					<?php 
            the_excerpt();
            ?>
				<?php 
        }
        ?>

				<div class="row-actions">
					<?php 
        bp_docs_doc_action_links();
        ?>
				</div>

				<div class="bp-docs-attachment-drawer" id="bp-docs-attachment-drawer-<?php