Hi, I wanted to report a problem I have encountered.
Every time I update the theme in the theme file a piece of code necessary for the restapi is deleted:
if ( ! $_p && $atts[‘_p’] ) {
$_p = $atts[‘_p’];
}
I am therefore forced at each update to go here:
pro/cornerstone/includes/classes/Services/FrontEnd.php
and add code that is deleted because render_content does not have the value $_p.
I would expect to find this code in the FrontEnd.php file at line 78:
public function render_content( $atts, $content ) {
$_p = null;
$wrap = null;
extract( shortcode_atts( array(
‘_p’ => $this->get_post_id(),
wrap' => true
), $atts, ‘cs_content’ ) );
if ( ! $_p && $atts[‘_p’] ) {
$_p = $atts[‘_p’];
}
$content = $this->render_the_content_cached($_p, $content);
if ( $wrap && $wrap !== ‘false’) {
return cs_tag( ‘div’, apply_filters( ‘cs_content_atts’, array(
‘id’ => ‘cs-content’,
‘class’ => ‘cs-content’,
), get_the_ID(), get_post_type() ), $content );
}
return $content;
}
But I actually find this:
public function render_content( $atts, $content ) {
$_p = null;
$wrap = null;
extract( shortcode_atts( array(
‘_p’ => $this->get_post_id(),
wrap' => true
), $atts, ‘cs_content’ ) );
$content = $this->render_the_content_cached($_p, $content);
// Wrap content
if ( $wrap && $wrap !== ‘false’) {
return $this->render_content_wrapped($content);
}
return $content;
}
How can I make this not happen?
Can you fix the FrontEnd.php file so that I don’t have to edit it every time I update?
Thank you very much