salmancreation

php code

Mar 16th, 2021 (edited)
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1.  
  2. if( function_exists('acf_add_options_page') ) {
  3.    
  4.     acf_add_options_page(array(
  5.         'page_title'    => 'Theme Settings',
  6.         'menu_title'    => 'Theme Settings',
  7.         'menu_slug'     => 'theme-settings',
  8.         'capability'    => 'edit_posts',
  9.         'redirect'      => false
  10.     ));
  11. }
  12.  
  13.  
  14. /*** add SVG to allowed file uploads */
  15. function mym_custom_mime_types( $mimes ) {
  16.     // New allowed mime types.
  17.     $mimes['svg'] = 'image/svg+xml';
  18.     $mimes['svgz'] = 'image/svg+xml';
  19.     $mimes['doc'] = 'application/msword';
  20.      
  21.     // Optional. Remove a mime type.
  22.     unset( $mimes['exe'] );
  23.      
  24.     return $mimes;
  25. }
  26. add_filter( 'upload_mimes', 'mym_custom_mime_types' );
  27.  
Add Comment
Please, Sign In to add comment