Skip to content
Permalink
Browse files

[update]AMPページのCSSをカスタマイズ可能に変更

カスタマイザからAMPページ向けにカスタムCSSを出力
  • Loading branch information...
ultimate-ez committed Jan 26, 2018
1 parent a2c0981 commit 007e5a309f2fd6bdeeb162a899a6f4c2024d8990
Showing with 16 additions and 0 deletions.
  1. +4 −0 amp/style.php
  2. +12 −0 se-customizer.php
@@ -306,3 +306,7 @@
padding: 16px 20px;
margin-bottom: 20px;
}
<?php
if ( get_theme_mod( 'amp-customcss' ) != '' ) {
echo get_theme_mod( 'amp-customcss' );
} ?>
@@ -207,6 +207,18 @@ function mytheme_customize_register( $wp_customize ){
'priority' => 22,
));
// AMP用カスタムCSS
$wp_customize->add_setting( 'amp-customcss', array(
'type' => 'theme_mod',
));
$wp_customize->add_control( 'amp-customcss_c', array(
'section' => 'sentry_amp_section',
'settings' => 'amp-customcss',
'label' => 'AMP用のカスタムCSS',
'type' => 'textarea',
'priority' => 30,
));
// PWAの設定
$wp_customize->add_section( 'sentry_pwa_section', array(
'title' => 'PWA設定',

0 comments on commit 007e5a3

Please sign in to comment.
You can’t perform that action at this time.