Created
April 25, 2017 10:06
-
-
Save eriktorsner/c0ca164cc99f5d5c09b21044731da952 to your computer and use it in GitHub Desktop.
Snippet 3 from helloTestable.php
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
<?php | |
/** | |
* Output the lyric string | |
*/ | |
public function echoLyric() | |
{ | |
$lyricString = $this->lyrics->getLyric(); | |
echo "<p id='dolly'>$lyricString</p>"; | |
} | |
/** | |
* Output plugin css | |
*/ | |
public function echoCss() | |
{ | |
// This makes sure that the positioning is also good for right-to-left languages | |
$x = is_rtl() ? 'left' : 'right'; | |
echo "\n<style type='text/css'> | |
#dolly { | |
float: $x; | |
padding-$x: 15px; | |
padding-top: 5px; | |
margin: 0; | |
font-size: 11px; | |
} | |
</style>\n"; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment