X7ROOT File Manager
Current Path:
/home/okeydcqc/public_html/wp-content/plugins/ocean-posts-slider/includes
home
/
okeydcqc
/
public_html
/
wp-content
/
plugins
/
ocean-posts-slider
/
includes
/
ðŸ“
..
📄
.htaccess
(123 B)
📄
helpers.php
(935 B)
📄
image-resizer.php
(12.3 KB)
📄
posts-slider.php
(9.17 KB)
Editing: helpers.php
<?php /** * Helpers functions * * @package OceanWP WordPress theme */ // No direct access, please if ( ! defined( 'ABSPATH' ) ) exit; /** * Custom excerpts based on wp_trim_words * * @since 1.0.0 * @link http://codex.wordpress.org/Function_Reference/wp_trim_words */ if ( ! function_exists( 'ops_excerpt' ) ) { function ops_excerpt( $length = 30 ) { // Get global post global $post; // Get post data $id = $post->ID; $excerpt = $post->post_excerpt; $content = $post->post_content; // Display custom excerpt if ( $excerpt ) { $output = $excerpt; } // Check for more tag elseif ( strpos( $content, '<!--more-->' ) ) { $output = get_the_content( $excerpt ); } // Generate auto excerpt else { $output = wp_trim_words( strip_shortcodes( get_the_content( $id ) ), $length ); } // Echo output echo wp_kses_post( $output ); } }
Upload File
Create Folder