Last active
          October 2, 2023 15:10 
        
      - 
      
- 
        Save zartgesotten/047d8713aebe8125f3ef1a3389b11784 to your computer and use it in GitHub Desktop. 
    Stolen from Kyle van Deusens Video https://www.youtube.com/live/sGNVD8gAW34?si=BQQQR5Ulrk_S9jLc&t=4113
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| add_filter('block_editor_settings_all', function($editor_settings) | |
| { | |
| //get the child theme url | |
| $child_theme_style_url = get_stylesheet_directory_uri() . '/style.css'; | |
| $editor_settings[ 'styles' ][] = array('css' => wp_remote_get($child_theme_style_url)[ 'body' ]); | |
| return $editor_settings; | |
| }); | |
| /* Enqueue Customizer CSS to Editor */ | |
| add_filter( 'bkicj_editor_settings_all', function( $editor_settings ) { | |
| $css = wp_get_custom_css_post()->post_content; | |
| $editor_settings['styles'][] = array( 'css' => $css ); | |
| return $editor_settings; | |
| }); | |
| ?> | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment