03/14/2014 at 11:25 am
#282251
Keymaster
I’m unable to edit the template plugin file to to it being unwritable, please change this:
public function __construct( $template ) {
self::$template = $template;
$template->part( array( 'tag' => 'card', 'type' => 'file', 'path' => $template->getPath() . 'card.php' ) );
$template->part( array( 'tag' => 'card_single', 'type' => 'file', 'path' => $template->getPath() . 'card-single.php' ) );
$template->part( array( 'tag' => 'js', 'type' => 'action', 'callback' => array( __CLASS__, 'enqueueJS' ) ) );
if ( ! is_admin() ) {
// Enqueue the frontend scripts and CSS.
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueueCSS' ) );
// Update the permitted shortcode attribute the user may use and override the template defaults as needed.
add_filter( 'cn_list_atts_permitted-' . $template->getSlug() , array( __CLASS__, 'initShortcodeAtts') );
add_filter( 'cn_list_atts-' . $template->getSlug() , array( __CLASS__, 'initTemplateOptions') );
}
}
to this:
public function __construct( $template ) {
self::$template = $template;
$template->part( array( 'tag' => 'card', 'type' => 'file', 'path' => $template->getPath() . 'card.php' ) );
$template->part( array( 'tag' => 'card_single', 'type' => 'file', 'path' => $template->getPath() . 'card-single.php' ) );
// $template->part( array( 'tag' => 'js', 'type' => 'action', 'callback' => array( __CLASS__, 'enqueueJS' ) ) );
if ( ! is_admin() ) {
// Enqueue the frontend scripts and CSS.
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueueCSS' ) );
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueueJS' ) );
// Update the permitted shortcode attribute the user may use and override the template defaults as needed.
add_filter( 'cn_list_atts_permitted-' . $template->getSlug() , array( __CLASS__, 'initShortcodeAtts') );
add_filter( 'cn_list_atts-' . $template->getSlug() , array( __CLASS__, 'initTemplateOptions') );
}
}
The file can be found here:
../wp-content/plugins/connections-cmap/cmap.php
