Skip to content

Commit c9770aa

Browse files
committed
Fix for issue reduxframework#301. OOps.
1 parent 6cc0748 commit c9770aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ReduxCore/framework.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
if ( !function_exists( 'wp_get_current_user' ) ) {
2626
// Fix from @kprovance. Bug #265.
27-
require( ABSPATH . WPINC . '/pluggable.php' );
27+
//require( ABSPATH . WPINC . '/pluggable.php' );
2828
}
2929

3030
// Don't duplicate me!
@@ -933,13 +933,13 @@ public function _enqueue_output() {
933933
if( isset( $section['fields'] ) ) {
934934
/** @noinspection PhpUnusedLocalVariableInspection */
935935
foreach( $section['fields'] as $fieldk => $field ) {
936-
if( isset( $field['type'] ) ) {
936+
if( isset( $field['type'] ) && $field['type'] != "callback" ) {
937937
$field_class = 'ReduxFramework_' . $field['type'];
938938
if( !class_exists( $field_class ) ) {
939939
$class_file = apply_filters( 'redux/field/class/'.$field['type'], self::$_dir . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field ); // REMOVE
940940
$class_file = apply_filters( 'redux/'.$this->args['opt_name'].'/field/class/'.$field['type'], self::$_dir . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field );
941941

942-
if( $class_file ) {
942+
if( $class_file && file_exists($class_file) ) {
943943
/** @noinspection PhpIncludeInspection */
944944
require_once( $class_file );
945945
}

class-redux-plugin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private function __construct() {
113113
add_filter( 'plugin_row_meta', array($this, 'plugin_meta_links'), null, 2 );
114114
add_filter( 'plugin_row_meta', array($this, 'plugin_meta_demo_mode_link'), null, 2 );
115115

116-
if ( !class_exists( 'Redux_Framework' ) && file_exists( dirname( __FILE__ ) . '/ReduxCore/framework.php' ) ) {
116+
if ( file_exists( dirname( __FILE__ ) . '/ReduxCore/framework.php' ) ) {
117117
require_once( dirname( __FILE__ ) . '/ReduxCore/framework.php' );
118118
}
119119

0 commit comments

Comments
 (0)