| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/self/cwd/wp-content/plugins/cornerstone/includes/elements/classic/_alternate/ |
Upload File : |
<?php
class CS_Code extends Cornerstone_Element_Base {
public function data() {
return array(
'name' => 'code',
'title' => __( 'Code Snippet', 'cornerstone' ),
'section' => 'typography',
'description' => __( 'Code Snippet description.', 'cornerstone' ),
'supports' => array( 'id', 'class', 'style' ),
'autofocus' => array(
'content' => '.x-code',
),
'protected_keys' => array( 'content' )
);
}
public function controls() {
$this->addControl(
'content',
'textarea',
__( 'Content', 'cornerstone' ),
__( 'The content you want output. Keep in mind that this shortcode is meant to display code snippets, not output functioning code.', 'cornerstone' ),
__( 'This shortcode is great for outputting code snippets or preformatted text.', 'cornerstone' )
);
}
public function render( $atts ) {
extract( $atts );
$shortcode = "[x_code{$extra}]{$content}[/x_code]";
return $shortcode;
}
}