PHP code example of helick / better-excerpt

1. Go to this page and download the library: Download helick/better-excerpt library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

helick / better-excerpt example snippets

 php
add_filter('helick_better_excerpt_supported_post_types', function (array $postTypes) {
    $postTypes[] = 'your-custom-post-type';

    return $postTypes;
});
 php
add_filter('helick_better_excerpt_editor_settings', function (array $settings) {
    $settings['media_buttons'] = true;

    return $settings;
});
 php
add_filter('helick_better_excerpt_editor_buttons', function (array $buttons) {
    $buttons[] = 'alignleft';
    $buttons[] = 'alignright';
    $buttons[] = 'aligncenter';

    return $buttons;
});