本文整理汇总了PHP中NewsletterControls::media方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsletterControls::media方法的具体用法?PHP NewsletterControls::media怎么用?PHP NewsletterControls::media使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewsletterControls
的用法示例。
在下文中一共展示了NewsletterControls::media方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<table class="form-table">
<tr valign="top">
<th>
Header logo
<div class="tnp-tip">
<span class="tip-button">Tip</span>
<span class="tip-content">
Keep the file lightweight and ideally smaller than 500px in width and 200px in height.
Remember that .png images provide best performances with text and shapes logos.
</span>
</div>
</th>
<td>
<?php
$controls->media('header_logo');
?>
<p class="description">
Click to change. This should be your logo in .png or .jpg format.
</p>
</td>
</tr>
<tr>
<th>Header title</th>
<td>
<?php
$controls->text('header_title', 40);
?>
<p class="description">Appears only when no logo has been uploaded or when it's blocked by email clients.</p>
</td>
</tr>
示例2:
<table class="form-table">
<tr valign="top">
<th>
Header logo
<div class="tnp-tip">
<span class="tip-button">Tip</span>
<span class="tip-content">
This image will be placed on top of email templates as-is, eventually stretched to
match the template width.
</span>
</div>
</th>
<td>
<?php
$controls->media('header_logo', 'full');
?>
<p class="description">
Click to change. This should be your logo in .png or .jpg format. The image shown is a resized preview.
</p>
</td>
</tr>
<tr>
<th>Header title</th>
<td>
<?php
$controls->text('header_title', 40);
?>
<p class="description">Appears only when no logo has been uploaded or when it's blocked by email clients.</p>
</td>
</tr>
示例3:
<table class="form-table">
<tr valign="top">
<th>
Logo
<div class="tnp-tip">
<span class="tip-button">Tip</span>
<span class="tip-content">
Keep the file lightweight and ideally smaller than 500px in width and 200px in height.
Remember that .png images provide best performances with text and shapes logos.
</span>
</div>
</th>
<td>
<?php
$controls->media('header_logo', 'medium');
?>
<p class="description">
Click to change. This should be your logo in .png or .jpg format.
</p>
</td>
</tr>
<tr>
<th>Title</th>
<td>
<?php
$controls->text('header_title', 40);
?>
<p class="description">Appears only when no logo has been uploaded or when it's blocked by email clients.</p>
</td>
</tr>