Inventory_Presser_Shortcode_Hours_Today::append_hours_today_to_hours_widget( string $hours_title_html, string $hours_uid )
append_hours_today_to_hours_widget
On This Page
Description Description
Returns the output of the shortcode wrapped in some HTML
Parameters Parameters
- $hours_title_html
-
(string) (Required)
- $hours_uid
-
(string) (Required)
Return Return
(string) HTML that renders a sentence
Source Source
File: includes/shortcode/class-shortcode-hours-today.php
function append_hours_today_to_hours_widget( $hours_title_html, $hours_uid ) { $shortcode = '[' . self::SHORTCODE_TAG . ' hours_uid="' . $hours_uid . '"]'; $shortcode_output = ''; if ( function_exists( 'apply_shortcodes' ) ) { $shortcode_output = apply_shortcodes( $shortcode ); } elseif ( function_exists( 'do_shortcode' ) ) { $shortcode_output = do_shortcode( $shortcode ); } if ( empty( $shortcode_output ) ) { return $hours_title_html; } return $hours_title_html . '<p class="invp-hours-today">' . $shortcode_output . '</p>'; }
Expand full source codeCollapse full source codeView on Github