*/ /** * A simple shortcode * * Put the shortcode [tina_mvc controller="shortcode" role_to_view="-1"] * in a post or page. You can also find it at : /tina-mvc-for-wordpress/shortcode * * @package Tina-MVC * @author Francis Crossen */ class shortcode_page extends tina_mvc_base_page_class { function __construct( $request ) { parent::__construct( $request ); // we just output the time and date as a sample $out = '
'; $out .= 'This text is generated from the \'shortcode\' controller
'; $out .= tina_mvc_db_time() . '
'; $out .= tina_mvc_db_date(); $out .= '
'; $this->set_post_title('Happy '.date('l')); // Titles are not visible in shortcodes... $this->set_post_content($out); } } ?>