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


PHP vc_post_param函数代码示例

本文整理汇总了PHP中vc_post_param函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_post_param函数的具体用法?PHP vc_post_param怎么用?PHP vc_post_param使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: vc_get_autocomplete_suggestion

/**
 * @since 4.4
 */
function vc_get_autocomplete_suggestion()
{
    $query = vc_post_param('query');
    $tag = vc_post_param('shortcode');
    $param_name = vc_post_param('param');
    vc_render_suggestion($query, $tag, $param_name);
}
开发者ID:Junaid-Farid,项目名称:gocnex,代码行数:10,代码来源:autocomplete.php

示例2: activate

 /**
  *
  */
 public function activate()
 {
     $params = array();
     $params['username'] = vc_post_param('username');
     $params['version'] = WPB_VC_VERSION;
     $params['key'] = vc_post_param('key');
     $params['api_key'] = vc_post_param('api_key');
     $params['url'] = get_site_url();
     $params['ip'] = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : '';
     $params['dkey'] = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 20);
     $string = 'activatelicense?';
     $request_url = self::getWpbControlUrl(array($string, http_build_query($params, '', '&')));
     $response = wp_remote_get($request_url, array('timeout' => 300));
     if (is_wp_error($response)) {
         echo json_encode(array('result' => false));
         die;
     }
     $result = json_decode($response['body']);
     if (!is_object($result)) {
         echo json_encode(array('result' => false));
         die;
     }
     if ((bool) $result->result === true || (int) $result->code === 401 && isset($result->deactivation_key)) {
         $this->setDeactivation(isset($result->code) && (int) $result->code === 401 ? $result->deactivation_key : $params['dkey']);
         vc_settings()->set('envato_username', $params['username']);
         vc_settings()->set('envato_api_key', $params['api_key']);
         vc_settings()->set('js_composer_purchase_code', $params['key']);
         echo json_encode(array('result' => true));
         die;
     }
     echo $response['body'];
     die;
 }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:36,代码来源:class-vc-license.php

示例3: build

 /**
  * Build edit form fields
  *
  * @deprecated 4.4
  * @use Vc_Shortcode_Edit_Form::renderFields
  */
 public function build()
 {
     $tag = vc_post_param('element');
     $shortCode = stripslashes(vc_post_param('shortcode'));
     $fields = new Vc_Edit_Form_Fields($tag, shortcode_parse_atts($shortCode));
     $fields->render();
     die;
 }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:14,代码来源:class-vc-shortcode-edit-form.php

示例4: vc_get_autocomplete_suggestion

/**
 * @since 4.4
 */
function vc_get_autocomplete_suggestion()
{
    vc_user_access()->checkAdminNonce()->validateDie()->wpAny('edit_posts', 'edit_pages')->validateDie();
    $query = vc_post_param('query');
    $tag = strip_tags(vc_post_param('shortcode'));
    $param_name = vc_post_param('param');
    vc_render_suggestion($query, $tag, $param_name);
}
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:11,代码来源:autocomplete.php

示例5: build

 /**
  * Build edit form fields
  *
  * @deprecated 4.4
  * @use Vc_Shortcode_Edit_Form::renderFields
  */
 public function build()
 {
     $tag = vc_post_param('element');
     $shortCode = stripslashes(vc_post_param('shortcode'));
     require_once vc_path_dir('EDITORS_DIR', 'class-vc-edit-form-fields.php');
     $fields = new Vc_Edit_Form_Fields($tag, shortcode_parse_atts($shortCode));
     $fields->render();
     die;
 }
开发者ID:Junaid-Farid,项目名称:gocnex,代码行数:15,代码来源:class-vc-shortcode-edit-form.php

示例6: addMenuPageHooks

	public function addMenuPageHooks() {
		if ( current_user_can( 'manage_options' ) ) {
			add_action( 'admin_menu', array( &$this, 'addMenuPage' ) );
			add_action( 'network_admin_menu', array( &$this, 'addMenuPage' ) );
			if(vc_get_param('page') === 'vc_settings' || vc_post_param('action') === 'update') {
				add_action( 'admin_init', array( $this, 'initAdmin' ) );
			}
		}
		add_action( 'wp_ajax_wpb_remove_settings_notification_element_css_class', array( &$this, 'removeNotification' ) );
	}
开发者ID:verbazend,项目名称:AWFA,代码行数:10,代码来源:class-vc-settings.php

示例7: build

 public function build()
 {
     $element = vc_post_param('element');
     $shortCode = stripslashes(vc_post_param('shortcode'));
     visual_composer()->removeShortCode($element);
     $settings = WPBMap::getShortCode($element);
     new WPBakeryShortCode_Settings($settings);
     echo do_shortcode($shortCode);
     die;
 }
开发者ID:scottnkerr,项目名称:eeco,代码行数:10,代码来源:class-vc-shortcode-edit-form.php

示例8: build

 /**
  * Build edit form fields
  *
  * @deprecated 4.4
  * @use Vc_Shortcode_Edit_Form::renderFields
  */
 public function build()
 {
     // _deprecated_function( 'Vc_Shortcode_Edit_Form::build', '4.4 (will be removed in 4.10)', 'Vc_Shortcode_Edit_Form::renderFields' );
     $tag = vc_post_param('element');
     vc_user_access()->checkAdminNonce()->validateDie(__('Access denied', 'js_composer'))->wpAny('edit_posts', 'edit_pages')->validateDie(__('Access denied', 'js_composer'))->check('vc_user_access_check_shortcode_edit', $tag)->validateDie(__('Access denied', 'js_composer'));
     $shortcode = stripslashes(vc_post_param('shortcode'));
     require_once vc_path_dir('EDITORS_DIR', 'class-vc-edit-form-fields.php');
     $fields = new Vc_Edit_Form_Fields($tag, shortcode_parse_atts($shortcode));
     $fields->render();
     die;
 }
开发者ID:k2jysy,项目名称:wedev,代码行数:17,代码来源:class-vc-shortcode-edit-form.php

示例9: build

 /**
  * Build edit form fields
  *
  * @deprecated 4.4
  * @use Vc_Shortcode_Edit_Form::renderFields
  */
 public function build()
 {
     if (!vc_verify_admin_nonce(vc_post_param('nonce')) || !current_user_can('edit_posts') && !current_user_can('edit_pages')) {
         wp_send_json(array('success' => false));
     }
     $tag = vc_post_param('element');
     $shortCode = stripslashes(vc_post_param('shortcode'));
     require_once vc_path_dir('EDITORS_DIR', 'class-vc-edit-form-fields.php');
     $fields = new Vc_Edit_Form_Fields($tag, shortcode_parse_atts($shortCode));
     $fields->render();
     die;
 }
开发者ID:tyburrowbridge,项目名称:tmb,代码行数:18,代码来源:class-vc-shortcode-edit-form.php

示例10: vc_autocomplete_categ_field_search

function vc_autocomplete_categ_field_search($search_string)
{
    $data = array();
    $vc_filter_by = vc_post_param('vc_filter_by', '');
    $vc_taxonomies_types = strlen($vc_filter_by) > 0 ? array($vc_filter_by) : array_keys(vc_taxonomies_types());
    $vc_taxonomies = get_categories(array('hide_empty' => false, 'orderby' => 'name', 'search' => $search_string));
    if (is_array($vc_taxonomies) && !empty($vc_taxonomies)) {
        foreach ($vc_taxonomies as $t) {
            if (is_object($t)) {
                $data[] = vc_get_term_object($t);
            }
        }
    }
    return $data;
}
开发者ID:AlchemyMomentum,项目名称:public_html,代码行数:15,代码来源:creativo-elements.php

示例11: load

 public function load()
 {
     add_filter('vc_object_id', array($this, 'filterMediaId'));
     add_filter('vc_basic_grid_filter_query_suppress_filters', '__return_false');
     add_filter('vc_frontend_editor_iframe_url', array($this, 'appendLangToUrl'));
     add_filter('vc_grid_request_url', array($this, 'appendLangToUrl'));
     add_filter('vc_admin_url', array($this, 'appendLangToUrl'));
     if (!vc_is_frontend_editor()) {
         add_filter('vc_get_inline_url', array($this, 'appendLangToUrl'));
     }
     global $sitepress;
     $action = vc_post_param('action');
     if (vc_is_page_editable() && 'vc_frontend_load_template' === $action) {
         // Fix Issue with loading template #135512264670405
         remove_action('wp_loaded', array($sitepress, 'maybe_set_this_lang'));
     }
 }
开发者ID:ksan5835,项目名称:maadithottam,代码行数:17,代码来源:class-vc-vendor-wpml.php

示例12: loadHtml

 /**
  * Used in templates.js:changeShortcodeParams
  * @todo make sure we need this
  * Output some template content
  * @todo make sure it is secure?
  */
 public function loadHtml()
 {
     if (!vc_verify_admin_nonce() || !current_user_can('edit_posts') && !current_user_can('edit_pages')) {
         die;
     }
     $id = vc_post_param('id');
     $post = get_post((int) $id);
     if (!$post) {
         die(__('Wrong template', 'templatera'));
     }
     if ($this->isSamePostType($post->post_type)) {
         echo $post->post_content;
     }
     die;
 }
开发者ID:siiiiilvio,项目名称:kadcnc,代码行数:21,代码来源:vc_template_manager.php

示例13: elementBackendHtml

 /**
  * Create shortcode's string.
  *
  * @since  3.0
  * @access public
  * @deprecated 4.9
  */
 public function elementBackendHtml()
 {
     _deprecated_function('\\Vc_Backend_Editor::elementBackendHtml', '4.9 (will be removed in 4.10)');
     vc_user_access()->checkAdminNonce()->validateDie()->wpAny('edit_posts', 'edit_pages')->validateDie()->part('backend_editor')->can()->validateDie();
     $data_element = vc_post_param('data_element');
     if ('vc_column' === $data_element && null !== vc_post_param('data_width')) {
         $output = do_shortcode('[vc_column width="' . vc_post_param('data_width') . '"]');
         echo $output;
     } elseif ('vc_row' === $data_element || 'vc_row_inner' === $data_element) {
         $output = do_shortcode('[' . $data_element . ']');
         echo $output;
     } else {
         $output = do_shortcode('[' . $data_element . ']');
         echo $output;
     }
     die;
 }
开发者ID:k2jysy,项目名称:wedev,代码行数:24,代码来源:class-vc-backend-editor.php

示例14: getBackendDefaultTemplate

 /**
  * Load default template content by index from ajax
  * @since 4.4
  *
  * @param bool $return | should function return data or not
  *
  * @return string
  */
 public function getBackendDefaultTemplate($return = false)
 {
     $template_index = (int) vc_post_param('template_unique_id');
     $data = $this->getDefaultTemplate($template_index);
     if (!$data) {
         die('Error: Vc_Templates_Panel_Editor::getBackendDefaultTemplate:1');
     }
     if ($return) {
         return trim($data['content']);
     } else {
         echo trim($data['content']);
         die;
     }
 }
开发者ID:VitaAprel,项目名称:mynotebook,代码行数:22,代码来源:class-vc-templates-panel-editor.php

示例15: die

<?php

if (!defined('ABSPATH')) {
    die('-1');
}
if ('vc_edit_form' === vc_post_param('action')) {
    add_filter('vc_edit_form_fields_attributes_vc_single_image', 'vc_single_image_convert_old_link_to_new');
}
/**
 * Backward compatibility
 *
 * @since 4.6
 **/
function vc_single_image_convert_old_link_to_new($atts)
{
    if (empty($atts['onclick']) && isset($atts['img_link_large']) && 'yes' === $atts['img_link_large']) {
        $atts['onclick'] = 'img_link_large';
        unset($atts['img_link_large']);
    } elseif (empty($atts['onclick']) && (!isset($atts['img_link_large']) || 'yes' !== $atts['img_link_large'])) {
        unset($atts['img_link_large']);
    }
    if (empty($atts['onclick']) && !empty($atts['link'])) {
        $atts['onclick'] = 'custom_link';
    }
    return $atts;
}
开发者ID:k2jysy,项目名称:wedev,代码行数:26,代码来源:vc-single-image.php


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