Allow Developers to Use their own custom css for background positioning etc

  • Download Gist
Allow Developers to Use their own custom css for background positioning etc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<?php
add_filter("bppg_iwilldo_it_myself","__return_true");//stop the plugin to inject css
 
//now we can write our own css
 
add_action("wp_head","my_css_for_profile_bg");
 
function my_css_for_profile_bg(){
$image_url=bppg_get_image();
if(!$image_url)
return;//this user has not uploaded an image yet
?>
<style type="text/css">
body.is-user-profile {
background:url(<?php echo $image_url;?>) no-repeat;/*please customize it*/
}
</style>
<?php
}
?>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.