本文整理汇总了PHP中fs_enqueue_local_script函数的典型用法代码示例。如果您正苦于以下问题:PHP fs_enqueue_local_script函数的具体用法?PHP fs_enqueue_local_script怎么用?PHP fs_enqueue_local_script使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fs_enqueue_local_script函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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">
示例2: _enqueue_connect_essentials
/**
* Enqueue connect requires scripts and styles.
*
* @author Vova Feldman (@svovaf)
* @since 1.1.4
*/
function _enqueue_connect_essentials()
{
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');
}
示例3: fs
<?php
$slug = $VARS['slug'];
$fs = fs($slug);
fs_enqueue_local_script('jquery-postmessage', 'jquery.ba-postmessage.min.js');
$timestamp = time();
$site = $fs->get_site();
$params = array('context_site' => $site->id, 's_ctx_ts' => $timestamp, 's_ctx_secure' => md5($timestamp . $site->id . $site->secret_key . $site->public_key . 'upgrade'), 'next' => fs_get_admin_plugin_url('account') . '&action=sync_license');
?>
<div>
<div id="iframe"></div>
<form action="" method="POST">
<input type="hidden" name="user_id" />
<input type="hidden" name="user_email" />
<input type="hidden" name="site_id" />
<input type="hidden" name="public_key" />
<input type="hidden" name="secret_key" />
<input type="hidden" name="action" value="account" />
</form>
<script type="text/javascript">
(function($) {
$(function () {
var
// Keep track of the iframe height.
iframe_height = 800,
domain = '<?php
echo WP_RW__LOCALHOST_SCRIPTS ? WP_RW__ADDRESS : WP_RW__SECURE_ADDRESS;
?>
',