-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved templates to extend/. Updated readme.
- Loading branch information
Showing
7 changed files
with
85 additions
and
61 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,49 @@ | ||
<?php | ||
|
||
namespace livestreambadger; | ||
|
||
class Templates { | ||
|
||
function printt( $template_string, $args ) { | ||
return str_replace(array_keys($args), array_values($args), $template_string); | ||
} | ||
|
||
function status_widget() { | ||
$template = '<div class="lsb-status-widget-holder"><ul>%%items%%</ul></div>'; | ||
return apply_filters( 'lsb_status_widget_format', $template ); | ||
} | ||
|
||
function status_widget_item() { | ||
$template = | ||
'<li class="lsb-status-widget-list-item %%status_class%%">'. | ||
' <span class="lsb-status-widget-title">'. | ||
' <a href="%%url%%" target="_blank">%%title%%</a>'. | ||
' </span>'. | ||
' <span class="lsb-status-widget-indicator %%status_class%%">%%status_indicator%%</span>'. | ||
'</li>'; | ||
return apply_filters( 'lsb_status_widget_item_format', $template ); | ||
} | ||
|
||
function status_widget_item_with_image() { | ||
$template = | ||
'<li class="lsb-status-widget-list-item %%status_class%%">'. | ||
' <span class="lsb-status-widget-title">'. | ||
' <a href="%%url%%" target="_blank">%%title%%</a>'. | ||
' </span>'. | ||
' <span class="lsb-status-widget-indicator %%status_class%%">%%status_indicator%%</span>'. | ||
' <span class="lsb-status-widget-image">'. | ||
' <a href="%%url%%" target="_blank">'. | ||
' <img src="%%image_src%%">'. | ||
' </a>'. | ||
' </span>'. | ||
'</li>'; | ||
return apply_filters( 'lsb_status_widget_item_with_image_format', $template ); | ||
} | ||
|
||
function status_widget_no_content() { | ||
$template = '<div class="lsb-status-widget-holder"><span class="lsb-status-widget-info">%%message%%</span></div>'; | ||
return apply_filters( 'lsb_status_widget_no_content_format', $template ); | ||
|
||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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