• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP reduxCoreEnqueue类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ajax_save

 public function ajax_save()
 {
     if (!wp_verify_nonce($_REQUEST['nonce'], "redux_ajax_nonce")) {
         json_encode(array('status' => __('Invalid security credential, please reload the page and try again.', 'redux-framework'), 'action' => 'reload'));
         die;
     }
     $redux = ReduxFrameworkInstances::get_instance($_POST['opt_name']);
     if (!empty($_POST['data']) && !empty($redux->args['opt_name'])) {
         $values = array();
         //if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
         //    $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
         //    while (list($key, $val) = each($process)) {
         //        foreach ($val as $k => $v) {
         //            unset($process[$key][$k]);
         //            if (is_array($v)) {
         //                $process[$key][stripslashes($k)] = $v;
         //                $process[] = &$process[$key][stripslashes($k)];
         //            } else {
         //                $process[$key][stripslashes($k)] = stripslashes($v);
         //            }
         //        }
         //    }
         //    unset($process);
         //}
         $_POST['data'] = stripslashes($_POST['data']);
         parse_str($_POST['data'], $values);
         $values = $values[$redux->args['opt_name']];
         if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
             $values = array_map('stripslashes_deep', $values);
         }
         //$beforeDeep = $values;
         //// Ace editor hack for < PHP 5.4. Oy
         //if ( isset( $this->fields['ace_editor'] ) ) {
         //    if ( function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc() ) {
         //        foreach ( $this->fields['ace_editor'] as $id => $v ) {
         //            if ( version_compare( phpversion(), '5.4', '<' ) ) {
         //                $values[ $id ] = stripslashes( $beforeDeep[ $id ] );
         //            } else {
         //                $values[ $id ] = $beforeDeep[ $id ];
         //            }
         //        }
         //    }
         //}
         if (!empty($values)) {
             try {
                 if (isset($redux->validation_ran)) {
                     unset($redux->validation_ran);
                 }
                 $redux->set_options($redux->_validate_options($values));
                 if (isset($values['defaults']) && !empty($values['defaults']) || isset($values['defaults-section']) && !empty($values['defaults-section'])) {
                     echo json_encode(array('status' => 'success', 'action' => 'reload'));
                     die;
                 }
                 include_once 'core/enqueue.php';
                 $enqueue = new reduxCoreEnqueue($redux);
                 $enqueue->get_warnings_and_errors_array();
                 include_once 'core/panel.php';
                 $panel = new reduxCorePanel($redux);
                 ob_start();
                 $panel->notification_bar();
                 $notification_bar = ob_get_contents();
                 ob_end_clean();
                 $success = array('status' => 'success', 'options' => $redux->options, 'errors' => isset($redux->localize_data['errors']) ? $redux->localize_data['errors'] : null, 'warnings' => isset($redux->localize_data['warnings']) ? $redux->localize_data['warnings'] : null, 'notification_bar' => $notification_bar);
                 echo json_encode($success);
             } catch (Exception $e) {
                 echo json_encode(array('status' => $e->getMessage()));
             }
         } else {
             echo json_encode(array('status' => __('Your panel has no fields. Nothing to save.', 'redux-framework')));
         }
     }
     if (isset($this->transients['run_compiler']) && $this->transients['run_compiler']) {
         $this->no_output = true;
         $this->_enqueue_output();
         /**
          * action 'redux-compiler-{opt_name}'
          *
          * @deprecated
          *
          * @param array  options
          * @param string CSS that get sent to the compiler hook
          */
         do_action("redux-compiler-{$this->args['opt_name']}", $this->options, $this->compilerCSS, $this->transients['changed_values']);
         // REMOVE
         /**
          * action 'redux/options/{opt_name}/compiler'
          *
          * @param array  options
          * @param string CSS that get sent to the compiler hook
          */
         do_action("redux/options/{$this->args['opt_name']}/compiler", $this->options, $this->compilerCSS, $this->transients['changed_values']);
         /**
          * action 'redux/options/{opt_name}/compiler/advanced'
          *
          * @param array  options
          * @param string CSS that get sent to the compiler hook, which sends the full Redux object
          */
         do_action("redux/options/{$this->args['opt_name']}/compiler/advanced", $this);
         unset($this->transients['run_compiler']);
         $this->set_transients();
//.........这里部分代码省略.........
开发者ID:aguerojahannes,项目名称:aguerojahannes.com,代码行数:101,代码来源:framework.php


示例2: enqueue_controls_css

 function enqueue_controls_css()
 {
     include_once ReduxFramework::$_dir . 'core/enqueue.php';
     $enqueue = new reduxCoreEnqueue($this->parent);
     $enqueue->get_warnings_and_errors_array();
     $enqueue->init();
     wp_enqueue_style('redux-extension-advanced-customizer', $this->_extension_url . 'extension_customizer.css', '', time());
     wp_enqueue_script('redux-extension-customizer', $this->_extension_url . 'extension_customizer' . Redux_Functions::isMin() . '.js', array('jquery', 'redux-js'), ReduxFramework_extension_customizer::$version, true);
     wp_localize_script('redux-extension-customizer', 'redux_customizer', array('body_class' => sanitize_html_class('admin-color-' . get_user_option('admin_color'), 'fresh')));
 }
开发者ID:rku4er,项目名称:foxland-wp,代码行数:10,代码来源:extension_customizer.php


示例3: ajax_save

 public function ajax_save()
 {
     if (!wp_verify_nonce($_REQUEST['nonce'], "redux_ajax_nonce" . $this->args['opt_name'])) {
         echo json_encode(array('status' => __('Invalid security credential.  Please reload the page and try again.', 'redux-framework'), 'action' => ''));
         die;
     }
     if (!current_user_can($this->args['page_permissions'])) {
         echo json_encode(array('status' => __('Invalid user capability.  Please reload the page and try again.', 'redux-framework'), 'action' => ''));
         die;
     }
     $redux = ReduxFrameworkInstances::get_instance($_POST['opt_name']);
     if (!empty($_POST['data']) && !empty($redux->args['opt_name'])) {
         $values = array();
         //if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
         //    $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
         //    while (list($key, $val) = each($process)) {
         //        foreach ($val as $k => $v) {
         //            unset($process[$key][$k]);
         //            if (is_array($v)) {
         //                $process[$key][stripslashes($k)] = $v;
         //                $process[] = &$process[$key][stripslashes($k)];
         //            } else {
         //                $process[$key][stripslashes($k)] = stripslashes($v);
         //            }
         //        }
         //    }
         //    unset($process);
         //}
         $_POST['data'] = stripslashes($_POST['data']);
         // Old method of saving, in case we need to go back! - kp
         //parse_str( $_POST['data'], $values );
         // New method to avoid input_var nonesense.  Thanks @harunbasic
         $values = $this->redux_parse_str($_POST['data']);
         $values = $values[$redux->args['opt_name']];
         if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
             $values = array_map('stripslashes_deep', $values);
         }
         if (!empty($values)) {
             try {
                 if (isset($redux->validation_ran)) {
                     unset($redux->validation_ran);
                 }
                 $redux->set_options($redux->_validate_options($values));
                 $do_reload = false;
                 if (isset($this->reload_fields) && !empty($this->reload_fields)) {
                     if (!empty($this->transients['changed_values'])) {
                         foreach ($this->reload_fields as $idx => $val) {
                             if (array_key_exists($val, $this->transients['changed_values'])) {
                                 $do_reload = true;
                             }
                         }
                     }
                 }
                 if ($do_reload || isset($values['defaults']) && !empty($values['defaults']) || isset($values['defaults-section']) && !empty($values['defaults-section'])) {
                     echo json_encode(array('status' => 'success', 'action' => 'reload'));
                     die;
                 }
                 require_once 'core/enqueue.php';
                 $enqueue = new reduxCoreEnqueue($redux);
                 $enqueue->get_warnings_and_errors_array();
                 $return_array = array('status' => 'success', 'options' => $redux->options, 'errors' => isset($redux->localize_data['errors']) ? $redux->localize_data['errors'] : null, 'warnings' => isset($redux->localize_data['warnings']) ? $redux->localize_data['warnings'] : null);
             } catch (Exception $e) {
                 $return_array = array('status' => $e->getMessage());
             }
         } else {
             echo json_encode(array('status' => __('Your panel has no fields. Nothing to save.', 'redux-framework')));
         }
     }
     if (isset($this->transients['run_compiler']) && $this->transients['run_compiler']) {
         $this->no_output = true;
         $this->_enqueue_output();
         try {
             /**
              * action 'redux-compiler-{opt_name}'
              *
              * @deprecated
              *
              * @param array  options
              * @param string CSS that get sent to the compiler hook
              */
             do_action("redux-compiler-{$this->args['opt_name']}", $this->options, $this->compilerCSS, $this->transients['changed_values']);
             // REMOVE
             /**
              * action 'redux/options/{opt_name}/compiler'
              *
              * @param array  options
              * @param string CSS that get sent to the compiler hook
              */
             do_action("redux/options/{$this->args['opt_name']}/compiler", $this->options, $this->compilerCSS, $this->transients['changed_values']);
             /**
              * action 'redux/options/{opt_name}/compiler/advanced'
              *
              * @param array  options
              * @param string CSS that get sent to the compiler hook, which sends the full Redux object
              */
             do_action("redux/options/{$this->args['opt_name']}/compiler/advanced", $this);
         } catch (Exception $e) {
             $return_array = array('status' => $e->getMessage());
         }
         unset($this->transients['run_compiler']);
//.........这里部分代码省略.........
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:101,代码来源:framework.php


示例4: ajax_save

 public function ajax_save()
 {
     if (!wp_verify_nonce($_REQUEST['nonce'], "redux_ajax_nonce")) {
         json_encode(array('status' => __('Invalid security credential, please reload the page and try again.', 'redux-framework'), 'action' => 'reload'));
         die;
     }
     $redux = ReduxFrameworkInstances::get_instance($_POST['opt_name']);
     if (!empty($_POST['data']) && !empty($redux->args['opt_name'])) {
         $values = array();
         parse_str($_POST['data'], $values);
         $values = $values[$redux->args['opt_name']];
         $values = array_map('stripslashes_deep', $values);
         if (!empty($values)) {
             try {
                 if (isset($redux->validation_ran)) {
                     unset($redux->validation_ran);
                 }
                 $redux->set_options($redux->_validate_options($values));
                 if (isset($values['defaults']) && !empty($values['defaults']) || isset($values['defaults-section']) && !empty($values['defaults-section'])) {
                     echo json_encode(array('status' => 'success', 'action' => 'reload'));
                     die;
                 }
                 include_once 'core/enqueue.php';
                 $enqueue = new reduxCoreEnqueue($redux);
                 $enqueue->get_warnings_and_errors_array();
                 include_once 'core/panel.php';
                 $panel = new reduxCorePanel($redux);
                 ob_start();
                 $panel->notification_bar();
                 $notification_bar = ob_get_contents();
                 ob_end_clean();
                 $success = array('status' => 'success', 'options' => $redux->options, 'errors' => isset($redux->localize_data['errors']) ? $redux->localize_data['errors'] : null, 'warnings' => isset($redux->localize_data['warnings']) ? $redux->localize_data['warnings'] : null, 'notification_bar' => $notification_bar);
                 echo json_encode($success);
             } catch (Exception $e) {
                 echo json_encode(array('status' => $e->getMessage()));
             }
         } else {
             echo json_encode(array('status' => __('Your panel has no fields. Nothing to save.', 'redux-framework')));
         }
     }
     if (isset($this->transients['run_compiler']) && $this->transients['run_compiler']) {
         $this->no_output = true;
         $this->_enqueue_output();
         /**
          * action 'redux-compiler-{opt_name}'
          *
          * @deprecated
          *
          * @param array  options
          * @param string CSS that get sent to the compiler hook
          */
         do_action("redux-compiler-{$this->args['opt_name']}", $this->options, $this->compilerCSS, $this->transients['changed_values']);
         // REMOVE
         /**
          * action 'redux/options/{opt_name}/compiler'
          *
          * @param array  options
          * @param string CSS that get sent to the compiler hook
          */
         do_action("redux/options/{$this->args['opt_name']}/compiler", $this->options, $this->compilerCSS, $this->transients['changed_values']);
         /**
          * action 'redux/options/{opt_name}/compiler/advanced'
          *
          * @param array  options
          * @param string CSS that get sent to the compiler hook, which sends the full Redux object
          */
         do_action("redux/options/{$this->args['opt_name']}/compiler/advanced", $this);
         unset($this->transients['run_compiler']);
         $this->set_transients();
     }
     die;
 }
开发者ID:samuelwidjaya,项目名称:wordpressPortfolio,代码行数:72,代码来源:framework.php


示例5: enqueue_controls_css

 function enqueue_controls_css()
 {
     include_once ReduxFramework::$_dir . 'core/enqueue.php';
     $enqueue = new reduxCoreEnqueue($this->parent);
     $enqueue->get_warnings_and_errors_array();
     $enqueue->init();
     wp_enqueue_style('redux-extension-advanced-customizer', $this->_extension_url . 'extension_customizer.css', '', time());
     wp_enqueue_script('redux-extension-customizer', $this->_extension_url . 'extension_customizer.js', array('jquery'), time(), ReduxFramework_extension_customizer::$version, true);
     wp_localize_script('redux-extension-customizer', 'redux_customizer', array('body_class' => sanitize_html_class('admin-color-' . get_user_option('admin_color'), 'fresh')));
     //require_once( ABSPATH . '/wp-includes/class-wp-editor.php' );
     //_WP_Editors::enqueue_scripts();
     //_WP_Editors::editor_js();
 }
开发者ID:JonathanCosta,项目名称:redux-framework,代码行数:13,代码来源:extension_customizer.php


示例6: enqueue_controls_css

 function enqueue_controls_css()
 {
     include_once ReduxFramework::$_dir . 'core/enqueue.php';
     $enqueue = new reduxCoreEnqueue($this->parent);
     $enqueue->get_warnings_and_errors_array();
     $enqueue->init();
     wp_enqueue_style('redux-extension-advanced-customizer', $this->_extension_url . 'extension_advanced_customizer.css');
     wp_enqueue_script('redux-extension-advanced-customizer', $this->_extension_url . 'extension_advanced_customizer.js', array('jquery'), ReduxFramework_extension_advanced_customizer::$version . '4', true);
     require_once ABSPATH . '/wp-includes/class-wp-editor.php';
     _WP_Editors::enqueue_scripts();
     _WP_Editors::editor_js();
 }
开发者ID:jeffreysbrother,项目名称:WordPress-integration,代码行数:12,代码来源:extension_advanced_customizer.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP regedit类代码示例发布时间:2022-05-23
下一篇:
PHP redirect类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap