$82 GRAYBYTE WORDPRESS FILE MANAGER $95

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/home/bravrvjk/cepurhuye.rw/wp-content/plugins/bopea-function/inc/

HOME
Current File : /home/bravrvjk/cepurhuye.rw/wp-content/plugins/bopea-function/inc//fonts-tax.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit();
}
if ( ! class_exists( 'bopea_font_tax' ) ) :
	class bopea_font_tax {
		private static $instance = null;
		public static $fonts = null;
		public static $capability = 'edit_theme_options';
		public static $register_taxonomy_slug = 'jl_custom_fonts';
		public static function get_instance() {
			if ( ! isset( self::$instance ) ) {
				self::$instance = new self();
			}
			return self::$instance;
		}
		public function __construct() {
			add_action( 'init', array( $this, 'create_custom_fonts_taxonomies' ) );
		}
		public function create_custom_fonts_taxonomies() {
			$labels = array(
				'name'              => apply_filters( 'jl_custom_fonts_menu_title', __( 'Custom Fonts', 'bopea-function' ) ),
				'singular_name'     => __( 'Font', 'bopea-function' ),
				'menu_name'         => _x( 'Custom Fonts', 'Admin menu name', 'bopea-function' ),
				'search_items'      => __( 'Search Fonts', 'bopea-function' ),
				'all_items'         => __( 'All Fonts', 'bopea-function' ),
				'parent_item'       => __( 'Parent Font', 'bopea-function' ),
				'parent_item_colon' => __( 'Parent Font:', 'bopea-function' ),
				'edit_item'         => __( 'Edit Font', 'bopea-function' ),
				'update_item'       => __( 'Update Font', 'bopea-function' ),
				'add_new_item'      => __( 'Add New Font', 'bopea-function' ),
				'new_item_name'     => __( 'New Font Name', 'bopea-function' ),
				'not_found'         => __( 'No fonts found', 'bopea-function' ),
				'back_to_items'     => __( '← Go to Fonts', 'bopea-function' ),
			);

			$args = array(
				'hierarchical'      => false,
				'labels'            => $labels,
				'public'            => false,
				'show_in_nav_menus' => false,
				'show_ui'           => true,
				'capabilities'      => array( self::$capability ),
				'query_var'         => false,
				'rewrite'           => false,
			);

			register_taxonomy(
				self::$register_taxonomy_slug,
				apply_filters( 'jl_taxonomy_objects_custom_fonts', array() ),
				apply_filters( 'jl_taxonomy_args_custom_fonts', $args )
			);
		}
		protected static function default_args( $fonts ) {
			return wp_parse_args(
				$fonts,
				array(
					'font_fallback'   => '',
					'font-display'    => 'swap',
					'repeater_fields' => array(
						'400' => array(
							'font_woff_2' => '',
							'font_woff'   => '',
							'font_ttf'    => '',
							'font_svg'    => '',
							'font_eot'    => '',
							'font_otf'    => '',
						),
					),
				)
			);
		}
		public static function bopea_get_fonts() {
			if ( is_null( self::$fonts ) ) {
				self::$fonts = array();

				$terms = get_terms(
					self::$register_taxonomy_slug,
					array(
						'hide_empty' => false,
					)
				);
				if ( ! empty( $terms ) ) {
					foreach ( $terms as $term ) {
						self::$fonts[ $term->slug ] = self::get_font_links( $term->term_id );
					}
				}
			}
			return self::$fonts;
		}
		public static function get_links_by_name( $name ) {

			$terms      = get_terms(
				self::$register_taxonomy_slug,
				array(
					'hide_empty' => false,
				)
			);
			$font_links = array();
			if ( ! empty( $terms ) ) {

				foreach ( $terms as $term ) {
					if ( $term->name == $name ) {
						$font_links[ $term->name ] = self::get_font_links( $term->term_id );
					}
				}
			}
			return $font_links;
		}
		public static function get_font_links( $term_id ) {
			$links = get_option( 'taxonomy_' . self::$register_taxonomy_slug . "_{$term_id}", array() );
			return $links;
		}
		public static function update_font_links( $posted, $term_id ) {
			$links = self::get_font_links( $term_id );
			$links = $posted;
			update_option( 'taxonomy_' . self::$register_taxonomy_slug . "_{$term_id}", $links );
		}
	}
	bopea_font_tax::get_instance();
endif;


Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0755
bbpress
--
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0755
function
--
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0755
woocommerce
--
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0755
cb.php
42.693 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
core.php
73.26 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
date-time.php
6.077 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
file.php
1.207 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
fonts-tax.php
3.68 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
fonts.php
17.657 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
header-footer.php
6.572 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
metas.php
12.807 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
sb.php
9.413 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
single-content.php
1.979 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF