Menü Schließen

Kategorie: functions.php

Remote Material Icons von mylisting theme entfernen

// remove google material icons
add_action( 'wp_enqueue_scripts', function() {
wp_dequeue_script( 'mylisting-material-icons' );
wp_dequeue_style( 'mylisting-material-icons' );
}, 99 );

Dann style.css in child theme bearbeiten:

@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("https://xxxxxxxxxx.de/wp-content/embed-google-fonts/material-icons/material-icons-google.eot"); /* IE9 Compat Modes */src:url("https://xxxxxxxxxx.de/wp-content/embed-google-fonts/material-icons/material-icons-google.eot?#iefix") format("eot"),url("https://xxxxxxxxxx.de/wp-content/embed-google-fonts/material-icons/material-icons-google.woff2") format("woff2"),url("https://xxxxxxxxxx.de/wp-content/embed-google-fonts/material-icons/material-icons-google.woff") format("woff"),url("https://xxxxxxxxxx.de/wp-content/embed-google-fonts/material-icons/material-icons-google.ttf") format("ttf"),url("https://xxxxxxxxxx.de/wp-content/embed-google-fonts/material-icons/material-icons-google.svg#Material Icons") format("svg") ;}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

WordPress iris colorpicker eigene Farben in der functions.php

/* Custom Default Colors for WP Colorpicker */
function theme_name_color_palettes() {
    if(wp_script_is('wp-color-picker', 'enqueued') ){
?>
  <script  type="text/javascript">
    jQuery(document).ready(function(){
      jQuery.wp.wpColorPicker.prototype.options = {
        palettes: ['#ffffff', '#000000', '#666666', '#287163', '#a1bf36', '#f3f0e9']
        };
    });
  </script>
<?php
    }
}
add_action('admin_footer', 'theme_name_color_palettes');
add_action('customize_controls_print_footer_scripts', 'theme_name_color_palettes');