Server : Apache System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : andertr9 ( 1047) PHP Version : 8.2.18 Disable Function : NONE Directory : /home1/andertr9/www/wp-content/themes/ssp-starter/includes/shortcodes/ |
Upload File : |
<?php if ( ! function_exists( 'ssp_starter_shortcode_readmore_content' )) { function ssp_starter_shortcode_readmore_content( $atts , $content = null ) { extract( shortcode_atts( array( 'readmore' => 'Read More' , 'readless' => 'Read Less' , 'button' => 'block' , 'display' => 'block' , ) , $atts )); $morecontent = ''; $morecontent .= $display == 'block' ? '<div class="readmore-content">' : '<span class="readmore-content">'; $morecontent .= $display == 'block' ? '' : ' '; $morecontent .= wpautop( do_shortcode( $content )); $morecontent .= $display == 'block' ? '</div>' : '</span>'; $morecontent .= $display == 'block' ? '' : ' '; if ( ! empty( trim( $content ))) { if ( in_array( $button , array( 'block' , 'inline' ))) { $class = ( $button == 'block' && $display == 'block' ) ? 'slide-button button' : 'slide-button'; //$morecontent .= ( $button == 'block' ) ? '' : ' '; $morecontent .= '<a href="#" class="' . $class . '" data-readmore="' . $readmore . '" data-readless="' . $readless . '"> ' . $readmore . ' </a>'; } } return $morecontent; } } add_shortcode( 'readmore-content' , 'ssp_starter_shortcode_readmore_content' );