Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

Add a RapGenius placeholder element in admin #66

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion inc/shortcodes/class-rap-genius.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ public static function get_shortcode_ui_args() {
* @param string $content
*/
public static function callback( $attrs, $content = '' ) {
return '<script async src="https://genius.codes"></script>';
$out = '';
if ( is_admin() ) {
$out .= '<div style="display:block;height:30px;text-align:center;background-color:black;color:#ffff64;font-family:sans-serif;">(RapGenius Annotations – No Admin Preview)</div>';
}
$out .= '<script async src="https://genius.codes"></script>';
return $out;
}

public static function reversal( $content ) {
Expand Down