cpac = $cpac;
}
public function admin_scripts() {
wp_register_script( 'cpacic-admin-cpac-settings', plugins_url( 'assets/js/admin/cpac-settings.js', __FILE__ ), array( 'jquery' ) );
if ( $this->cpac && $this->cpac->is_settings_screen() ) {
wp_enqueue_script( 'cpacic-admin-cpac-settings' );
wp_enqueue_media();
}
}
/**
* @since 1.0
*/
public function column_default_options( $options ) {
$options['label_icon'] = '';
$options['label_icon_type'] = '';
return $options;
}
/**
* @since 1.0
*/
public function column_settings_fields( $column_instance ) {
$type = $column_instance->options->label_icon_type;
$icon = $column_instance->options->label_icon;
?>
label_view( __( 'Header Icon', 'cpac' ), __( 'This icon will replace the label text in the column header.', 'cpacic' ), 'label_icon_type-attachment' ); ?>
>
>
';
}
}
else {
$label = '';
}
}
return $label;
}
/**
* Allow other plugins to hook into this plugin
* Should be called on the plugins_loaded action
*
* @see action:plugins_loaded
* @since 1.0
*/
public function after_setup() {
/**
* Fires after this plugin is setup, which should be on plugins_loaded
* Should be used to access the main plugin class instance, possibly store a reference to it for later use
* and remove any plugin action and filter hooks
*
* @since 1.0
*
* @param CPACIC Main plugin class instance
*/
do_action( 'cpacic/after_setup', $this );
}
}
new CPACIC();