na mojej stronie pojawił się taki błąd :
Parse error: syntax error, unexpected T_STRING in /(...)/ski.wp.customizer.php on line 41
Line 41 zaczyna się tu : trait cz_supplement
Przeszukam kilka razy ten kod w celu znalezienia tego błędu ale bez skutecznie. jest szansa aby ktoś mi pomógł?
Będę wdzięczna za wszelką pomoc.
Pozdrawiam,
CODE
add_action( 'customize_controls_enqueue_scripts', 'ski\cz_enqueue' );
/**
* Defining a trait here means that we can continue to derive from the existing
* WP controls, but add in our additional attributes without changing the signature.
*
* @author Dan Suleski
* @since 2.0
*/
trait cz_supplement
{
/**
* @var string Optional description to be displayed near the option title
*/
public $desc = '';
/**
* @var string Optional description to be displayed after the main control
*/
public $desc_after = '';
/**
* The label should be uniform for every control - so just lay it out
* once and reference it from the render_content callback everywhere.
*/
public function get_label_markup()
{
if ( empty( $this->label ) ) return '';
return
'<p class="customize-control-title">'.$this->label.'</p>';
}
/**
* The description should be uniform for every control - so just lay it out
* once and reference it from the render_content callback everywhere.
*/
public function get_description_markup()
{
if ( empty( $this->desc ) ) return '';
return
'<p class="cc-description">'.$this->desc.'</p>';
}
/**
* Just like the description that comes first, the description that comes after
* the main control should be uniform for each of these controls - so just lay
* it out once and reference it from the render_content callback everywhere.
*/
public function get_description_after_markup()
{
if ( empty( $this->desc_after ) ) return '';
return
'<p class="cc-description-after">'.$this->desc_after.'</p>';
}
/**
* The label and description should be uniform for every control - so just lay it out
* once and reference it from the render_content callback everywhere.
*/
public function get_label_description_markup()
{
return
$this->get_label_markup();
$this->get_description_markup();
}
/**
* Defining a trait here means that we can continue to derive from the existing
* WP controls, but add in our additional attributes without changing the signature.
*
* @author Dan Suleski
* @since 2.0
*/
trait cz_supplement
{
/**
* @var string Optional description to be displayed near the option title
*/
public $desc = '';
/**
* @var string Optional description to be displayed after the main control
*/
public $desc_after = '';
/**
* The label should be uniform for every control - so just lay it out
* once and reference it from the render_content callback everywhere.
*/
public function get_label_markup()
{
if ( empty( $this->label ) ) return '';
return
'<p class="customize-control-title">'.$this->label.'</p>';
}
/**
* The description should be uniform for every control - so just lay it out
* once and reference it from the render_content callback everywhere.
*/
public function get_description_markup()
{
if ( empty( $this->desc ) ) return '';
return
'<p class="cc-description">'.$this->desc.'</p>';
}
/**
* Just like the description that comes first, the description that comes after
* the main control should be uniform for each of these controls - so just lay
* it out once and reference it from the render_content callback everywhere.
*/
public function get_description_after_markup()
{
if ( empty( $this->desc_after ) ) return '';
return
'<p class="cc-description-after">'.$this->desc_after.'</p>';
}
/**
* The label and description should be uniform for every control - so just lay it out
* once and reference it from the render_content callback everywhere.
*/
public function get_label_description_markup()
{
return
$this->get_label_markup();
$this->get_description_markup();
}