本文整理汇总了PHP中fs_enqueue_local_style函数的典型用法代码示例。如果您正苦于以下问题:PHP fs_enqueue_local_style函数的具体用法?PHP fs_enqueue_local_style怎么用?PHP fs_enqueue_local_style使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fs_enqueue_local_style函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _account_page_load
function _account_page_load()
{
$this->_logger->entrance();
$this->_logger->info(var_export($_REQUEST, true));
fs_enqueue_local_style('fs_account', 'account.css');
$this->_handle_account_edits();
$this->do_action('fs_account_page_load_before_departure');
}
示例2: _addons_page_load
/**
* Load required resources before add-ons page render.
*
* @author Vova Feldman (@svovaf)
* @since 1.0.6
*/
function _addons_page_load()
{
$this->_logger->entrance();
fs_enqueue_local_style('fs_addons', '/admin/add-ons.css');
wp_enqueue_script('plugin-install');
add_thickbox();
function fs_addons_body_class($classes)
{
$classes .= ' plugins-php';
return $classes;
}
add_filter('admin_body_class', 'fs_addons_body_class');
if (!$this->is_registered() && $this->is_org_repo_compliant()) {
$this->_admin_notices->add(sprintf(__fs('addons-info-external-message', $this->_slug), '<b>' . $this->get_plugin_name() . '</b>'), __fs('heads-up', $this->_slug), 'update-nag');
}
}
示例3: _enqueue_styles
/**
* Enqueue common stylesheet to style admin notice.
*
* @author Vova Feldman (@svovaf)
* @since 1.0.7
*/
function _enqueue_styles()
{
fs_enqueue_local_style('fs_common', '/admin/common.css');
}
示例4: wp_enqueue_script
<?php
/**
* @package Freemius
* @copyright Copyright (c) 2015, Freemius, Inc.
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 1.0.7
*/
wp_enqueue_script('jquery');
wp_enqueue_script('json2');
fs_enqueue_local_script('postmessage', 'nojquery.ba-postmessage.min.js');
fs_enqueue_local_script('fs-postmessage', 'postmessage.js');
fs_enqueue_local_style('fs_connect', '/admin/connect.css');
$slug = $VARS['slug'];
$fs = freemius($slug);
$current_user = wp_get_current_user();
$first_name = $current_user->user_firstname;
if (empty($first_name)) {
$first_name = $current_user->nickname;
}
$site_url = get_site_url();
$protocol_pos = strpos($site_url, '://');
if (false !== $protocol_pos) {
$site_url = substr($site_url, $protocol_pos + 3);
}
$cfc_version = CFC_VERSION;
?>
<div class="wrap about-wrap">
示例5: wp_enqueue_script
<?php
/**
* @package Freemius
* @copyright Copyright (c) 2015, Freemius, Inc.
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 1.0.3
*/
if (!defined('ABSPATH')) {
exit;
}
wp_enqueue_script('jquery');
wp_enqueue_script('json2');
fs_enqueue_local_script('postmessage', 'nojquery.ba-postmessage.min.js');
fs_enqueue_local_script('fs-postmessage', 'postmessage.js');
fs_enqueue_local_style('fs_checkout', '/admin/common.css');
$slug = $VARS['slug'];
$fs = freemius($slug);
$context_params = array('plugin_id' => $fs->get_id(), 'plugin_public_key' => $fs->get_public_key(), 'plugin_version' => $fs->get_plugin_version());
// Get site context secure params.
if ($fs->is_registered()) {
$context_params = array_merge($context_params, FS_Security::instance()->get_context_params($fs->get_site(), time(), 'contact'));
}
$query_params = array_merge($_GET, array_merge($context_params, array('plugin_version' => $fs->get_plugin_version(), 'wp_login_url' => wp_login_url(), 'site_url' => get_site_url())));
?>
<div class="fs-secure-notice">
<i class="dashicons dashicons-lock"></i>
<span><b>Secure HTTPS contact page</b>, running via iframe from external domain</span>
</div>
<div id="fs_contact" class="wrap" style="margin: 40px 0 -65px -20px;">
<div id="iframe"></div>
示例6: wp_enqueue_script
<?php
/**
* @package Freemius
* @copyright Copyright (c) 2015, Freemius, Inc.
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 1.0.3
*/
if (!defined('ABSPATH')) {
exit;
}
wp_enqueue_script('jquery');
wp_enqueue_script('json2');
fs_enqueue_local_script('postmessage', 'nojquery.ba-postmessage.min.js');
fs_enqueue_local_script('fs-postmessage', 'postmessage.js');
fs_enqueue_local_style('fs_common', '/admin/common.css');
$slug = $VARS['slug'];
$fs = freemius($slug);
$timestamp = time();
$context_params = array('plugin_id' => $fs->get_id(), 'plugin_public_key' => $fs->get_public_key(), 'plugin_version' => $fs->get_plugin_version());
// Get site context secure params.
if ($fs->is_registered()) {
$site = $fs->get_site();
$plugin_id = fs_request_get('plugin_id', $fs->get_id());
if ($plugin_id != $fs->get_id()) {
if ($fs->is_addon_activated($plugin_id)) {
$fs_addon = Freemius::get_instance_by_id($plugin_id);
$site = $fs_addon->get_site();
}
}
$context_params = array_merge($context_params, FS_Security::instance()->get_context_params($site, $timestamp, 'checkout'));
示例7: _get_addon_info_filter
/**
* Generate add-on plugin information.
*
* @author Vova Feldman (@svovaf)
* @since 1.0.6
*
* @param array $data
* @param string $action
* @param object|null $args
*
* @return array|null
*/
function _get_addon_info_filter($data, $action = '', $args = null)
{
$this->_logger->entrance();
$parent_plugin_id = fs_request_get('parent_plugin_id', false);
if ($this->_fs->get_id() != $parent_plugin_id || 'plugin_information' !== $action || !isset($args->slug)) {
return $data;
}
// Find add-on by slug.
$selected_addon = $this->_fs->get_addon_by_slug($args->slug);
if (false === $selected_addon) {
return $data;
}
if (!isset($selected_addon->info)) {
// Setup some default info.
$selected_addon->info = new stdClass();
$selected_addon->info->selling_point_0 = 'Selling Point 1';
$selected_addon->info->selling_point_1 = 'Selling Point 2';
$selected_addon->info->selling_point_2 = 'Selling Point 3';
$selected_addon->info->description = '<p>Tell your users all about your add-on</p>';
}
fs_enqueue_local_style('fs_addons', '/admin/add-ons.css');
$data = $args;
$is_free = true;
// Load add-on pricing.
$has_pricing = false;
$has_features = false;
$plans = false;
$plans_result = $this->_fs->get_api_site_or_plugin_scope()->get("/addons/{$selected_addon->id}/plans.json");
if (!isset($plans_result->error)) {
$plans = $plans_result->plans;
if (is_array($plans)) {
for ($i = 0, $len = count($plans); $i < $len; $i++) {
$plans[$i] = new FS_Plugin_Plan($plans[$i]);
$plan = $plans[$i];
$pricing_result = $this->_fs->get_api_site_or_plugin_scope()->get("/addons/{$selected_addon->id}/plans/{$plan->id}/pricing.json");
if (!isset($pricing_result->error)) {
// Update plan's pricing.
$plan->pricing = $pricing_result->pricing;
if (is_array($plan->pricing) && !empty($plan->pricing)) {
$is_free = false;
foreach ($plan->pricing as &$pricing) {
$pricing = new FS_Pricing($pricing);
}
}
$has_pricing = true;
}
$features_result = $this->_fs->get_api_site_or_plugin_scope()->get("/addons/{$selected_addon->id}/plans/{$plan->id}/features.json");
if (!isset($features_result->error) && is_array($features_result->features) && 0 < count($features_result->features)) {
// Update plan's pricing.
$plan->features = $features_result->features;
$has_features = true;
}
}
}
}
// Fetch latest version from Freemius.
$latest = $this->_fs->_fetch_latest_version($selected_addon->id);
if (!$is_free) {
// If paid add-on, then it's not on wordpress.org
$is_wordpress_org = false;
} else {
// If no versions found, then assume it's a .org plugin.
$is_wordpress_org = false === $latest;
}
if ($is_wordpress_org) {
$repo_data = FS_Plugin_Updater::_fetch_plugin_info_from_repository('plugin_information', (object) array('slug' => $selected_addon->slug, 'is_ssl' => is_ssl(), 'fields' => array('banners' => true, 'reviews' => true, 'downloaded' => false, 'active_installs' => true)));
if (!empty($repo_data)) {
$data = $repo_data;
$data->wp_org_missing = false;
} else {
// Couldn't find plugin on .org.
$is_wordpress_org = false;
// Plugin is missing, not on Freemius nor WP.org.
$data->wp_org_missing = true;
}
}
if (!$is_wordpress_org) {
$data->checkout_link = $this->_fs->checkout_url();
$data->fs_missing = false === $latest;
if ($is_free) {
$data->download_link = $this->_fs->_get_latest_download_local_url($selected_addon->id);
}
}
if (!$is_wordpress_org) {
// Fetch as much as possible info from local files.
$plugin_local_data = $this->_fs->get_plugin_data();
$data->name = $selected_addon->title;
$data->author = $plugin_local_data['Author'];
//.........这里部分代码省略.........
示例8: sprintf
$activate_button_text = $header_title;
} else {
$freemius_site_url = $fs->has_paid_plan() ? 'https://freemius.com/wordpress/' : 'https://freemius.com/wordpress/usage-tracking/';
$freemius_link = '<a href="' . $freemius_site_url . '" target="_blank" tabindex="0">freemius.com</a>';
$message_below_input_field = sprintf(__fs('license-sync-disclaimer', $slug), $freemius_link);
$activate_button_text = __fs('agree-activate-license', $slug);
}
$license_key_text = __fs('license-key', $slug);
$modal_content_html = <<<HTML
\t<div class="notice notice-error inline license-activation-message"><p></p></div>
\t<p>{$message_above_input_field}</p>
\t<input class="license_key" type="text" placeholder="{$license_key_text}" tabindex="1" />
\t<a class="show-license-resend-modal show-license-resend-modal-{$slug}" href="!#" tabindex="2">{$cant_find_license_key_text}</a>
\t<p>{$message_below_input_field}</p>
HTML;
fs_enqueue_local_style('dialog-boxes', '/admin/dialog-boxes.css');
?>
<script type="text/javascript">
(function( $ ) {
$( document ).ready(function() {
var modalContentHtml = <?php
echo json_encode($modal_content_html);
?>
,
modalHtml =
'<div class="fs-modal fs-modal-license-activation">'
+ ' <div class="fs-modal-dialog">'
+ ' <div class="fs-modal-header">'
+ ' <h4><?php
echo $header_title;
?>
示例9: _addons_page_load
/**
* Load required resources before add-ons page render.
*
* @author Vova Feldman (@svovaf)
* @since 1.0.6
*/
function _addons_page_load()
{
$this->_logger->entrance();
fs_enqueue_local_style('fs_addons', '/admin/add-ons.css');
wp_enqueue_script('plugin-install');
add_thickbox();
function fs_addons_body_class($classes)
{
$classes .= ' plugins-php';
return $classes;
}
add_filter('admin_body_class', 'fs_addons_body_class');
if (!$this->is_registered() && $this->is_org_repo_compliant()) {
$this->_admin_notices->add(sprintf(__('Just letting you know that the add-ons information of %s is being pulled from external server.', WP_FS__SLUG), '<b>' . $this->get_plugin_name() . '</b>'), __('Heads up ', WP_FS__SLUG), 'update-nag');
}
}