: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Redux Framework is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* Redux Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
* @package ReduxFramework
* @subpackage Field_Section
* @author Tobias Karnetze (athoss.de)
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
if ( ! class_exists( 'ReduxFramework_section' ) ) {
* Main ReduxFramework_heading class
class ReduxFramework_herald_section {
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
public function __construct( $field = array(), $value = '', $parent ) {
* Takes the vars and outputs the HTML for the field in the settings
public function render() {
$this->field = wp_parse_args( $this->field, $defaults );
if ( isset( $this->field['indent'] ) && true === $this->field['indent'] ) {
$add_class = ' form-table-section-indented';
} elseif( !isset( $this->field['indent'] ) || ( isset( $this->field['indent'] ) && false !== $this->field['indent'] ) ) {
echo '<input type="hidden" id="' . esc_attr($this->field['id']) . '-marker" class="herald-redux-marker"></td></tr></table>';
echo '<div id="section-' . esc_attr($this->field['id']) . '" class="redux-section-field redux-field ' . esc_attr($this->field['style']) . ' ' . esc_attr($this->field['class']) . ' ">';
if ( ! empty( $this->field['title'] ) ) {
echo '<h3>' . $this->field['title'] . '</h3>';
if ( ! empty( $this->field['subtitle'] ) ) {
echo '<div class="redux-section-desc">' . esc_html($this->field['subtitle']) . '</div>';
echo '</div><table id="section-table-' . esc_attr($this->field['id']) . '" data-id="' . esc_attr($this->field['id']) . '" class="form-table form-table-section no-border' . esc_attr($add_class) . '"><tbody><tr><th></th><td id="' . esc_attr($guid) . '">';
public function enqueue() {
if ( $this->parent->args['dev_mode'] ) {
'redux-field-section-css',
ReduxFramework::$_url . 'inc/fields/section/field_section.css',