X7ROOT File Manager
Current Path:
/home/notabjze/malakiethegreat.com/wp-content/plugins/jupiterx-core/includes
home
/
notabjze
/
malakiethegreat.com
/
wp-content
/
plugins
/
jupiterx-core
/
includes
/
ðŸ“
..
ðŸ“
admin
ðŸ“
compiler
ðŸ“
condition
ðŸ“
control-panel-2
ðŸ“
custom-fields
ðŸ“
customizer
ðŸ“
extensions
📄
fonts.php
(6.2 KB)
ðŸ“
google-tag
📄
icons.php
(2.05 KB)
ðŸ“
parse-css
ðŸ“
popups
ðŸ“
post-type
ðŸ“
svg-sanitizer
ðŸ“
templates
ðŸ“
updater
ðŸ“
utilities
ðŸ“
widget-area
ðŸ“
widgets
ðŸ“
woocommerce
Editing: icons.php
<?php /** * Handle the JupiterX custom icons functionality. * * @since 2.5.0 */ class JupiterX_Custom_Icons { private static $instance = null; const POST_TYPE = 'jupiterx-icons'; const OPTION_NAME = 'jupiterx_custom_icon_sets_config'; const JX_CUSTOM_ICONS_PANEL_URL = 'admin.php?page=jupiterx#/custom-icons'; public static function get_instance() { if ( null === self::$instance ) { self::$instance = new self(); } return self::$instance; } public function __construct() { add_filter( 'elementor/editor/localize_settings', [ $this, 'add_custom_icons_url' ], 15 ); add_filter( 'elementor/icons_manager/additional_tabs', [ $this, 'register_icon_libraries_control' ] ); } /** * Change the link of custom icon button in elementor editor -> icon library. * * @param $config * * @return mixed * @since 2.5.0 */ public function add_custom_icons_url( $config ) { $config['customIconsURL'] = admin_url( self::JX_CUSTOM_ICONS_PANEL_URL ); return $config; } /** * Register JX custom icons to elementor icon library * * @param $additional_sets * * @return array * @since 2.5.0 */ public function register_icon_libraries_control( $additional_sets ) { return array_merge( $additional_sets, self::get_custom_icons_config() ); } /** * Creates custom icons configurations for icon library * * @return array * @since 2.5.0 */ public static function get_custom_icons_config() { $icons = new \WP_Query( [ 'post_type' => self::POST_TYPE, 'posts_per_page' => - 1, 'post_status' => 'publish', ] ); $config = []; foreach ( $icons->posts as $icon_set ) { $set_config = json_decode( $icon_set->post_content, true ); $set_config['custom_icon_post_id'] = $icon_set->ID; $set_config['label'] = $icon_set->post_title; $config[ $set_config['name'] ] = $set_config; } update_option( self::OPTION_NAME, $config ); return $config; } } JupiterX_Custom_Icons::get_instance();
Upload File
Create Folder