Skip to content

Instantly share code, notes, and snippets.

@hothanhan
Forked from quangbahoa/wp_trim_words.php
Last active August 29, 2015 14:19
Show Gist options
  • Save hothanhan/52b01fbac74308006fb3 to your computer and use it in GitHub Desktop.
Save hothanhan/52b01fbac74308006fb3 to your computer and use it in GitHub Desktop.
<?php $trimmed = wp_trim_words( $text, $num_words = 55, $more = null ); ?>
/*** Mô tả *************
$text
(string) (required) Text to trim
Default: None
$num_words
(integer) (optional) Number of words
Default: 55
$more
(string) (optional) What to append if $text needs to be trimmed.
Default: '&hellip;'
Hết mô tả ***/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment