Last active
January 11, 2019 10:21
-
-
Save Christian-Roth/51897c527cd00bf7ddd445896ec9efce to your computer and use it in GitHub Desktop.
Function to change the header of WP embeds / Example CSS file
This file contains 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
function goyippi_embed_header() { | |
wp_deregister_style('open-sans'); | |
wp_enqueue_style( 'goyippi-embed-font', 'http://fonts.googleapis.com/css?family=Droid+Sans:400,700','','', 'all' ); | |
wp_enqueue_style( 'goyippi-embed-styles', get_bloginfo('stylesheet_directory').'/wp-style_embed.css','','', 'all' ); | |
} | |
add_action( 'embed_head', 'goyippi_embed_header' ); |
This file contains 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
body, .wp-embed, .wp-embed-share-input { | |
font-family: 'Droid Sans', Arial, sans-serif; | |
font-size: 1em; | |
line-height: 1.375; | |
color: #1a1713; | |
-webkit-text-size-adjust: none; | |
} | |
.wp-embed a, .wp-embed .wp-embed-more { | |
color: #827c74; | |
} | |
.wp-embed a:hover, .wp-embed .wp-embed-more:hover { | |
color: #1a1713; | |
text-decoration: none; | |
} | |
.wp-embed-heading a { | |
color: #1a1713; | |
} | |
.dashicons-admin-comments { | |
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%23827c74%27%2F%3E%3C%2Fsvg%3E"); | |
} | |
.wp-embed-comments a:hover .dashicons-admin-comments { | |
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%231a1713%27%2F%3E%3C%2Fsvg%3E"); | |
} | |
.dashicons-share { | |
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%23827c74%27%2F%3E%3C%2Fsvg%3E"); | |
} | |
.wp-embed-share-dialog-open:hover .dashicons-share { | |
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%231a1713%27%2F%3E%3C%2Fsvg%3E"); | |
} | |
.wp-embed-share-dialog-open:focus .dashicons, | |
.wp-embed-share-dialog-close:focus .dashicons { | |
border-radius: 0; | |
box-shadow: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment