本文整理汇总了PHP中FrmAppHelper::plugin_url方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmAppHelper::plugin_url方法的具体用法?PHP FrmAppHelper::plugin_url怎么用?PHP FrmAppHelper::plugin_url使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrmAppHelper
的用法示例。
在下文中一共展示了FrmAppHelper::plugin_url方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
echo isset($action_control->action_options['limit']) ? esc_attr($action_control->action_options['limit']) : '99';
?>
" data-actiontype="<?php
echo esc_attr($action_control->id_base);
?>
"></a></li>
<?php
unset($actions_icon);
}
?>
</ul>
</div>
<div class="frm_no_actions">
<div class="inner_actions">
<img src="<?php
echo FrmAppHelper::plugin_url() . '/images/sketch_arrow1.png';
?>
" alt=""/>
<div class="clear"></div>
<?php
_e('Click an action to add it to this form', 'formidable');
?>
</div>
</div>
<?php
FrmFormActionsController::list_actions($form, $values);
?>
</div>
<div id="html_settings" class="tabs-panel <?php
echo $a == 'html_settings' ? ' frm_block' : ' frm_hidden';
示例2: jquery_css_url
public static function jquery_css_url($theme_css)
{
if ($theme_css == -1) {
return;
}
$uploads = wp_upload_dir();
if (!$theme_css or $theme_css == '' or $theme_css == 'ui-lightness') {
$css_file = FrmAppHelper::plugin_url() . '/css/ui-lightness/jquery-ui.css';
} else {
if (preg_match('/^http.?:\\/\\/.*\\..*$/', $theme_css)) {
$css_file = $theme_css;
} else {
$file_path = '/formidable/css/' . $theme_css . '/jquery-ui.css';
if (file_exists($uploads['basedir'] . $file_path)) {
if (is_ssl() and !preg_match('/^https:\\/\\/.*\\..*$/', $uploads['baseurl'])) {
$uploads['baseurl'] = str_replace('http://', 'https://', $uploads['baseurl']);
}
$css_file = $uploads['baseurl'] . $file_path;
} else {
$css_file = 'http' . (is_ssl() ? 's' : '') . '://ajax.googleapis.com/ajax/libs/jqueryui/1.7.3/themes/' . $theme_css . '/jquery-ui.css';
}
}
}
return $css_file;
}
示例3: test_load_wp_admin_style
/**
* @covers FrmAppController::load_wp_admin_style
*/
public function test_load_wp_admin_style()
{
$this->set_admin_screen();
ob_start();
do_action('admin_enqueue_scripts');
do_action('admin_print_styles');
$styles = ob_get_contents();
ob_end_clean();
$this->assertNotEmpty($styles);
$this->assertTrue(strpos($styles, FrmAppHelper::plugin_url() . '/css/frm_fonts.css') !== false, 'The frm_fonts stylesheet is missing');
}
示例4: jquery_css_url
public static function jquery_css_url($theme_css)
{
if ($theme_css == -1) {
return;
}
if (!$theme_css || $theme_css == '' || $theme_css == 'ui-lightness') {
$css_file = FrmAppHelper::plugin_url() . '/css/ui-lightness/jquery-ui.css';
} else {
if (preg_match('/^http.?:\\/\\/.*\\..*$/', $theme_css)) {
$css_file = $theme_css;
} else {
$uploads = self::get_upload_base();
$file_path = '/formidable/css/' . $theme_css . '/jquery-ui.css';
if (file_exists($uploads['basedir'] . $file_path)) {
$css_file = $uploads['baseurl'] . $file_path;
} else {
$css_file = FrmAppHelper::jquery_ui_base_url() . '/themes/' . $theme_css . '/jquery-ui.min.css';
}
}
}
return $css_file;
}
示例5: test_plugin_url
/**
* @covers FrmAppHelper::plugin_url
*/
function test_plugin_url()
{
$url = FrmAppHelper::plugin_url();
$this->assertNotEmpty($url);
}
示例6: show_form_button
public static function show_form_button($id)
{
if ($id != 'content') {
return;
}
echo '<a href="#TB_inline?width=450&height=550&inlineId=frm_insert_form" class="thickbox" title="' . __("Add Formidable Form", 'formidable') . '"><img src="' . esc_url(FrmAppHelper::plugin_url() . '/images/form_16.png') . '" alt="' . __("Add Formidable Form", 'formidable') . '" /></a>';
}
示例7: front_head
public static function front_head()
{
$version = FrmAppHelper::plugin_version();
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_register_script('formidable', FrmAppHelper::plugin_url() . "/js/formidable{$suffix}.js", array('jquery'), $version, true);
wp_register_script('jquery-placeholder', FrmAppHelper::plugin_url() . '/js/jquery/jquery.placeholder.js', array('jquery'), '2.0.7', true);
if (FrmAppHelper::is_admin()) {
// don't load this in back-end
return;
}
FrmAppHelper::localize_script('front');
FrmStylesController::enqueue_css('register');
}
示例8: esc_url
<div class="wrap upgrade_to_pro">
<h1 class="frm_pro_heading">
<img src="<?php
echo esc_url(FrmAppHelper::plugin_url());
?>
/images/logo.png" alt="Upgrade to Pro" />
<span class="alignright">Save time and make life easier. Upgrade to Pro.</span>
<span class="clear"></span>
</h1>
<div class="clear"></div>
<p>Enhance your basic Formidable forms with a plethora of Pro field types and features. Create advanced forms and data-driven applications in no time at all.</p>
<p>Are you collecting data offline? Streamline your business by using your forms to get online. Whether you need surveys, polls, client contracts, mortgage calculators, or directories, we've got you covered. Save time by allowing clients to return and make changes to their own submissions, or let them contribute content to your site. Generate more leads by adding headings and page breaks, only showing the fields you need, and letting your clients repeat a section of fields as many times as they need.</p>
<p>Projects that once seemed impossible are within your reach with Pro. That project you’ve been dreaming of pursuing? Chances are <strong>Formidable Pro can handle it</strong>.</p><br/>
<table class="wp-list-table widefat fixed striped frm_pricing">
<thead>
<tr>
<th></th>
<?php
foreach ($pro_pricing as $price_info) {
?>
<th>
<h3><?php
echo esc_attr(ucfirst($price_info['name']));
?>
</h3>
<h4>$<?php
echo esc_attr($price_info['price']);
?>
示例9: replace_shortcodes
//.........这里部分代码省略.........
$content = self::check_conditional_shortcode($content, $entry->{$this_tag}, $atts, $tag);
} else {
if (isset($atts['time_ago'])) {
$date = FrmProAppHelper::human_time_diff(strtotime($entry->{$this_tag}));
} else {
$date = FrmProAppHelper::get_formatted_time($entry->{$this_tag}, $atts['format'], $time_format);
}
$content = str_replace($shortcodes[0][$short_key], $date, $content);
}
unset($this_tag);
break;
case 'created_by':
case 'created-by':
case 'updated_by':
case 'updated-by':
$this_tag = str_replace('-', '_', $tag);
$replace_with = self::get_display_value($entry->{$this_tag}, (object) array('type' => 'user_id'), $atts);
if ($conditional) {
$atts['short_key'] = $shortcodes[0][$short_key];
$content = self::check_conditional_shortcode($content, $entry->{$this_tag}, $atts, $tag);
} else {
$content = str_replace($shortcodes[0][$short_key], $replace_with, $content);
}
unset($this_tag);
unset($replace_with);
break;
case 'evenodd':
$content = str_replace($shortcodes[0][$short_key], $odd, $content);
break;
case 'siteurl':
$content = str_replace($shortcodes[0][$short_key], FrmAppHelper::site_url(), $content);
break;
case 'frmurl':
$content = str_replace($shortcodes[0][$short_key], FrmAppHelper::plugin_url(), $content);
break;
case 'sitename':
$content = str_replace($shortcodes[0][$short_key], get_option('blogname'), $content);
break;
case 'get':
if (isset($atts['param'])) {
$param = $atts['param'];
$replace_with = FrmAppHelper::get_param($param);
if (is_array($replace_with)) {
$replace_with = implode(', ', $replace_with);
}
$content = str_replace($shortcodes[0][$short_key], $replace_with, $content);
unset($param);
unset($replace_with);
}
break;
default:
if ($tag == 'deletelink') {
$page_id = isset($atts['page_id']) ? $atts['page_id'] : ($post ? $post->ID : 0);
if (!isset($atts['label'])) {
$atts['label'] = false;
}
$delete_atts = $atts;
$delete_atts['id'] = $entry->id;
$delete_atts['page_id'] = $page_id;
$replace_with = FrmProEntriesController::entry_delete_link($delete_atts);
unset($delete_atts);
$field = false;
} else {
if ($tag == 'editlink') {
$replace_with = '';
$link_text = isset($atts['label']) ? $atts['label'] : false;
示例10: render_meta_box_content
public static function render_meta_box_content($post)
{
global $frm_vars;
$count = isset($frm_vars['post_forms']) ? count($frm_vars['post_forms']) : 0;
$i = 1;
echo '<p>';
foreach ((array) $frm_vars['post_forms'] as $form) {
if ($i != 1) {
echo ' | ';
}
$i++;
echo '<a href="javascript:frm_create_post_entry(' . $form->id . ',' . $post->ID . ')">' . FrmAppHelper::truncate($form->name, 15) . '</a>';
unset($form);
}
unset($i);
echo '</p>';
echo "<script type='text/javascript'>function frm_create_post_entry(id,post_id){\njQuery('#frm_create_entry p').replaceWith('<img src=\"" . FrmAppHelper::plugin_url() . "/images/wpspin_light.gif\" alt=\"" . __('Loading…') . "\" />');\njQuery.ajax({type:'POST',url:'" . admin_url('admin-ajax.php') . "',data:'action=frm_create_post_entry&id='+id+'&post_id='+post_id,\nsuccess:function(msg){jQuery('#frm_create_entry').fadeOut('slow');}\n});\n};</script>";
}
示例11: replace_shortcodes
public static function replace_shortcodes($html, $form, $title = false, $description = false, $values = array())
{
foreach (array('form_name' => $title, 'form_description' => $description, 'entry_key' => true) as $code => $show) {
if ($code == 'form_name') {
$replace_with = $form->name;
} else {
if ($code == 'form_description') {
if (apply_filters('frm_use_wpautop', true)) {
$replace_with = wpautop(str_replace('<br>', '<br />', $form->description));
} else {
$replace_with = $form->description;
}
} else {
if ($code == 'entry_key' and isset($_GET) and isset($_GET['entry'])) {
$replace_with = $_GET['entry'];
}
}
}
if (FrmAppHelper::is_true($show) && $replace_with != '') {
$html = str_replace('[if ' . $code . ']', '', $html);
$html = str_replace('[/if ' . $code . ']', '', $html);
} else {
$html = preg_replace('/(\\[if\\s+' . $code . '\\])(.*?)(\\[\\/if\\s+' . $code . '\\])/mis', '', $html);
}
$html = str_replace('[' . $code . ']', $replace_with, $html);
}
//replace [form_key]
$html = str_replace('[form_key]', $form->form_key, $html);
//replace [frmurl]
$html = str_replace('[frmurl]', FrmAppHelper::plugin_url(), $html);
if (strpos($html, '[button_label]')) {
$replace_with = apply_filters('frm_submit_button', $title, $form);
$html = str_replace('[button_label]', $replace_with, $html);
}
$html = apply_filters('frm_form_replace_shortcodes', $html, $form, $values);
if (strpos($html, '[if back_button]')) {
$html = preg_replace('/(\\[if\\s+back_button\\])(.*?)(\\[\\/if\\s+back_button\\])/mis', '', $html);
}
if (strpos($html, '[if save_draft]')) {
$html = preg_replace('/(\\[if\\s+save_draft\\])(.*?)(\\[\\/if\\s+save_draft\\])/mis', '', $html);
}
return $html;
}
示例12: dynamic_default_values
/**
* Get the value to replace a few standard shortcodes
*
* @since 2.0
* @return string
*/
public static function dynamic_default_values($tag, $atts = array(), $return_array = false)
{
$new_value = '';
switch ($tag) {
case 'admin_email':
$new_value = get_option('admin_email');
break;
case 'siteurl':
$new_value = FrmAppHelper::site_url();
break;
case 'frmurl':
$new_value = FrmAppHelper::plugin_url();
break;
case 'sitename':
$new_value = FrmAppHelper::site_name();
break;
case 'get':
$new_value = self::process_get_shortcode($atts, $return_array);
break;
}
return $new_value;
}
示例13: admin_js
public static function admin_js()
{
$version = FrmAppHelper::plugin_version();
FrmAppHelper::load_admin_wide_js(false);
wp_register_script('formidable_admin', FrmAppHelper::plugin_url() . '/js/formidable_admin.js', array('formidable_admin_global', 'formidable', 'jquery', 'jquery-ui-core', 'jquery-ui-draggable', 'jquery-ui-sortable', 'bootstrap_tooltip', 'bootstrap-multiselect'), $version, true);
wp_register_style('formidable-admin', FrmAppHelper::plugin_url() . '/css/frm_admin.css', array(), $version);
wp_register_script('bootstrap_tooltip', FrmAppHelper::plugin_url() . '/js/bootstrap.min.js', array('jquery'), '3.3.4');
// load multselect js
wp_register_script('bootstrap-multiselect', FrmAppHelper::plugin_url() . '/js/bootstrap-multiselect.js', array('jquery', 'bootstrap_tooltip'), '0.9.8', true);
$page = FrmAppHelper::simple_get('page', 'sanitize_title');
$post_type = FrmAppHelper::simple_get('post_type', 'sanitize_title');
global $pagenow;
if (strpos($page, 'formidable') === 0 || $pagenow == 'edit.php' && $post_type == 'frm_display') {
wp_enqueue_script('admin-widgets');
wp_enqueue_style('widgets');
wp_enqueue_script('formidable');
wp_enqueue_script('formidable_admin');
FrmAppHelper::localize_script('admin');
wp_enqueue_style('formidable-admin');
add_thickbox();
wp_register_script('formidable-editinplace', FrmAppHelper::plugin_url() . '/js/jquery/jquery.editinplace.packed.js', array('jquery'), '2.3.0');
} else {
if ($pagenow == 'post.php' || $pagenow == 'post-new.php' && $post_type == 'frm_display') {
if (isset($_REQUEST['post_type'])) {
$post_type = sanitize_title($_REQUEST['post_type']);
} else {
if (isset($_REQUEST['post']) && absint($_REQUEST['post'])) {
$post = get_post(absint($_REQUEST['post']));
if (!$post) {
return;
}
$post_type = $post->post_type;
} else {
return;
}
}
if ($post_type == 'frm_display') {
wp_enqueue_script('jquery-ui-draggable');
wp_enqueue_script('formidable_admin');
wp_enqueue_style('formidable-admin');
FrmAppHelper::localize_script('admin');
}
} else {
if ($pagenow == 'widgets.php') {
FrmAppHelper::load_admin_wide_js();
}
}
}
}
示例14: load_admin_wide_js
/**
* Load the JS file on non-Formidable pages in the admin area
* @since 2.0
*/
public static function load_admin_wide_js($load = true)
{
$version = FrmAppHelper::plugin_version();
wp_register_script('formidable_admin_global', FrmAppHelper::plugin_url() . '/js/formidable_admin_global.js', array('jquery'), $version);
wp_localize_script('formidable_admin_global', 'frmGlobal', array('updating_msg' => __('Please wait while your site updates.', 'formidable'), 'deauthorize' => __('Are you sure you want to deauthorize Formidable Forms on this site?', 'formidable'), 'url' => FrmAppHelper::plugin_url(), 'loading' => __('Loading…'), 'nonce' => wp_create_nonce('frm_ajax')));
if ($load) {
wp_enqueue_script('formidable_admin_global');
}
}
示例15: esc_attr_e
}
?>
</select>
<input type="button" id="frm_create_template_button" class="button-secondary" value="<?php
esc_attr_e('Load Template', 'formidable');
?>
" />
</p>
<div class="alignleft sketch3">
<div class="alignright"><?php
_e('3. Save your form', 'formidable');
?>
</div>
<img src="<?php
echo esc_url(FrmAppHelper::plugin_url() . '/images/sketch_arrow3.png');
?>
" alt="" />
</div>
<div class="clear"></div>
</div>
<ul id="new_fields" class="frm_sorting inside">
<?php
if (isset($values['fields']) && !empty($values['fields'])) {
$count = 0;
foreach ($values['fields'] as $field) {
$count++;
$field_name = 'item_meta[' . $field['id'] . ']';
$html_id = FrmFieldsHelper::get_html_id($field);
require FrmAppHelper::plugin_path() . '/classes/views/frm-forms/add_field.php';
unset($field, $field_name);