123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- <?php
- add_filter( 'typekit_add_font_category_rules', function( $category_rules ) {
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'body,
- button,
- input,
- select,
- textarea',
- array(
- array( 'property' => 'font-family', 'value' => '"Source Sans Pro", sans-serif' ),
- array( 'property' => 'font-size', 'value' => '1.0em' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- 'h1,
- h2:not(.site-description),
- h3,
- h4,
- h5,
- h6',
- array(
- array( 'property' => 'font-family', 'value' => '"Source Sans Pro", sans-serif' ),
- array( 'property' => 'font-weight', 'value' => 'bold' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- 'h1',
- array(
- array( 'property' => 'font-size', 'value' => '1.8em' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- 'h2:not(.site-description)',
- array(
- array( 'property' => 'font-size', 'value' => '1.6em' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- 'h3',
- array(
- array( 'property' => 'font-size', 'value' => '1.4em' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- 'h4',
- array(
- array( 'property' => 'font-size', 'value' => '1.2em' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- 'h5',
- array(
- array( 'property' => 'font-size', 'value' => '1.0em' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- 'h6',
- array(
- array( 'property' => 'font-size', 'value' => '0.8em' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'blockquote',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-size', 'value' => '1.2em' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- '.site-title',
- array(
- array( 'property' => 'font-family', 'value' => '"Source Sans Pro", sans-serif' ),
- array( 'property' => 'font-size', 'value' => '3.6em' ),
- array( 'property' => 'font-weight', 'value' => '900' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- '.site-title',
- array(
- array( 'property' => 'font-size', 'value' => '2em' ),
- ),
- array( 'screen and (max-width: 767px)')
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.site-description',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-size', 'value' => '0.73em' ),
- array( 'property' => 'font-weight', 'value' => 'normal' ),
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.widget_rss .rss-date',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-size', 'value' => '0.73em' ),
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.taxonomy-description',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-size', 'value' => '0.73em' ),
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.cat-links,
- .featured-post',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-size', 'value' => '0.73em' ),
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.entry-meta',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-size', 'value' => '0.73em' ),
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.site-main .portfolio-entry-meta',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-size', 'value' => '0.73em' ),
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.comment-list .pingback .comment-body',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-size', 'value' => '0.73em' ),
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.comment-meta-details',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-size', 'value' => '0.73em' ),
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.no-comments',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-size', 'value' => '0.73em' ),
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.wp-caption .wp-caption-dd,
- .wp-caption .wp-caption-text',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-size', 'value' => '0.73em' ),
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.gallery .gallery-item .gallery-caption',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-size', 'value' => '0.73em' ),
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.tiled-gallery .tiled-gallery-caption',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-size', 'value' => '0.73em' ),
- array( 'property' => 'font-weight', 'value' => 'normal' ),
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.entry-content > .jp-relatedposts .jp-relatedposts-post .jp-relatedposts-post-context,
- .entry-sharedaddy > .jp-relatedposts .jp-relatedposts-post .jp-relatedposts-post-context,
- .page-content > .jp-relatedposts .jp-relatedposts-post .jp-relatedposts-post-context,
- .page-content > .sharedaddy .jp-relatedposts .jp-relatedposts-post .jp-relatedposts-post-context,
- .entry-content > .sharedaddy .jp-relatedposts .jp-relatedposts-post .jp-relatedposts-post-context,
- .entry-sharedaddy > .sharedaddy .jp-relatedposts .jp-relatedposts-post .jp-relatedposts-post-context',
- array(
- array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- return $category_rules;
- } );
|