Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stevegrunwell/advanced-post-excerpt
Replace the default Post Excerpt meta box with a superior editing experience.
https://github.com/stevegrunwell/advanced-post-excerpt
post-excerpt tinymce wordpress wordpress-plugin
Last synced: 19 days ago
JSON representation
Replace the default Post Excerpt meta box with a superior editing experience.
- Host: GitHub
- URL: https://github.com/stevegrunwell/advanced-post-excerpt
- Owner: stevegrunwell
- License: mit
- Created: 2016-02-22T01:36:13.000Z (over 8 years ago)
- Default Branch: develop
- Last Pushed: 2023-12-18T23:09:44.000Z (11 months ago)
- Last Synced: 2024-10-13T08:43:44.323Z (about 1 month ago)
- Topics: post-excerpt, tinymce, wordpress, wordpress-plugin
- Language: PHP
- Homepage: https://wordpress.org/plugins/advanced-post-excerpt/
- Size: 162 KB
- Stars: 17
- Watchers: 6
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Advanced Post Excerpt
[![Build Status](https://travis-ci.com/stevegrunwell/advanced-post-excerpt.svg?branch=develop)](https://travis-ci.com/stevegrunwell/advanced-post-excerpt)
[![Coverage Status](https://coveralls.io/repos/github/stevegrunwell/advanced-post-excerpt/badge.svg?branch=develop)](https://coveralls.io/github/stevegrunwell/advanced-post-excerpt)[WordPress post excerpts](https://codex.wordpress.org/Excerpt) can be a great way to hand-craft the summary of your content. Unfortunately, writing post excerpts isn't as nice of an experience as what you find elsewhere in WordPress. Want to include links in your excerpts, or bold some text? Hopefully you know some HTML!
Advanced Post Excerpts is designed to change that, by giving your editors an easy, intuitive interface for writing great post excerpts.
![A much better editing experience for post excerpts](plugin-repo-assets/screenshot-1.png)
## Configuration
Advanced Post Excerpt is designed to work out of the box, but is easily customized via [the WordPress Plugin API](https://codex.wordpress.org/Plugin_API):
### Filter: ape_editor_settings
Filter the settings passed to wp_editor() for the post excerpt.
For a full list of options, see [`wp_editor()`](https://codex.wordpress.org/Function_Reference/wp_editor).
- (array)
$settings
- Settings for wp_editor().
#### Example
If you'd like to disable the "Visual" and "Text" tabs, you can do so by setting the `quicktags` option:
```php
/**
* Remove Quicktags from Advanced Post Excerpt.
*
* @param array $settings Settings for wp_editor().
* @return array The filtered $settings array.
*/
function mytheme_disable_quicktags_on_excerpt( $settings ) {
$settings['quicktags'] = false;
return $settings;
}
add_filter( 'ape_editor_settings', 'mytheme_disable_quicktags_on_excerpt' );
```
### Filter: ape_post_types
Control the post types that should get the Advanced Post Excerpt meta box.
- (array)
$post_types
- Post types affected by Advanced Post Excerpt.
#### Example
If you'd only want the native "post" post type to use Advanced Post Excerpt, you could add the following to your theme's functions.php file:
```php
/**
* Restrict Advanced Post Excerpt to the "post" post type.
*
* @param array $post_types Post types affected by Advanced Post Excerpt.
* @return array A restricted version of $post_types containing only "post".
*/
function mytheme_restrict_ape_post_types( $post_types ) {
return array( 'post' );
}
add_filter( 'ape_post_types', 'mytheme_restrict_ape_post_types' );
```