public_html/wp-content/plugins/js_composer/include/classes/editors/popups/class-vc-templates-panel-editor.php
/**
	 * Loading Any templates Shortcodes for backend by string $template_id from AJAX
	 * @since 4.4
	 * vc_filter: vc_templates_render_backend_template - called when unknown template requested to render in backend
	 */
Loading Any templates Shortcodes for backend by string $template_id from AJAX
@since 4.4
vc_filter: vc_templates_render_backend_template - called when unknown template requested to render in backend
Loading Any templates Shortcodes for backend by string $template_id from AJAX @since 4 . 4 vc_filter : vc_templates_render_backend_template - called when unknown template requested to render in backend
public function renderBackendTemplate() {
		if ( ! vc_verify_admin_nonce() || ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ) ) {
			wp_send_json( array(
				'success' => false
			) );
		}
		$template_id = vc_post_param( 'template_unique_id' );
		$template_type = vc_post_param( 'template_type' );
		if ( ! isset( $template_id, $template_type ) || $template_id === "" || $template_type === "" ) {
			die( 'Error: Vc_Templates_Panel_Editor::renderBackendTemplate:1' );
		}
		if ( $template_type === 'my_templates' ) {
			$saved_templates = get_option( $this->option_name );
			$content = trim( $saved_templates[ $template_id ]['template'] );
			$content = str_replace( '\"', '"', $content );
			$pattern = get_shortcode_regex();
			$content = preg_replace_callback( "/{$pattern}/s", 'vc_convert_shortcode', $content );
			echo $content;
			die();
		} else {
			if ( $template_type === 'default_templates' ) {
				$this->getBackendDefaultTemplate();
				die();
			} else {
				echo apply_filters( 'vc_templates_render_backend_template', $template_id, $template_type );
				die();
			}
		}
	}
public function renderBackendTemplate ( ) { if ( ! vc_verify_admin_nonce ( ) || ( ! current_user_can ( 'edit_posts' ) && ! current_user_can ( 'edit_pages' ) ) ) { wp_send_json ( array ( 'success' => false ) ) ; } $ template_id = vc_post_param ( 'template_unique_id' ) ; $ template_type = vc_post_param ( 'template_type' ) ; if ( ! isset ( $ template_id , $ template_type ) || $ template_id === " " || $ template_type === " " ) { die ( 'Error: Vc_Templates_Panel_Editor::renderBackendTemplate:1' ) ; } if ( $ template_type === 'my_templates' ) { $ saved_templates = get_option ( $ this -> option_name ) ; $ content = trim ( $ saved_templates [ $ template_id ] [ 'template' ] ) ; $ content = str_replace ( '\"' , '"' , $ content ) ; $ pattern = get_shortcode_regex ( ) ; $ content = preg_replace_callback ( " / { $ pattern } /s " , 'vc_convert_shortcode' , $ content ) ; echo $ content ; die ( ) ; } else { if ( $ template_type === 'default_templates' ) { $ this -> getBackendDefaultTemplate ( ) ; die ( ) ; } else { echo apply_filters ( 'vc_templates_render_backend_template' , $ template_id , $ template_type ) ; die ( ) ; } } }
Loading Any templates Shortcodes for backend by string $template_id from AJAX
 @since 4.4
 vc_filter: vc_templates_render_backend_template - called when unknown template requested to render in backend
Loading Any templates Shortcodes for backend by string $template_id from AJAX @since 4 . 4 vc_filter : vc_templates_render_backend_template - called when unknown template requested to render in backend