/** * The method to be used to process the content thru the entry shortcode. * * @access public * @since 0.8 * @param object $entry An instance of the cnEntry object. * @param string $content The content to be processed. * * @return string The result. */ public static function process($entry, $content) { $return = new cnEntry_Shortcode($entry, $content); return $return->result(); }
/** * This is the callback ran for the `cn_card` shortcode that will process its * content the the cnEntry_Shortcode processor. * * @access private * @since 0.8 * @static * @param array $atts The shortcode $atts array. * @param array $results The cnRetrieve query results. * @param object $template An instance of the cnTemplate object. * @param string $content The content of the `cn_card` shortcode. * * @return string The result of the $content being run thru cnEntry_Shortcode::process(). */ public static function processEntry($atts, $results, $template, $content) { foreach ($results as $row) { echo cnEntry_Shortcode::process(new cnEntry($row), $content); } }