本文整理汇总了PHP中fs_require_template函数的典型用法代码示例。如果您正苦于以下问题:PHP fs_require_template函数的具体用法?PHP fs_require_template怎么用?PHP fs_require_template使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fs_require_template函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
function render()
{
?>
<div id='debug-bar-php'>
<?php
fs_require_template('/debug/api-calls.php');
?>
<br>
<?php
fs_require_template('/debug/scheduled-crons.php');
?>
<br>
<?php
fs_require_template('/debug/logger.php');
?>
</div>
<?php
}
示例2: _add_license_activation_dialog_box
/**
* Displays a license activation dialog box when the user clicks on the "Activate License"
* or "Change License" link on the plugins
* page.
*
* @author Leo Fajardo (@leorw)
* @since 1.1.9
*/
function _add_license_activation_dialog_box()
{
$vars = array('slug' => $this->_slug);
fs_require_template('forms/license-activation.php', $vars);
fs_require_template('forms/resend-key.php', $vars);
}
示例3: array
}
?>
</td>
<?php
}
?>
</tr>
<?php
$odd = !$odd;
}
?>
</tbody>
</table>
</div>
</div>
<?php
}
?>
<?php
$fs->do_action('after_account_details');
?>
</div>
</div>
</div>
</div>
</div>
<?php
$params = array('page' => 'account', 'module_id' => $fs->get_id(), 'module_slug' => $slug, 'module_version' => $fs->get_plugin_version());
fs_require_template('powered-by.php', $params);
示例4: sendData
* Sends the add-on information to the server for further processing.
*/
function sendData(extraDetails) {
var data = {
action: 'rw-addon-request',
_n: '<?php
echo wp_create_nonce('rw_send_addon_request');
?>
',
addon_key: $('li.rw-addon.active').attr('data-idx')
};
if ( extraDetails ) {
$.extend(data, extraDetails);
}
var ajaxUrl = '<?php
echo admin_url('admin-ajax.php');
?>
';
$.ajax({
url: ajaxUrl,
data: data
});
}
})(jQuery);
</script>
</div>
<?php
fs_require_template('powered-by.php');
示例5: _all_admin_notices_hook
/**
* Handle all_admin_notices by printing the admin messages stacked in the queue.
*
* @author Vova Feldman (@svovaf)
* @since 1.0.4
*
*/
function _all_admin_notices_hook()
{
$notice_type = 'all_admin_notices';
if (!isset($this->_admin_messages[$notice_type]) || !is_array($this->_admin_messages[$notice_type])) {
return;
}
foreach ($this->_admin_messages[$notice_type] as $id => $msg) {
fs_require_template('all-admin-notice.php', $msg);
}
}
示例6: SettingsPage
//.........这里部分代码省略.........
echo ' style="display: none;"';
}
?>
>
<?php
$vers = array('top', 'bottom');
$hors = array('left', 'center', 'right');
?>
<select>
<?php
foreach ($vers as $ver) {
foreach ($hors as $hor) {
$checked = false;
if ($enabled) {
$checked = $ver == $rw_align->ver && $hor == $rw_align->hor;
}
?>
<option
value="<?php
echo $ver . ' ' . $hor;
?>
"<?php
if ($checked) {
echo ' selected="selected"';
}
?>
><?php
echo ucwords($ver) . ' ' . ucwords($hor);
?>
</option>
<?php
}
}
?>
</select>
<input id="rw_align" name="rw_align" type="hidden"
value="<?php
echo $rw_align->ver . ' ' . $rw_align->hor;
?>
">
<script>
(function ($) {
$('.rw-post-rating-align select').chosen({width: '100%'}).change(function (evt, params) {
$('#rw_align').val(params.selected);
});
})(jQuery);
</script>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
<?php
if ('users' === $selected_key) {
rw_require_once_view('user_rating_type_options.php');
} else {
if ('comments' === $selected_key) {
rw_require_once_view('comment_rating_mode_options.php');
}
}
rw_require_once_view('options.php');
rw_require_once_view('availability_options.php');
rw_require_once_view('visibility_options.php');
if ($is_blog_post) {
rw_require_once_view('post_views_visibility.php');
}
if ($item_with_category) {
rw_require_once_view('categories_availability_options.php');
}
rw_require_once_view('settings/frequency.php');
rw_require_once_view('powerusers.php');
?>
</div>
<div id="rw_wp_set_widgets">
<?php
if ($this->fs->is_not_paying()) {
// Show random.
if (0 == rand(0, 1)) {
rw_require_once_view('rich-snippets.php');
} else {
rw_require_once_view('upgrade.php');
}
}
?>
</div>
</div>
</form>
</div>
<?php
fs_require_template('powered-by.php');
?>
<?php
// Store options if in save mode.
if ($this->settings->IsSaveMode()) {
$this->_options->store();
}
}
示例7: install_plugin_information
//.........这里部分代码省略.........
?filter=<?php
echo $key;
?>
"
target="_blank"
title="<?php
echo esc_attr(sprintf(_n('Click to see reviews that provided a rating of %d star', 'Click to see reviews that provided a rating of %d stars', $key), $key));
?>
"><?php
printf(_n('%d star', '%d stars', $key), $key);
?>
</a></span>
<span class="counter-back">
<span class="counter-bar" style="width: <?php
echo 92 * $_rating;
?>
px;"></span>
</span>
<span class="counter-count"><?php
echo number_format_i18n($ratecount);
?>
</span>
</div>
<?php
}
}
if (!empty($api->contributors)) {
?>
<h3><?php
_e('Contributors');
?>
</h3>
<ul class="contributors">
<?php
foreach ((array) $api->contributors as $contrib_username => $contrib_profile) {
if (empty($contrib_username) && empty($contrib_profile)) {
continue;
}
if (empty($contrib_username)) {
$contrib_username = preg_replace('/^.+\\/(.+)\\/?$/', '\\1', $contrib_profile);
}
$contrib_username = sanitize_user($contrib_username);
if (empty($contrib_profile)) {
echo "<li><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&s=36' width='18' height='18' />{$contrib_username}</li>";
} else {
echo "<li><a href='{$contrib_profile}' target='_blank'><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&s=36' width='18' height='18' />{$contrib_username}</a></li>";
}
}
?>
</ul>
<?php
if (!empty($api->donate_link)) {
?>
<a target="_blank"
href="<?php
echo esc_url($api->donate_link);
?>
"><?php
_e('Donate to this plugin »');
?>
</a>
<?php
}
?>
<?php
}
?>
</div>
<div id="section-holder" class="wrap">
<?php
if (!empty($api->tested) && version_compare(substr($GLOBALS['wp_version'], 0, strlen($api->tested)), $api->tested, '>')) {
echo '<div class="notice notice-warning"><p>' . '<strong>' . __('Warning:') . '</strong> ' . __('This plugin has not been tested with your current version of WordPress.') . '</p></div>';
} else {
if (!empty($api->requires) && version_compare(substr($GLOBALS['wp_version'], 0, strlen($api->requires)), $api->requires, '<')) {
echo '<div class="notice notice-warning"><p>' . '<strong>' . __('Warning:') . '</strong> ' . __('This plugin has not been marked as compatible with your version of WordPress.') . '</p></div>';
}
}
foreach ((array) $api->sections as $section_name => $content) {
$content = links_add_base_url($content, 'https://wordpress.org/plugins/' . $api->slug . '/');
$content = links_add_target($content, '_blank');
$san_section = esc_attr($section_name);
$display = $section_name === $section ? 'block' : 'none';
if ('description' === $section_name && (!$api->external && $api->wp_org_missing || $api->external && $api->fs_missing)) {
$missing_notice = array('type' => 'error', 'id' => md5(microtime()), 'message' => __fs($api->is_paid ? 'paid-addon-not-deployed' : 'free-addon-not-deployed', $api->slug));
fs_require_template('admin-notice.php', $missing_notice);
}
echo "\t<div id='section-{$san_section}' class='section' style='display: {$display};'>\n";
echo $content;
echo "\t</div>\n";
}
echo "</div>\n";
echo "</div>\n";
echo "</div>\n";
// #plugin-information-scrollable
echo "<div id='{$tab}-footer'>\n";
echo $this->get_plugin_cta($api);
echo "</div>\n";
iframe_footer();
exit;
}
示例8: _add_deactivation_feedback_dialog_box
/**
* Displays a confirmation and feedback dialog box when the user clicks on the "Deactivate" link on the plugins
* page.
*
* @author Vova Feldman (@svovaf)
* @author Leo Fajardo (@leorw)
* @since 1.1.2
*/
function _add_deactivation_feedback_dialog_box()
{
fs_enqueue_local_style('fs_deactivation_feedback', '/admin/deactivation-feedback.css');
/* Check the type of user:
* 1. Long-term (long-term)
* 2. Non-registered and non-anonymous short-term (non-registered-and-non-anonymous-short-term).
* 3. Short-term (short-term)
*/
$is_long_term_user = true;
// Check if the site is at least 2 days old.
$time_installed = $this->_storage->install_timestamp;
// Difference in seconds.
$date_diff = time() - $time_installed;
// Convert seconds to days.
$date_diff_days = floor($date_diff / (60 * 60 * 24));
if ($date_diff_days < 2) {
$is_long_term_user = false;
}
$is_long_term_user = $this->apply_filters('is_long_term_user', $is_long_term_user);
if ($is_long_term_user) {
$user_type = 'long-term';
} else {
if (!$this->is_registered() && !$this->is_anonymous()) {
$user_type = 'non-registered-and-non-anonymous-short-term';
} else {
$user_type = 'short-term';
}
}
$uninstall_reasons = $this->_get_uninstall_reasons($user_type);
// Load the HTML template for the deactivation feedback dialog box.
$vars = array('reasons' => $uninstall_reasons, 'slug' => $this->_slug);
/**
* @todo Deactivation form core functions should be loaded only once! Otherwise, when there are multiple Freemius powered plugins the same code is loaded multiple times. The only thing that should be loaded differently is the various deactivation reasons object based on the state of the plugin.
*/
fs_require_template('deactivation-feedback-modal.php', $vars);
}
示例9: install_plugin_information
//.........这里部分代码省略.........
?filter=<?php
echo $key;
?>
"
target="_blank"
title="<?php
echo esc_attr(sprintf(_n('Click to see reviews that provided a rating of %d star', 'Click to see reviews that provided a rating of %d stars', $key), $key));
?>
"><?php
printf(_n('%d star', '%d stars', $key), $key);
?>
</a></span>
<span class="counter-back">
<span class="counter-bar" style="width: <?php
echo 92 * $_rating;
?>
px;"></span>
</span>
<span class="counter-count"><?php
echo number_format_i18n($ratecount);
?>
</span>
</div>
<?php
}
}
if (!empty($api->contributors)) {
?>
<h3><?php
_e('Contributors');
?>
</h3>
<ul class="contributors">
<?php
foreach ((array) $api->contributors as $contrib_username => $contrib_profile) {
if (empty($contrib_username) && empty($contrib_profile)) {
continue;
}
if (empty($contrib_username)) {
$contrib_username = preg_replace('/^.+\\/(.+)\\/?$/', '\\1', $contrib_profile);
}
$contrib_username = sanitize_user($contrib_username);
if (empty($contrib_profile)) {
echo "<li><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&s=36' width='18' height='18' />{$contrib_username}</li>";
} else {
echo "<li><a href='{$contrib_profile}' target='_blank'><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&s=36' width='18' height='18' />{$contrib_username}</a></li>";
}
}
?>
</ul>
<?php
if (!empty($api->donate_link)) {
?>
<a target="_blank"
href="<?php
echo esc_url($api->donate_link);
?>
"><?php
_e('Donate to this plugin »');
?>
</a>
<?php
}
?>
<?php
}
?>
</div>
<div id="section-holder" class="wrap">
<?php
if (!empty($api->tested) && version_compare(substr($GLOBALS['wp_version'], 0, strlen($api->tested)), $api->tested, '>')) {
echo '<div class="notice notice-warning"><p>' . '<strong>' . __('Warning:') . '</strong> ' . __('This plugin has not been tested with your current version of WordPress.') . '</p></div>';
} else {
if (!empty($api->requires) && version_compare(substr($GLOBALS['wp_version'], 0, strlen($api->requires)), $api->requires, '<')) {
echo '<div class="notice notice-warning"><p>' . '<strong>' . __('Warning:') . '</strong> ' . __('This plugin has not been marked as compatible with your version of WordPress.') . '</p></div>';
}
}
foreach ((array) $api->sections as $section_name => $content) {
$content = links_add_base_url($content, 'https://wordpress.org/plugins/' . $api->slug . '/');
$content = links_add_target($content, '_blank');
$san_section = esc_attr($section_name);
$display = $section_name === $section ? 'block' : 'none';
if ('description' === $section_name && (!$api->external && $api->wp_org_missing || $api->external && $api->fs_missing)) {
$missing_notice = array('type' => 'error', 'id' => md5(microtime()), 'message' => __fs($api->is_paid ? 'paid-addon-not-deployed' : 'free-addon-not-deployed', $api->slug));
fs_require_template('admin-notice.php', $missing_notice);
}
echo "\t<div id='section-{$san_section}' class='section' style='display: {$display};'>\n";
echo $content;
echo "\t</div>\n";
}
echo "</div>\n";
echo "</div>\n";
echo "</div>\n";
// #plugin-information-scrollable
echo "<div id='{$tab}-footer'>\n";
echo $this->get_plugin_cta($api);
echo "</div>\n";
iframe_footer();
exit;
}