get_contents( AYYASH_THEME_DIR . 'inc/icon/ayyash-icons.json' ), true ); $themify_icons = json_decode( $wp_filesystem->get_contents( AYYASH_THEME_DIR . 'inc/icon/themify-icons.json' ), true ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents $icons = array_merge( $ayyash_icons, $themify_icons ); if ( ! empty( $icons ) ) { foreach ( $icons as $icon_cls => $icon ) { $label = ucwords( str_replace( '-', ' ', $icon ) ); printf( '', esc_attr( $icon_cls ), esc_attr( $label ), sprintf( /* translators: 1. Icon Name */ esc_attr__( 'Select ā€œ%sā€œ Icon', 'ayyash' ), esc_attr( $label ) ) ); } } } die(); } /** * * Icon Generator * * @return void */ public function icon_dialog() { global $pagenow; if ( admin_url( $pagenow ) !== admin_url('nav-menus.php') ) { return; } ?>