Advertisement
artemsemkin

Asli: custom toggle for descriptions (php)

Jun 26th, 2024
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.58 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Theme functions and definitions.
  4.  * This child theme was generated by Merlin WP.
  5.  *
  6.  * @link https://developer.wordpress.org/themes/basics/theme-functions/
  7.  */
  8.  
  9. /*
  10. * If your child theme has more than one .css file (eg. ie.css, style.css, main.css) then
  11. * you will have to make sure to maintain all of the parent theme dependencies.
  12. *
  13. * Make sure you're using the correct handle for loading the parent theme's styles.
  14. * Failure to use the proper tag will result in a CSS file needlessly being loaded twice.
  15. * This will usually not affect the site appearance, but it's inefficient and extends your page's loading time.
  16. *
  17. * @link https://codex.wordpress.org/Child_Themes
  18. */
  19. add_action(  'wp_enqueue_scripts', 'asli_child_enqueue_styles', 99 );
  20. function asli_child_enqueue_styles() {
  21.   wp_enqueue_style( 'asli-style' , get_template_directory_uri() . '/style.css' );
  22.   wp_enqueue_style( 'asli-child-style',
  23.     get_stylesheet_directory_uri() . '/style.css',
  24.     array( 'asli-style' ),
  25.     wp_get_theme()->get('Version')
  26.   );
  27.    
  28.   wp_enqueue_style( 'elementor-icons-fa-brands' ); // FontAwesome 5 Brands from Elementor
  29. }
  30.  
  31. add_filter( 'arts/elementor/widgets/allowed_html_tags', 'custom_allow_more_html_tags' );
  32. function custom_allow_more_html_tags( $_allowed_tags ) {
  33.     $_allowed_tags = array_merge(
  34.         $_allowed_tags,
  35.         array(
  36.             'ul'   => array(
  37.                 'class' => array(),
  38.             ),
  39.             'li'   => array(
  40.                 'class' => array(),
  41.             ),
  42.             'i'    => array(
  43.                 'class' => array(),
  44.             ),
  45.             'span' => array(
  46.                 'class' => array(),
  47.             ),
  48.         )
  49.     );
  50.  
  51.     return $_allowed_tags;
  52. }
  53.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement