本文整理汇总了PHP中NewsletterControls::yesno方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsletterControls::yesno方法的具体用法?PHP NewsletterControls::yesno怎么用?PHP NewsletterControls::yesno使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewsletterControls
的用法示例。
在下文中一共展示了NewsletterControls::yesno方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_option
<th>Disable visual editors?</th>
<td>
<?php $controls->yesno('novisual'); ?>
<p class="description">
If you prefer to edit the messages on this cofiguration panel writing them in HTML, you can
disable the visual editors.
</p>
</td>
</tr>
*/
?>
<tr valign="top">
<th>Notifications</th>
<td>
<?php
$controls->yesno('notify');
?>
to: <?php
$controls->text_email('notify_email');
?>
(email address, leave empty for the WordPress administration email <?php
echo get_option('admin_email');
?>
)
<p class="description">
Notifications are sent on confirmed subscriptions and cancellations.
</p>
</td>
</tr>
</table>
</div>
示例2: array
</p>
</div>
<div id="tnp-body">
<form method="post" action="">
<?php
$controls->init();
?>
<table class="form-table">
<tr>
<th>Enable the SMTP?</th>
<td><?php
$controls->yesno('enabled');
?>
</td>
</tr>
<tr>
<th>SMTP host/port</th>
<td>
host: <?php
$controls->text('host', 30);
?>
port: <?php
$controls->text('port', 6);
?>
<?php
$controls->select('secure', array('' => 'No secure protocol', 'tls' => 'TLS protocol', 'ssl' => 'SSL protocol'));
?>
示例3:
?>
(save to apply)
<div class="hints">
Subscription and cancellation processes send out emails as you configured above. To apply a general theme to those
emails, you can create an HTML layout here. You can also use PHP code, just remember to disable the visual editor and to
keep it disabled.<br />
<strong>Messages are inserted in the theme where you put the {message} tag, don't forget it!</strong>
</div>
</td>
</tr>
-->
<tr valign="top">
<th>Disable visual editors?</th>
<td>
<?php
$nc->yesno('novisual');
?>
</td>
</tr>
</table>
<p class="submit">
<?php
$nc->button('save', 'Save');
?>
<?php
$nc->button_confirm('reset', 'Reset all', 'Are you sure you want to reset all?');
?>
</p>
</div>
示例4: used
<form method="post" action="">
<?php
$controls->init();
?>
<p>
<?php
$controls->button_save();
?>
</p>
<table class="form-table">
<tr valign="top">
<th>Enabled?</th>
<td>
<?php
$controls->yesno('enabled');
?>
<p class="description">
When not enabled, the old templating system is used (see the file
wp-content/plugins/newsletter/subscription/email.php).
</p>
</td>
</tr>
<tr valign="top">
<th>Email template</th>
<td>
<?php
$controls->textarea_preview('template', '100%', '700');
?>
<?php
$controls->button_reset();
示例5:
?>
</td>
<td>
label: <?php
$nc->text('sex');
?>
"female": <?php
$nc->text('sex_female');
?>
"male": <?php
$nc->text('sex_male');
?>
</td>
</tr>
<tr><td>Privacy checkbox</td><td><?php
$nc->yesno('privacy_status');
?>
</td>
<td>
text: <?php
$nc->text('privacy', 50);
?>
<br />
unchecked message: <?php
$nc->text('privacy_error', 50);
?>
</td>
</tr>
</table>
<div class="hints">
If sex field is disabled subscribers will be stored with unspecified sex. Privacy is applied only on subscription and is
示例6: array
?>
</td>
</tr>
<tr valign="top">
<th>Status</th>
<td>
<?php
$controls->select('status', array('C' => 'Confirmed', 'S' => 'Not confirmed', 'U' => 'Unsubscribed', 'B' => 'Bounced'));
?>
</td>
</tr>
<tr valign="top">
<th>Test subscriber?</th>
<td>
<?php
$controls->yesno('test');
?>
<div class="hints">
A test subscriber is a regular subscriber that is even used as recipint when sending test newsletter are sent
(for example to check the layout).
</div>
</td>
</tr>
<?php
do_action('newsletter_user_edit_extra', $controls);
?>
<tr valign="top">
<th>Feed by mail</th>
<td>
示例7:
<td colspan="2">
<h3><?php
_e('Confirmation', 'newsletter');
?>
</h3>
<p>
Subscribers will be automatically confirmed on first log-in (because it demonstrates they received the WP email with
their passsword. Hence no confirmation email is sent. Anyway you can change that behavior here and ask anyway for confirmation.
</p>
</td>
</tr>
<tr valign="top">
<th>Send the confirmation email</th>
<td>
<?php
$controls->yesno('confirmation');
?>
</td>
</tr>
<tr valign="top">
<th><?php
_e('Send welcome email to registered users', 'newsletter');
?>
</th>
<td>
<?php
$controls->yesno('welcome');
?>
</td>
</tr>
<tr valign="top">
示例8:
</table>
</div>
<div id="tabs-2">
<p>
Every setting is explained <a href="http://www.thenewsletterplugin.com/plugins/newsletter/newsletter-configuration#advanced" target="_blank">here</a>.
</p>
<table class="form-table">
<tr valign="top">
<th>Enable access to blog editors?</th>
<td>
<?php
$controls->yesno('editor');
?>
</td>
</tr>
<tr valign="top">
<th>API key</th>
<td>
<?php
$controls->text('api_key', 40);
?>
<p class="description">
When non-empty can be used to directly call the API for external integration. See API documentation on
documentation panel.
</p>
</td>
示例9:
<td colspan="2">
<h3><?php
_e('Confirmation', 'newsletter');
?>
</h3>
<p>
Subscribers will be automatically confirmed on first log-in (because it demonstrates they received the WP email with
their passsword. Hence no confirmation email is sent. Anyway you can change that behavior here and ask anyway for confirmation.
</p>
</td>
</tr>
<tr valign="top">
<th>Send the confirmation email</th>
<td>
<?php
$controls->yesno('wp_send_confirmation');
?>
</td>
</tr>
<tr valign="top">
<th><?php
_e('Send welcome email to registered users', 'newsletter');
?>
</th>
<td>
<?php
$controls->yesno('wp_welcome');
?>
</td>
</tr>
<tr valign="top">
示例10:
</div>
<div id="tabs-advanced">
<p>
Every setting is explained <a href="http://www.thenewsletterplugin.com/plugins/newsletter/newsletter-configuration#advanced" target="_blank">here</a>.
</p>
<table class="form-table">
<tr valign="top">
<th>Enable access to blog editors?</th>
<td>
<?php
$controls->yesno('editor');
?>
</td>
</tr>
<tr valign="top">
<th>API key</th>
<td>
<?php
$controls->text('api_key', 40);
?>
<p class="description">
When non-empty can be used to directly call the API for external integration. See API documentation on
documentation panel.
</p>
</td>
示例11:
?>
" name="options[version]"/>
<h3><?php
_e('General parameters', 'newsletter');
?>
</h3>
<table class="form-table">
<tr valign="top">
<th><?php
_e('Enable access to editors?', 'newsletter');
?>
</th>
<td>
<?php
$nc->yesno('editor');
?>
</td>
</tr>
<tr valign="top">
<th><?php
_e('Always show panels in english?', 'newsletter');
?>
</th>
<td>
<?php
$nc->yesno('no_translation');
?>
<br />
<?php
_e('The author does NOT maintain translations, so if you have a doubt about some texts, disable the translations', 'newsletter');
示例12:
<div id="tabs">
<ul>
<li><a href="#tabs-general">General</a></li>
<li><a href="#tabs-rules">Rules</a></li>
<li><a href="#tabs-help">Help</a></li>
</ul>
<div id="tabs-general">
<table class="form-table">
<tr valign="top">
<th>Enabled?</th>
<td>
<?php
$controls->yesno('enabled');
?>
</td>
</tr>
</table>
<h3>Recording</h3>
<table class="form-table">
<tr valign="top">
<th>Active?</th>
<td>
<?php
$controls->checkbox('record');
?>
<p class="description">
Disable the recording feature as soon as you finished to use it.
示例13: get_option
if (!empty($controls->data['url'])) {
?>
<br>
If something is not working as expected with this address you can empty the field above and save: a button will appear
to create that page automatically.
<?php
}
?>
</p>
</td>
</tr>
<tr valign="top">
<th>Notifications</th>
<td>
<?php
$controls->yesno('notify');
?>
to: <?php
$controls->text_email('notify_email');
?>
(email address, leave empty for the WordPress administration email <?php
echo get_option('admin_email');
?>
)
<p class="description">
Notifications are sent on confirmed subscriptions and cancellations.
</p>
</td>
</tr>
</table>
</div>
示例14: image
$controls->text('save');
?>
(on profile page)</td></tr>
</table>
<p class="description">
For "subscribe" insert an URL to an image (http://...) to use it as a graphical button.
</p>
</td>
</tr>
<tr>
<th>Privacy check box</th>
<td>
<table class="newsletter-option-grid">
<tr><th>Enabled?</th><td><?php
$controls->yesno('privacy_status');
?>
</td></tr>
<tr><th>Label</th><td><?php
$controls->text('privacy', 50);
?>
</td></tr>
<tr><th>Privacy URL</th><td><?php
$controls->text('privacy_url', 50);
?>
</td></tr>
<tr><th>Error message</th><td><?php
$controls->text('privacy_error', 50);
?>
</td></tr>
</table>
示例15:
<div id="tabs">
<ul>
<li><a href="#tabs-general">General</a></li>
<li><a href="#tabs-smtp">SMTP/API</a></li>
<li><a href="#tabs-bounces">Bounces</a></li>
</ul>
<div id="tabs-general">
<table class="form-table">
<tr valign="top">
<th>Enabled?</th>
<td>
<?php
$controls->yesno('enabled');
?>
</td>
</tr>
<tr valign="top">
<th>License key</th>
<td>
<?php
if (empty(Newsletter::instance()->options['contract_key'])) {
echo 'Not set';
} else {
echo Newsletter::instance()->options['contract_key'];
}
?>
<p class="description">
The license key can be set on main Newsletter configuration and will be used for the one clic