当前位置: 首页>>代码示例>>PHP>>正文


PHP FrmAppHelper::pro_is_installed方法代码示例

本文整理汇总了PHP中FrmAppHelper::pro_is_installed方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmAppHelper::pro_is_installed方法的具体用法?PHP FrmAppHelper::pro_is_installed怎么用?PHP FrmAppHelper::pro_is_installed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FrmAppHelper的用法示例。


在下文中一共展示了FrmAppHelper::pro_is_installed方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pro_tip

    public static function pro_tip($callback, $html = '')
    {
        if (FrmAppHelper::pro_is_installed()) {
            return;
        }
        $tips = self::$callback();
        $tip = self::get_random_tip($tips);
        if ($html == 'p') {
            echo '<p>';
        }
        ?>
		<a href="<?php 
        echo esc_url(FrmAppHelper::make_affiliate_url($tip['link']));
        ?>
" target="_blank" class="frm_pro_tip">
			<span><i class="frm_icon_font frm_check1_icon"></i>  Pro Tip:</span>
			<?php 
        echo esc_html($tip['tip']);
        ?>
			<?php 
        if (isset($tip['call'])) {
            ?>
				<span><?php 
            echo esc_html($tip['call']);
            ?>
</span>
			<?php 
        }
        ?>
		</a>
		<?php 
        if ($html == 'p') {
            echo '</p>';
        }
    }
开发者ID:hugocica,项目名称:locomotiva-2016,代码行数:35,代码来源:FrmTipsHelper.php

示例2: menu

 public static function menu()
 {
     add_submenu_page('formidable', 'Formidable | ' . __('AddOns', 'formidable'), __('AddOns', 'formidable'), 'frm_view_forms', 'formidable-addons', 'FrmAddonsController::list_addons');
     if (!FrmAppHelper::pro_is_installed()) {
         add_submenu_page('formidable', 'Formidable | ' . __('Upgrade to Pro', 'formidable'), __('Upgrade to Pro', 'formidable'), 'frm_view_forms', 'formidable-pro-upgrade', 'FrmAddonsController::upgrade_to_pro');
     }
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:7,代码来源:FrmAddonsController.php

示例3: prepare_items

 public function prepare_items()
 {
     global $wpdb, $per_page;
     $per_page = $this->get_items_per_page('formidable_page_formidable_entries_per_page');
     $form_id = $this->params['form'];
     if (!$form_id) {
         $this->items = array();
         $this->set_pagination_args(array('total_items' => 0, 'per_page' => $per_page));
         return;
     }
     $default_orderby = 'id';
     $default_order = 'DESC';
     $s_query = array('it.form_id' => $form_id);
     $s = isset($_REQUEST['s']) ? stripslashes($_REQUEST['s']) : '';
     if ($s != '' && FrmAppHelper::pro_is_installed()) {
         $fid = isset($_REQUEST['fid']) ? sanitize_title($_REQUEST['fid']) : '';
         $s_query = FrmProEntriesHelper::get_search_str($s_query, $s, $form_id, $fid);
     }
     $orderby = isset($_REQUEST['orderby']) ? sanitize_title($_REQUEST['orderby']) : $default_orderby;
     if (strpos($orderby, 'meta') !== false) {
         $order_field_type = FrmField::get_type(str_replace('meta_', '', $orderby));
         $orderby .= in_array($order_field_type, array('number', 'scale')) ? ' +0 ' : '';
     }
     $order = isset($_REQUEST['order']) ? sanitize_title($_REQUEST['order']) : $default_order;
     $order = ' ORDER BY ' . $orderby . ' ' . $order;
     $page = $this->get_pagenum();
     $start = (int) isset($_REQUEST['start']) ? absint($_REQUEST['start']) : ($page - 1) * $per_page;
     $this->items = FrmEntry::getAll($s_query, $order, ' LIMIT ' . $start . ',' . $per_page, true, false);
     $total_items = FrmEntry::getRecordCount($s_query);
     $this->set_pagination_args(array('total_items' => $total_items, 'per_page' => $per_page));
 }
开发者ID:hugocica,项目名称:locomotiva-2016,代码行数:31,代码来源:FrmEntriesListHelper.php

示例4: test_pro_is_installed

 /**
  * @covers FrmAppHelper::pro_is_installed
  */
 function test_pro_is_installed()
 {
     $active = FrmAppHelper::pro_is_installed();
     if (is_callable('FrmUpdatesController::pro_is_authorized')) {
         $this->assertTrue($active);
     } else {
         $this->assertFalse($active);
     }
 }
开发者ID:rbkhrlstn,项目名称:formidable-forms,代码行数:12,代码来源:test_FrmAppHelper.php

示例5: fill_entry_values

 public static function fill_entry_values($atts, $f, array &$values)
 {
     if (FrmField::is_no_save_field($f->type)) {
         return;
     }
     if ($atts['default_email']) {
         self::get_field_shortcodes_for_default_email($f, $values);
         return;
     }
     if ($atts['entry'] && !isset($atts['entry']->metas[$f->id])) {
         // In case include_blank is set
         $atts['entry']->metas[$f->id] = '';
         if (FrmAppHelper::pro_is_installed()) {
             FrmProEntryMeta::add_post_value_to_entry($f, $atts['entry']);
             FrmProEntryMeta::add_repeating_value_to_entry($f, $atts['entry']);
         }
     }
     $val = '';
     if ($atts['entry']) {
         $prev_val = maybe_unserialize($atts['entry']->metas[$f->id]);
         $meta = array('item_id' => $atts['id'], 'field_id' => $f->id, 'meta_value' => $prev_val, 'field_type' => $f->type);
         //This filter applies to the default-message shortcode and frm-show-entry shortcode only
         if (isset($atts['filter']) && $atts['filter'] == false) {
             $val = $prev_val;
         } else {
             $val = apply_filters('frm_email_value', $prev_val, (object) $meta, $atts['entry']);
         }
     }
     // Don't include blank values
     if (!$atts['include_blank'] && FrmAppHelper::is_empty_value($val)) {
         return;
     }
     self::textarea_display_value($f->type, $atts['plain_text'], $val);
     $val = apply_filters('frm_display_' . $f->type . '_value_custom', $val, array('field' => $f, 'atts' => $atts));
     if (is_array($val)) {
         if ($atts['format'] == 'text') {
             $val = implode(', ', $val);
         } else {
             if ($f->type == 'checkbox') {
                 $val = array_values($val);
             }
         }
     }
     self::maybe_strip_html($atts['plain_text'], $val);
     if ($atts['format'] != 'text') {
         $values[$f->field_key] = $val;
         if (isset($prev_val) && $prev_val != $val && $f->type != 'textarea') {
             $values[$f->field_key . '-value'] = $prev_val;
         }
     } else {
         $values[$f->id] = array('label' => $f->name, 'val' => $val);
     }
 }
开发者ID:hugocica,项目名称:locomotiva-2016,代码行数:53,代码来源:FrmEntryFormat.php

示例6: setUp

 /**
  * Ensure that the plugin has been installed and activated.
  */
 function setUp()
 {
     parent::setUp();
     $this->frm_install();
     $this->factory->form = new Form_Factory($this);
     $this->factory->field = new Field_Factory($this);
     $this->factory->entry = new Entry_Factory($this);
     $this->is_pro_active = FrmAppHelper::pro_is_installed();
     $current_class_name = get_class($this);
     if (strpos($current_class_name, 'FrmPro') && !$this->is_pro_active) {
         $this->markTestSkipped('Pro is not active');
     }
 }
开发者ID:knightzac19,项目名称:formidable-forms,代码行数:16,代码来源:FrmUnitTest.php

示例7: form

 public static function form($errors = array(), $message = '')
 {
     $forms = FrmForm::getAll(array('status' => array(null, '', 'published')), 'name');
     $export_types = apply_filters('frm_xml_export_types', array('forms' => __('Forms', 'formidable')));
     $export_format = apply_filters('frm_export_formats', array('xml' => array('name' => 'XML', 'support' => 'forms', 'count' => 'multiple')));
     if (FrmAppHelper::pro_is_installed()) {
         $frmpro_settings = new FrmProSettings();
         $csv_format = $frmpro_settings->csv_format;
     } else {
         $csv_format = 'UTF-8';
     }
     include FrmAppHelper::plugin_path() . '/classes/views/xml/import_form.php';
 }
开发者ID:rbkhrlstn,项目名称:formidable-forms,代码行数:13,代码来源:FrmXMLController.php

示例8: include_new_field

 /**
  * @param integer $form_id
  */
 public static function include_new_field($field_type, $form_id)
 {
     $values = array();
     if (FrmAppHelper::pro_is_installed()) {
         $values['post_type'] = FrmProFormsHelper::post_type($form_id);
     }
     $field_values = apply_filters('frm_before_field_created', FrmFieldsHelper::setup_new_vars($field_type, $form_id));
     $field_id = FrmField::create($field_values);
     if (!$field_id) {
         return false;
     }
     $field = self::include_single_field($field_id, $values, $form_id);
     return $field;
 }
开发者ID:EyesX,项目名称:formidable-forms,代码行数:17,代码来源:FrmFieldsController.php

示例9: esc_attr

                    </td>
                    <td>
                        <span class="success_action_redirect_box success_action_box<?php 
echo $values['success_action'] == 'redirect' ? '' : ' frm_hidden';
?>
">
                            <input type="text" name="options[success_url]" id="success_url" value="<?php 
if (isset($values['success_url'])) {
    echo esc_attr($values['success_url']);
}
?>
" placeholder="http://example.com" />
                        </span>

						<?php 
if (FrmAppHelper::pro_is_installed()) {
    ?>
                        <span class="success_action_page_box success_action_box<?php 
    echo $values['success_action'] == 'page' ? '' : ' frm_hidden';
    ?>
">
                            <label><?php 
    _e('Use Content from Page', 'formidable');
    ?>
</label>
                            <?php 
    FrmAppHelper::wp_pages_dropdown('options[success_page_id]', $values['success_page_id']);
    ?>
                        </span>
                        <?php 
}
开发者ID:mazykin46,项目名称:portfolio,代码行数:31,代码来源:settings.php

示例10: get_value_from_entry

 /**
  * Get the value from a specific field and entry
  *
  * @since 2.01.02
  * @param object $entry
  * @param int $field_id
  * @return array|bool|mixed|string
  */
 private static function get_value_from_entry($entry, $field_id)
 {
     $observed_value = '';
     if (isset($entry->metas[$field_id])) {
         $observed_value = $entry->metas[$field_id];
     } else {
         if ($entry->post_id && FrmAppHelper::pro_is_installed()) {
             $field = FrmField::getOne($field_id);
             $observed_value = FrmProEntryMetaHelper::get_post_or_meta_value($entry, $field, array('links' => false, 'truncate' => false));
         }
     }
     return $observed_value;
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:21,代码来源:FrmFormAction.php

示例11: get_shortcodes

 public static function get_shortcodes($content, $form_id)
 {
     if (FrmAppHelper::pro_is_installed()) {
         return FrmProDisplaysHelper::get_shortcodes($content, $form_id);
     }
     $fields = FrmField::getAll(array('fi.form_id' => (int) $form_id, 'fi.type not' => FrmField::no_save_fields()));
     $tagregexp = self::allowed_shortcodes($fields);
     preg_match_all("/\\[(if )?({$tagregexp})\\b(.*?)(?:(\\/))?\\](?:(.+?)\\[\\/\\])?/s", $content, $matches, PREG_PATTERN_ORDER);
     return $matches;
 }
开发者ID:EyesX,项目名称:formidable-forms,代码行数:10,代码来源:FrmFieldsHelper.php

示例12: is_formidable_supported

 public static function is_formidable_supported($version)
 {
     if (!class_exists('FrmProDisplay')) {
         return false;
     }
     global $frm_version;
     if ($frm_version) {
         /**
          * Get the plugin version when < 2.0
          */
         $current_frm_version = $frm_version;
     } else {
         if (is_callable('FrmAppHelper::plugin_version')) {
             /**
              * Get the plugin version when > 2.0
              */
             $current_frm_version = FrmAppHelper::plugin_version();
         }
     }
     if (version_compare($current_frm_version, $version, '>=') === true) {
         global $frmpro_is_installed;
         if ($frmpro_is_installed) {
             return true;
         }
         /**
          * Check if pro is installed in 2.0+
          */
         return is_callable('FrmAppHelper::pro_is_installed') && FrmAppHelper::pro_is_installed();
     }
     return false;
 }
开发者ID:vfontjr,项目名称:formidable-pro-pdf-extended,代码行数:31,代码来源:pdf-common.php

示例13: array

<?php

$read_only = false;
if (isset($field['post_field']) && $field['post_field'] == 'post_category' && FrmAppHelper::pro_is_installed()) {
    echo FrmProPost::get_category_dropdown($field, array('location' => 'front', 'name' => $field_name, 'id' => $html_id));
} else {
    if (FrmAppHelper::pro_is_installed() && FrmField::is_read_only($field)) {
        $read_only = true;
        echo FrmProDropdownFieldsController::get_hidden_fields_with_readonly_values($field, $field_name, $html_id);
        ?>
		<select <?php 
        do_action('frm_field_input_html', $field);
        ?>
> <?php 
    } else {
        ?>
		<select name="<?php 
        echo esc_attr($field_name);
        ?>
" id="<?php 
        echo esc_attr($html_id);
        ?>
" <?php 
        do_action('frm_field_input_html', $field);
        ?>
>
	<?php 
    }
    $other_opt = $other_checked = false;
    foreach ($field['options'] as $opt_key => $opt) {
        $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field);
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:31,代码来源:dropdown-field.php

示例14: esc_url

echo esc_url(admin_url('admin.php?page=formidable-entries&frm_action=list&form=' . $id));
?>
"><?php 
_e('Entries', 'formidable');
?>
</a></li>
<?php 
if (current_user_can('frm_edit_displays')) {
    ?>
	<li> <a<?php 
    if ($current_page == 'frm_display' || $pagenow == 'post.php' || $pagenow == 'post-new.php' || $current_page == 'formidable-entry-templates') {
        echo ' class="current_page"';
    }
    ?>
 href="<?php 
    echo esc_url((FrmAppHelper::pro_is_installed() ? admin_url('edit.php?post_type=frm_display') : admin_url('admin.php?page=formidable-entry-templates')) . '&form=' . $id . '&show_nav=1');
    ?>
"><?php 
    _e('Views', 'formidable');
    ?>
</a></li>
<?php 
}
if (current_user_can('frm_view_reports')) {
    ?>
	<li> <a<?php 
    FrmAppHelper::select_current_page('formidable', $current_page, array('reports'));
    ?>
 href="<?php 
    echo esc_url(admin_url('admin.php?page=formidable&frm_action=reports&form=' . $id . '&show_nav=1'));
    ?>
开发者ID:mazykin46,项目名称:portfolio,代码行数:31,代码来源:form-nav.php

示例15: get_actions

 /**
  * @param string $edit_link
  * @param string $duplicate_link
  */
 private function get_actions(&$actions, $item, $edit_link, $duplicate_link)
 {
     if ('trash' == $this->status) {
         if (current_user_can('frm_edit_forms')) {
             $actions['restore'] = FrmFormsHelper::delete_trash_link($item->id, $item->status, 'short');
         }
         if (current_user_can('frm_delete_forms')) {
             $actions['trash'] = '<a href="' . esc_url(wp_nonce_url('?page=formidable&form_status=trash&frm_action=destroy&id=' . $item->id, 'destroy_form_' . $item->id)) . '" class="submitdelete"  onclick="return confirm(\'' . __('Are you sure you want to permanently delete that?', 'formidable') . '\')">' . __('Delete Permanently') . '</a>';
         }
         return;
     }
     if (current_user_can('frm_edit_forms')) {
         if (!$item->is_template || !$item->default_template) {
             $actions['frm_edit'] = '<a href="' . esc_url($edit_link) . '">' . __('Edit') . '</a>';
         }
         if ($item->is_template) {
             $actions['frm_duplicate'] = '<a href="' . esc_url(wp_nonce_url($duplicate_link)) . '">' . __('Create Form from Template', 'formidable') . '</a>';
         } else {
             $actions['frm_settings'] = '<a href="' . esc_url('?page=formidable&frm_action=settings&id=' . $item->id) . '">' . __('Settings', 'formidable') . '</a>';
             if (FrmAppHelper::pro_is_installed()) {
                 $actions['duplicate'] = '<a href="' . esc_url(wp_nonce_url($duplicate_link)) . '">' . __('Duplicate', 'formidable') . '</a>';
             }
         }
     }
     $actions['trash'] = FrmFormsHelper::delete_trash_link($item->id, $item->status, 'short');
     if (empty($actions['trash'])) {
         // the user doesn't have permission
         unset($actions['trash']);
     }
     $actions['view'] = '<a href="' . esc_url(FrmFormsHelper::get_direct_link($item->form_key, $item)) . '" target="_blank">' . __('Preview') . '</a>';
 }
开发者ID:mazykin46,项目名称:portfolio,代码行数:35,代码来源:FrmFormsListHelper.php


注:本文中的FrmAppHelper::pro_is_installed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。