| AMP footer widgets settings |
★★★★★ If you like this plugin please consider rating it, thank you!
|
|
|
'AMP footer 1',
'id' => 'amp-footer-sidebar-1',
'description' => 'Appears in the footer area of your AMP content',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => 'AMP footer 2',
'id' => 'amp-footer-sidebar-2',
'description' => 'Appears in the footer area of your AMP content',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => 'AMP footer 3',
'id' => 'amp-footer-sidebar-3',
'description' => 'Appears in the footer area of your AMP content',
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'afw_register_sidebars' );
//* Render widgets
add_action('amp_post_template_footer', 'amp_footer_wids_jd', 99);
function amp_footer_wids_jd( $amp_template ) {
$post_id = $amp_template->get( 'post_id' );
if ( function_exists('is_amp_endpoint') )
$orgschema = get_option( 'org_schema_jd_amp' );
$schemaname = get_option( 'org_name_schema_amp' );
$schemasocial = get_option( 'org_social_schema_amp' );
$creatorname = get_option( 'add_creator_amp_name' );
$creatorurl = get_option( 'add_creator_amp_url' );
$creatorsocial = get_option( 'add_creator_amp_social' );
$siteurl = get_site_url();
$curYear = date('Y');
echo '';
echo ' ';
if(is_active_sidebar('amp-footer-sidebar-1')){
echo '';
}
if(is_active_sidebar('amp-footer-sidebar-2')){
echo '';
}
if(is_active_sidebar('amp-footer-sidebar-3')){
echo '';
}
echo ' ';
if ( get_option( 'footer_copy_on_amp' ) == '1' ) {
echo '';
}
echo ' ';
}
//* AMP Plugin extra styles
add_action( 'amp_post_template_css', 'jd_css_plugins_afw' );
function jd_css_plugins_afw( $amp_template ) {
if ( function_exists('is_amp_endpoint') )
// only CSS here please...
?>
div.jd-css-plugins-afw div.jd-css-plugins-inner {
padding: 16px;
max-width: 800px;
margin: auto;
}
div.jd-css-plugins-afw li {
margin-bottom: initial;
margin-left: 20px;
}
div.jd-css-plugins-afw .amp-wp-footer span.copyrightsign {
color: #696969;
font-size: .8em;
line-height: 2em;
float: left;
padding-right: 2px;
}
div.jd-css-plugins-afw h2 a {
color: #000;
}
div.jd-css-plugins-afw .amp-wp-footer {
position: initial;
top: initial;
left: initial;
}
div#amp-footer-one,
div#amp-footer-two,
div#amp-footer-three {
padding: 15px 0 15px 0;
}
.amp-wp-footer {
position: absolute;
top: -9999px;
left: -9999px;
}
blockquote.mindyou{
margin-left: 20px;
border-left: 4px solid rgba(27, 128, 0, 0.67);
padding-left: 13px;
}
div.buttholder {
width:100%;
marging: auto;
}
div.buttcopy a {
color: #fff;
}
div.buttcopy {
display: inline-block;
text-decoration: none;
font-size: 13px;
line-height: 26px;
height: 28px;
margin: 0;
padding: 0 10px 1px;
margin: 0px 0px 0px 28px;
cursor: pointer;
border-width: 1px;
border-style: solid;
-webkit-appearance: none;
-webkit-border-radius: 3px;
border-radius: 3px;
white-space: nowrap;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: #0085ba;
border-color: #0073aa #006799 #006799;
-webkit-box-shadow: 0 1px 0 #006799;
box-shadow: 0 1px 0 #006799;
color: #fff;
text-decoration: none;
text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799;
}
div.buttcopy:hover {
background: #008ec2;
border-color: #006799;
color: #fff;
}
.extendd {
vertical-align: baseline;
line-height: 1.6rem;
}
.extendd input[type=checkbox] {
position: absolute;
top: -9999px;
left: -9999px;
}
/* Default State */
div.tton, div.tttw, div.ttth {
opacity: 0;
max-height: 0;
overflow: hidden;
background: rgba(239, 239, 239, 0.36);
margin-top: 15px;
transform: scale(0.8);
transition: 0.5s;
}
/* Toggled State */
.extendd input[type=checkbox]:checked ~ div.tton,
.extendd input[type=checkbox]:checked ~ div.tttw,
.extendd input[type=checkbox]:checked ~ div.ttth {
display: block;
transform: scale(1);
opacity: 1;
max-height: 400px;
overflow: visible;
padding: 10px 15px 15px 15px;
}
.extendd label {
cursor: pointer;
padding-left: 5px;
color: green;
font-style: italic;
}
';
} |