572 lines
14 KiB
PHP
572 lines
14 KiB
PHP
<?php
|
|
|
|
add_filter( 'typekit_add_font_category_rules', function( $category_rules ) {
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'b,
|
|
strong',
|
|
array(
|
|
array( 'property' => 'font-weight', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'dfn',
|
|
array(
|
|
array( 'property' => 'font-style', 'value' => 'italic' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'optgroup',
|
|
array(
|
|
array( 'property' => 'font-weight', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'body,
|
|
button,
|
|
input,
|
|
select,
|
|
textarea',
|
|
array(
|
|
array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'h1,
|
|
h2:not(site-description):not(.author-title),
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6',
|
|
array(
|
|
array( 'property' => 'font-family', 'value' => '"Playfair Display", serif' ),
|
|
array( 'property' => 'font-weight', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'h1',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '49px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'h2:not(site-description):not(.author-title)',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '39px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'h3',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '31px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'h4',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '25px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'h5',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '20px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'h6',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'cite,
|
|
dfn,
|
|
em,
|
|
i',
|
|
array(
|
|
array( 'property' => 'font-style', 'value' => 'italic' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'cite',
|
|
array(
|
|
array( 'property' => 'font-wieght', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'blockquote',
|
|
array(
|
|
array( 'property' => 'font-style', 'value' => 'italic' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'blockquote cite',
|
|
array(
|
|
array( 'property' => 'font-style', 'value' => 'normal' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'dt',
|
|
array(
|
|
array( 'property' => 'font-weight', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'a',
|
|
array(
|
|
array( 'property' => 'font-weight', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'a:visited',
|
|
array(
|
|
array( 'property' => 'font-weight', 'value' => 'normal' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.main-navigation',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.secondary-navigation,
|
|
.footer-navigation,
|
|
.bottom-navigation',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '13px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.comment-navigation a,
|
|
.posts-navigation a',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.post-navigation .post-title',
|
|
array(
|
|
array( 'property' => 'font-family', 'value' => '"Playfair Display", serif' ),
|
|
array( 'property' => 'font-size', 'value' => '25px' ),
|
|
array( 'property' => 'font-weight', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.widget',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.widget-title,
|
|
.widgettitle',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '25px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.widget_recent_entries .post-date',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '13px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.widget_rss .rss-date,
|
|
.widget_rss cite',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '13px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.site-title',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '25px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.site-description',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.site-info',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '13px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.site-info .sep',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.featured-content .entry-title',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '25px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.entry-summary',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.page-title',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '39px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.archive .hentry .entry-title,
|
|
.blog .hentry .entry-title,
|
|
.search .hentry .entry-title',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '25px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.page .entry-title,
|
|
.single .entry-title',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '39px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.entry-meta',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '13px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.entry-footer',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '13px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.page-links',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '13px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.author-info .author-title',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '13px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.author-info .author-name',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '25px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.author-info .author-bio',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.comments-area',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.comment-reply-title,
|
|
.comments-title,
|
|
.no-comments',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '25px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.no-comments',
|
|
array(
|
|
array( 'property' => 'font-family', 'value' => '"Playfair Display", sans-serif' ),
|
|
array( 'property' => 'font-weight', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.comment-form,
|
|
.comment-form code',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.comment-content blockquote:before',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.comment-author',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
array( 'property' => 'font-family', 'value' => '"Playfair Display", sans-serif' ),
|
|
array( 'property' => 'font-weight', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.comment-author a,
|
|
.comment-author b',
|
|
array(
|
|
array( 'property' => 'font-weight', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.comment-metadata .edit-link:before',
|
|
array(
|
|
array( 'property' => 'font-weight', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.comment-list .comment-reply-title small,
|
|
.comment-metadata,
|
|
.comment-reply-link',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '13px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.required',
|
|
array(
|
|
array( 'property' => 'font-weight', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.wp-caption',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.gallery-caption',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'#infinite-handle span button,
|
|
#infinite-handle span button:active,
|
|
#infinite-handle span button:focus,
|
|
#infinite-handle span button:hover',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'#infinite-footer',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '13px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.hentry div.sd-rating h3.sd-title,
|
|
.hentry div.sharedaddy h3.sd-title',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '13px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.hentry div#jp-relatedposts h3.jp-relatedposts-headline',
|
|
array(
|
|
array( 'property' => 'font-family', 'value' => '"P{layfair Display", sans-serif' ),
|
|
array( 'property' => 'font-size', 'value' => '25px' ),
|
|
array( 'property' => 'font-weight', 'value' => 'blod' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.hentry div#jp-relatedposts div.jp-relatedposts-items p',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.hentry div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post-context',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '13px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.hentry div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post-title',
|
|
array(
|
|
array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
|
|
array( 'property' => 'font-weight', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.hentry div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post-title',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.widget_jetpack_display_posts_widget .jetpack-display-remote-posts h4',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '20px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.widget_jetpack_display_posts_widget .jetpack-display-remote-posts p',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '16px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.widget_goodreads h2[class^="gr_custom_header"]',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '20px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.widget_goodreads div[class^="gr_custom_title"]',
|
|
array(
|
|
array( 'property' => 'font-weight', 'value' => 'bold' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.widget_goodreads div[class^="gr_custom_author"]',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '13px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.widget-grofile h4',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '20px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'body',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '20px' ),
|
|
),
|
|
array(
|
|
'screen and (min-width: 768px)',
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.site-title',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '49px' ),
|
|
),
|
|
array(
|
|
'screen and (min-width: 768px)',
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'body .hentry .wpcom-reblog-snapshot .reblogger-note-content blockquote',
|
|
array(
|
|
array( 'property' => 'font-style', 'value' => 'italic' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.aboutme_widget #am_name',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '25px' ),
|
|
)
|
|
);
|
|
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'headings',
|
|
'.aboutme_widget #am_headline',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '20px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.widget_akismet_widget .a-stats',
|
|
array(
|
|
array( 'property' => 'font-size', 'value' => '14px' ),
|
|
)
|
|
);
|
|
|
|
TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
|
|
'.widget_authors > ul > li > a',
|
|
array(
|
|
array( 'property' => 'font-family', 'value' => '"PT Serif", serif' ),
|
|
)
|
|
);
|
|
|
|
return $category_rules;
|
|
} );
|