This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Pre-populates a company ID into a Gravity Forms field from a GET variable | |
| * | |
| * @since 0.1.0 | |
| * | |
| */ | |
| add_filter('gform_field_value_company_id', 'company_id_population'); | |
| function company_id_population(){ | |
| // if we have the proper company GET variable - set the return variable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function otm_get_short_content($length = 200) { | |
| $content = strip_shortcodes( strip_tags( get_the_content(), '<p><h2><h3><h4>' ) ); | |
| if ( strlen( $content ) > $length ){ | |
| return wpautop( substr( $content, 0, strpos( $content, ' ', $length ) ) . "..." ); | |
| } else { | |
| return wpautop( $content ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function otm_short_content( $length = 200 ) { | |
| $content = strip_shortcodes( strip_tags( get_the_content(), '<p><h2><h3><h4>' ) ); | |
| if ( strlen( $content ) > $length ){ | |
| echo wpautop( substr( $content, 0, strpos( $content, ' ', $length ) ) . "..." ); | |
| } else { | |
| echo wpautop( $content ); | |
| } |
NewerOlder