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
    
  
  
    
  | #!/bin/bash | |
| # Force use with sudo | |
| if [[ $(id -u) -ne 0 ]]; then | |
| echo "ERROR: Operation not permitted." | |
| exit 1 | |
| fi | |
| CONFIG_DIR="$HOME/openvpn-profiles/" | 
  
    
      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
    
  
  
    
  | add_filter( 'rest_authentication_errors', function( $result ) { | |
| if ( ! empty( $result ) ) { | |
| return $result; | |
| } | |
| if ( ! is_user_logged_in() ) { | |
| return new WP_Error( 'rest_not_logged_in', 'You are not currently logged in.', array( 'status' => 401 ) ); | |
| } | |
| return $result; | |
| }); | 
  
    
      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 | |
| /** | |
| * Handles the search | |
| */ | |
| add_filter('parse_query', 'select_dropdown_filter_query', 10, 1) | |
| function select_dropdown_filter_query($query) | |
| { | |
| // manual | |
| $post_type = 'CUSTOM_POST_TYPE'; |