Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
add_category(
'tpcore',
array(
'title' => esc_html__('TP Addons', 'tpcore'),
'icon' => 'eicon-banner',
)
);
}
/**
* widget_scripts
*
* Load required plugin core files.
*
* @since 1.2.0
* @access public
*/
public function widget_scripts() {
wp_register_script( 'tpcore', plugins_url( '/assets/js/hello-world.js', __FILE__ ), [ 'jquery' ], false, true );
}
/**
* Editor scripts
*
* Enqueue plugin javascripts integrations for Elementor editor.
*
* @since 1.2.1
* @access public
*/
public function editor_scripts() {
add_filter( 'script_loader_tag', [ $this, 'editor_scripts_as_a_module' ], 10, 2 );
wp_enqueue_script(
'tpcore-editor',
plugins_url( '/assets/js/editor/editor.js', __FILE__ ),
[
'elementor-editor',
],
'1.2.1',
true
);
}
/**
* tp_enqueue_editor_scripts
*/
function tp_enqueue_editor_scripts()
{
wp_enqueue_style('tp-element-addons-editor', TPCORE_ADDONS_URL . 'assets/css/editor.css', [], '1.0');
}
/**
* Force load editor script as a module
*
* @since 1.2.1
*
* @param string $tag
* @param string $handle
*
* @return string
*/
public function editor_scripts_as_a_module( $tag, $handle ) {
if ( 'tpcore-editor' === $handle ) {
$tag = str_replace( '