Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
public_html
/
wp-content
/
plugins
/
profundcore
/
Editing: init.php
<?php /* Plugin Name: Profund Core Description: Creates an interfaces to manage store / business locations on your website. Useful for showing location based information quickly. Includes both a widget and shortcode for ease of use. Version: 2.0 Author: Quomodosoft Author URI: http://www.spaceraceit.com License: GPL2 License URI: https://www.gnu.org/licenses/gpl-2.0.html */ if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly /*-- All-Action-Hooks --*/ add_action( 'plugins_loaded', 'profundcore_plugin_loaded' ); add_action( 'wp_enqueue_scripts', 'profundcore_enqueue_script' ); add_action( 'widgets_init', 'profundcore_widgets_init' ); add_action( 'admin_enqueue_scripts', 'profundcore_admin_scripts' ); /*-- Elementor-Widget-Controls --*/ add_action( 'elementor/init','profundcore_elementor_init', 10 ); add_action( 'elementor/widgets/widgets_registered', 'profundcore_includes_widgets' ); add_action( 'elementor/frontend/after_register_styles', 'profundcore_register_frontend_styles', 10 ); add_action( 'elementor/frontend/after_register_scripts', 'profundcore_register_fronted_scripts', 10 ); add_action( 'elementor/frontend/after_enqueue_styles', 'profundcore_enqueue_frontend_styles', 10 ); /*********************************** ********** Hook-Functions ********** ************************************/ function profundcore_widgets_init(){ register_widget( 'profund_instagram_widget' ); register_widget( 'profund_social_menu' ); register_widget( 'profund_popular_posts' ); } function profundcore_enqueue_script(){ // Add Lity, Used for lightbox popup wp_enqueue_style( 'lity', plugins_url( '/assets/css/lity-min.css', __FILE__ ), array(), '2.3.1' ); // Add Nice Select Plugin, Used For Stylist Dropdown Select Box wp_enqueue_style( 'slick', plugins_url( '/assets/css/slick.css', __FILE__ ), array(), '1.9.0' ); // Add Slick Slider Theme, Used For Carousel Slider Design. wp_enqueue_style( 'slick-theme', plugins_url( '/assets/css/slick-theme.css', __FILE__ ), array(), '1.9.0' ); // Add profund Core Style, Used For Stylist Dropdown Select Box wp_enqueue_style( 'profundcore-style', plugins_url( '/assets/css/profund-core.css', __FILE__ ), array(), '1.0.0' ); // Add Lity, Used for lightbox popup. wp_enqueue_script( 'lity', plugins_url( '/assets/js/lity-min.js', __FILE__ ), array('jquery'), '2.3.1', true ); // Add Slick Slider, Used For Carousel Slider. wp_enqueue_script( 'slick', plugins_url( '/assets/js/slick-min.js', __FILE__ ), array('jquery'), '1.9.0', true ); // Add prefixfree, Used for CSS Prefixer. wp_enqueue_script( 'prefixfree', plugins_url( '/assets/js/prefixfree-min.js', __FILE__ ), array('jquery'), '1.1.0', true ); wp_enqueue_script( 'profundcore-active', plugins_url( '/assets/js/profund-core.js', __FILE__ ), array('jquery'), '1.0.0', true ); } function profundcore_plugin_loaded(){ load_plugin_textdomain( 'profundcore', false, basename(dirname(__FILE__)) . '/language/' ); require_once( dirname(__FILE__) . '/include/profund-core-functinos.php'); require_once( dirname(__FILE__) . '/metabox/metabox.php'); require_once( dirname(__FILE__) . '/widgets/instagram.php'); require_once( dirname(__FILE__) . '/widgets/social-menu.php'); require_once( dirname(__FILE__) . '/post-type/campaign.php'); require_once( dirname(__FILE__) . '/widgets/popular-post.php'); require_once( dirname(__FILE__).'/addons/icons.php' ); } function profundcore_elementor_init(){ \Elementor\Plugin::instance()->elements_manager->add_category( 'profund-addons',[ 'title' => 'profund' ], 1 ); } function profundcore_includes_widgets(){ require_once( dirname(__FILE__).'/addons/widgets_control.php' ); } function profundcore_register_frontend_styles(){ // Add profund Core Style, Used For Stylist Dropdown Select Box wp_register_style('loop-animation', plugins_url( '/assets/css/loop-animation.css', __FILE__ ), array(), '1.0.0' ); wp_register_style( 'font-awesome-5-pro', get_theme_file_uri('/assets/css/font-awesome-5-pro.css'), array(), '1.0.1' ); wp_enqueue_style('font-awesome'); } function profundcore_register_fronted_scripts(){ wp_register_script( 'el-widget-active', plugins_url( '/assets/js/el-widget.js', __FILE__ ), array('jquery'), '1.0.0', true ); // Add Isotope, Used for filter option. wp_enqueue_script( 'isotope', plugins_url( '/assets/js/isotope-min.js', __FILE__ ), array('jquery'), '2.3.1', true ); } function profundcore_enqueue_frontend_styles(){ wp_enqueue_style('loop-animation'); } function profundcore_admin_scripts(){ wp_enqueue_style('profund_admin_style',plugins_url( '/assets/css/profund-admin.css', __FILE__ ),array(),'1.0','all'); wp_enqueue_script('profund_admin_script', plugins_url( '/assets/js/profund-admin.js', __FILE__ ) ,array('jquery'),'1.0',true ); } function profund_add_file_types_to_uploads($file_types){ $new_filetypes = array(); $new_filetypes['svg'] = 'image/svg+xml'; $file_types = array_merge($file_types, $new_filetypes ); return $file_types; } add_action('upload_mimes', 'profund_add_file_types_to_uploads');
Save
Cancel