HEX
Server: Apache
System: Linux cpanelx.inxs.ro 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: crowdandsafety (1041)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/cwd/wp-content/plugins/cornerstone/includes/elements/classic/column/definition.php
<?php

/**
 * Element Definition: Column
 */

class CSE_Column extends BaseClassicElement {

	public function ui() {
		return array(
      'title' => __( 'Column (v1)', 'cornerstone' ),
    );
	}

	public function flags() {
		return array(
			'dropzone'          => array( 'enabled' => true ),
			'context'           => '_layout',
			'dynamic_child'     => true
		);
	}

	public function _layout_defaults() {
		return array(
			'size' => '1/1',
			'_active' => false
		);
	}

	public function update_defaults( $defaults ) {
		return array_merge($defaults, $this->_layout_defaults() );
	}

	public function register_shortcode() {
  	return false;
  }

	public function update_build_shortcode_atts( $atts ) {

		unset( $atts['_active'] );
		unset( $atts['title'] );

		if ( isset( $atts['size'] ) ) {
			$atts['type'] = $atts['size'];
			unset( $atts['size'] );
		}

		return $atts;

	}

	public function update_build_shortcode_content( $content ) {

		if ( '' == $content && ! apply_filters( 'cs_is_element_preview', false )) {
			$content = '&nbsp;';
		}

		return $content;
	}

	public function should_have_markup( $condition, $atts, $content ) {
		return ( isset( $atts['_active'] ) && $atts['_active'] );
	}

}