cess_media( Controls_Stack $element, $method = 'on_import' ) { $get_element_instance = $element->get_data(); if ( method_exists( $element, $method ) ) { $get_element_instance = $element->{$method}( $get_element_instance ); } foreach ( $element->get_controls() as $get_control ) { $control_type = Plugin::instance()->controls_manager->get_control( $get_control['type'] ); $control_name = $get_control['name']; if ( ! $control_type ) { return $get_element_instance; } if ( method_exists( $control_type, $method ) ) { $get_element_instance['settings'][ $control_name ] = $control_type->{$method}( $element->get_settings( $control_name ), $get_control ); } } return $get_element_instance; } }