1
0
mirror of https://github.com/ascribe/wp-theme synced 2024-12-23 01:30:09 +01:00

new callToAction subtemplate function

This commit is contained in:
Matthias Kretschmann 2015-12-12 15:50:26 +01:00
parent a88986163d
commit 79e107fe2e

View File

@ -296,14 +296,16 @@ class Subtemplate {
return $result; return $result;
} }
public function callToAction($subtemplateTitle) { public function callToAction($subtemplateTitle) {
$buttonText = get_sub_field('create_free_account_text'); $ctaTitle = $subtemplateTitle;
$signUpLink = get_field('sign_up_link','option'); $ctaText = get_sub_field('cta_button_text');
$ctaLink = get_sub_field('cta_button_link');
$backgroundImg = get_sub_field('image')['url']; $backgroundImg = get_sub_field('image')['url'];
$result = "<section class='subtemplate sign-up' style='background-image: url({$backgroundImg})'> $result = "<section class='subtemplate sign-up' style='background-image: url({$backgroundImg})'>
<div class='centered-content'> <div class='centered-content'>
<a href='{$signUpLink}' class='button blue-overPic'>{$buttonText}</a> <h1>{$ctaTitle}</h1>
<div><a href='{$ctaLink}' class='button blue-overPic'>{$ctaText}</a></div>
</div> </div>
</section>"; </section>";