function marla_wp_footer() { ?> <script type="text/javascript"> window.___gcfg = {lang: 'en'}; (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'http://connect.facebook.net/<?php marla_fb_language(); ?> /all.js#xfbml=1'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script> <script type="text/javascript"> window.___gcfg = {lang: 'en'}; (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'http://platform.twitter.com/widgets.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script> <script type="text/javascript"> window.___gcfg = {lang: 'en'}; (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script> <?php if (get_theme_mod('pinterest_button') == marla_default_settings('pinterest_button')) { ?> <script type="text/javascript"> (function(d){ var f = d.getElementsByTagName('SCRIPT')[0], p = d.createElement('SCRIPT'); p.type = 'text/javascript'; p.async = true; p.src = '//assets.pinterest.com/js/pinit.js'; f.parentNode.insertBefore(p, f); p.setAttribute('data-pin-hover', true); }(document)); </script> <?php } }
/** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which runs * before the init hook. The init hook is too late for some features, such as indicating * support post thumbnails. */ function marla_setup() { /** * Make theme available for translation * Translations can be filed in the /languages/ directory * If you're building a theme based on marla, use a find and replace * to change 'marla' to the name of your theme in all the template files */ load_theme_textdomain('marla', get_template_directory() . '/languages'); /** * Add default posts and comments RSS feed links to head */ add_theme_support('automatic-feed-links'); /** * Enable support for Post Thumbnails on posts and pages * * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support('post-thumbnails'); set_post_thumbnail_size(300, 300, true); // Post thumbnail size for excerpts and search results add_image_size('home-thumb', 330); add_image_size('full-width', 530, 9999); // Post thumbnail size for full post displays $custom_background_args = array('default-color' => 'FFF', 'default-image' => ''); add_theme_support('custom-background', $custom_background_args); /** * This theme styles the visual editor with editor-style.css to match the theme style. */ if (get_theme_mod('marla_editor') != marla_default_settings('marla_editor')) { add_editor_style(); } /** /** * This theme uses wp_nav_menu() in one location. */ register_nav_menus(array('primary' => __('Primary Menu', 'marla'))); /** * Enable support for Post Formats */ add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link')); }
$wp_customize->add_control('marla_jetpack_subscription', array('label' => __('Jetpack: Display subscription email form on single posts. Only if you have installed the plugin Jetpack', 'marla'), 'section' => 'rss_settings', 'type' => 'checkbox')); /* Custom code */ $wp_customize->add_setting('marla_email_code', array('default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'marla_sanitize_text')); $wp_customize->add_control(new marla_Customize_Textarea_Control($wp_customize, 'marla_email_custom_form', array('label' => __('Email form subscription code different from Jetpack or FeedBurner. It will be wrapped with <div id="marla-email-form"> in case you need some extra CSS', 'marla'), 'section' => 'rss_settings', 'settings' => 'marla_email_code'))); /*-----------------------------------*/ $wp_customize->add_setting('social_header', array('default' => marla_default_settings('social_header'), 'capability' => 'edit_theme_options', 'sanitize_callback' => 'marla_sanitize_checkbox')); $wp_customize->add_setting('marla_editor', array('default' => marla_default_settings('marla_editor'), 'capability' => 'edit_theme_options', 'sanitize_callback' => 'marla_sanitize_checkbox')); $wp_customize->add_control('marla_editor', array('label' => __('Post/Page editor styles', 'marla'), 'section' => 'custom_css', 'type' => 'checkbox')); /* header fixed or static */ $wp_customize->add_setting('header_fixed', array('default' => marla_default_settings('header_fixed'), 'capability' => 'edit_theme_options', 'sanitize_callback' => 'marla_sanitize_checkbox')); $wp_customize->add_control('header_fixed', array('label' => __('Header fixed and menu at the top', 'marla'), 'section' => 'header_image', 'type' => 'checkbox')); $wp_customize->add_control('social_header', array('label' => __('Display twitter & FB widgets in header', 'marla'), 'section' => 'header_image', 'type' => 'checkbox')); $wp_customize->add_setting('social_footer', array('default' => marla_default_settings('social_footer'), 'capability' => 'edit_theme_options', 'sanitize_callback' => 'marla_sanitize_checkbox')); $wp_customize->add_control('social_footer', array('label' => __('Display social icons in footer', 'marla'), 'section' => 'social_settings', 'type' => 'checkbox')); /*menu*/ $wp_customize->add_setting('nav_color_bg', array('default' => marla_default_settings('nav_color_bg'), 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color')); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'marla_nav_color_bg', array('label' => __('nav color background', 'marla'), 'section' => 'nav', 'settings' => 'nav_color_bg'))); $wp_customize->add_setting('nav_color_item', array('default' => marla_default_settings('nav_color_item'), 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color')); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'marla_nav_color_item', array('label' => __('nav color background item', 'marla'), 'section' => 'nav', 'settings' => 'nav_color_item'))); $wp_customize->add_setting('nav_color_text', array('default' => marla_default_settings('nav_color_text'), 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color')); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'marla_nav_color_text', array('label' => __('nav color text', 'marla'), 'section' => 'nav', 'settings' => 'nav_color_text'))); } add_action('customize_register', 'marla_customize_register'); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function marla_customize_preview_js() { wp_enqueue_script('marla_customizer', get_template_directory_uri() . '/js/customizer.js', array('customize-preview'), '20130508', true); } add_action('customize_preview_init', 'marla_customize_preview_js');
function marla_register_custom_background() { $args = array('default-color' => 'ffffff', 'default-image' => get_theme_mod('bg_styles', marla_default_settings('bg_styles'))); $args = apply_filters('marla_custom_background_args', $args); add_theme_support('custom-background', $args['wp-head-callback'], $args['admin-head-callback'], $args['admin-preview-callback']); }
', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"><input type="text" name="email" onfocus="if (this.value=='<?php _e('Subscribe via email', 'marla'); ?> ') this.value='';" placeholder="<?php _e('Subscribe via email', 'marla'); ?> " /><input type="hidden" value="<?php echo get_theme_mod('marla_social4', marla_default_settings('marla_social4')); ?> " name="uri"/><input type="hidden" name="loc" value="<?php bloginfo('language'); ?> "/><input type="submit" value="<?php _e('Subscribe', 'marla'); ?> " class="boton"/></form></div> <?php } if (get_theme_mod('marla_jetpack_subscription') != marla_default_settings('marla_jetpack_subscription') && get_theme_mod('marla_social4') == marla_default_settings('marla_social4') && get_theme_mod('marla_email_code') == marla_default_settings('marla_email_code')) { echo '<div id="marla-jetpack">' . do_shortcode('[jetpack_subscription_form]') . '</div>'; } ?> <?php if (get_theme_mod('marla_jetpack_subscription') == marla_default_settings('marla_jetpack_subscription') && get_theme_mod('marla_social4') == marla_default_settings('marla_social4') && get_theme_mod('marla_email_code') != marla_default_settings('marla_email_code')) { echo '<div id="marla-email-form">' . get_theme_mod('marla_email_code', marla_default_settings('marla_email_code')) . '</div>'; } ?> </div>
function marla_head() { echo '<script type="text/javascript">document.documentElement.className = document.documentElement.className.replace("no-js","js");</script><style type="text/css">'; $webfonts = str_replace("+", " ", get_theme_mod('google_web_fonts')); ?> @import url(http://fonts.googleapis.com/css?family=<?php echo get_theme_mod('google_web_fonts', marla_default_settings('google_web_fonts')); ?> ); body { background-image: <?php echo get_theme_mod('bg_styles', marla_default_settings('bg_styles')); ?> ; font-family: '<?php echo $webfonts; ?> ', sans-serif; } <?php if (get_theme_mod('marla_styles') == 'light') { ?> #metadatos span {color:#444; text-shadow:none} body { background-image:none} .site-footer, #content .widget { background: #ffffff; background:none; } .site-footer { background: #ffffff; } .site-footer, .site-footer a, .site-footer a:hover, .site-footer a:visited { color: #444444; } body.custom-background { background-color: #ffffff; } #content, .author-bio, #content .widget , .site-footer {-moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none} <?php } if (get_theme_mod('marla_styles') == 'dark') { ?> #site-navigation div > ul > li, .blog .entry-title, .archive .entry-title, #site-navigation, #site-navigation ul, .search .entry-title, .site-footer {background:#0e1120; color:#FFF} #site-navigation li:hover { background-color: #000; } .logo h2 {color:#FFF} #header {background-color:transparent} body.custom-background { background-color: #000; background:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHhtbG5zOnhsaW5rPSdodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rJyB3aWR0aD0nMTAwJScgaGVpZ2h0PScxMDAlJz4KCTxkZWZzPgoJCTxnIGlkPSdhJz4KCQkJPHBhdGggZD0nTTUgNmwtNiAtNiB2LTIgbDYgNicgZmlsbC1vcGFjaXR5PScwJyBzdHJva2U9JyMyYjNhNzUnIC8+CgkJCTxwYXRoIGQ9J001IDVsNiAtNiB2LTIgbC02IDYnIGZpbGwtb3BhY2l0eT0nMCcgc3Ryb2tlPScjMzE0MTdkJyAvPgoJCTwvZz4KCQk8cGF0dGVybiBwYXR0ZXJuVW5pdHM9J3VzZXJTcGFjZU9uVXNlJyB4PScwJyB5PScwJyBpZD0ncCcgd2lkdGg9JzIwJyBoZWlnaHQ9JzIwJyB2aWV3Qm94PScwIDAgMTAgMTAnPgoJCQk8dXNlIHhsaW5rOmhyZWY9JyNhJy8+ICAKCQkJPHVzZSB4bGluazpocmVmPScjYScgeT0nLTQnLz4KCQkJPHVzZSB4bGluazpocmVmPScjYScgeT0nNCcvPgoJCQk8dXNlIHhsaW5rOmhyZWY9JyNhJyB5PSc4Jy8+CgkJCTx1c2UgeGxpbms6aHJlZj0nI2EnIHk9JzEyJy8+CgkJPC9wYXR0ZXJuPgoJCTxyYWRpYWxHcmFkaWVudCBncmFkaWVudFVuaXRzPSd1c2VyU3BhY2VPblVzZScgaWQ9J2cnIGN4PSc1MCUnIGN5PSc1MCUnIGZ4PSczMCUnIGZ5PSczMCUnIHI9JzYwJSc+CgkJCTxzdG9wIG9mZnNldD0nMCUnIHN0b3AtY29sb3I9JyNhYWFhYWEnIHN0b3Atb3BhY2l0eT0nLjUnIC8+CgkJCTxzdG9wIG9mZnNldD0nMTAwJScgc3RvcC1jb2xvcj0nIzAwMDAwMCcgc3RvcC1vcGFjaXR5PScuNycgLz4KCQkJPC9yYWRpYWxHcmFkaWVudD4KCTwvZGVmcz4KCTxyZWN0IHg9Jy01JScgeT0nLTUlJyB3aWR0aD0nMTEwJScgaGVpZ2h0PScxMTAlJyBmaWxsPScjMDAwMDIyJy8+Cgk8cmVjdCB3aWR0aD0nMTEwJScgaGVpZ2h0PScxMTAlJyBmaWxsPSd1cmwoI3ApJy8+Cgk8cmVjdCB4PSctNSUnIHk9Jy01JScgd2lkdGg9JzExMCUnIGhlaWdodD0nMTEwJScgZmlsbD0ndXJsKCNnKScvPgo8L3N2Zz4=") } <?php } if (is_admin_bar_showing()) { ?> #site-navigation.fixed {top: 28px; }<?php } if (get_theme_mod('header_background') != marla_default_settings('header_background')) { ?> #header {background-image:url('<?php echo get_theme_mod('header_background'); ?> '); background-position:center center;} <?php } if (get_theme_mod('height_header') != marla_default_settings('height_header')) { ?> #header {height:<?php echo get_theme_mod('height_header'); ?> px;} <?php } if (get_theme_mod('font_size') != marla_default_settings('font_size')) { ?> body {font-size:<?php echo get_theme_mod('font_size'); ?> %;} <?php } if (get_theme_mod('nav_color_bg') != marla_default_settings('nav_color_bg')) { ?> #site-navigation, #site-navigation ul {background:<?php echo get_theme_mod('nav_color_bg'); ?> ;} #site-navigation li:hover {background:<?php echo get_theme_mod('nav_color_bg'); ?> ;} <?php } if (get_theme_mod('nav_color_item') != marla_default_settings('nav_color_item')) { ?> #site-navigation div > ul > li, .blog .entry-title, .archive .entry-title, .search .entry-title, #site-navigation .sub-menu, #site-navigation .children, #sidebar .widget-title, .todocontenido .widget-title {background:<?php echo get_theme_mod('nav_color_item'); ?> ;} <?php } if (get_theme_mod('nav_color_text') != marla_default_settings('nav_color_text')) { ?> #site-navigation ul > li > a {color:<?php echo get_theme_mod('nav_color_text'); ?> ;} <?php } if (get_theme_mod('header_background_color') != marla_default_settings('header_background_color')) { ?> #header { background-color: <?php echo get_theme_mod('header_background_color', marla_default_settings('header_background_color')); ?> ; } <?php } if (get_theme_mod('headings_color') != marla_default_settings('headings_color')) { ?> h1,h2,h3 { color: <?php echo get_theme_mod('headings_color', marla_default_settings('headings_color')); ?> ; } <?php } if (get_theme_mod('bg_cover') != marla_default_settings('bg_cover')) { ?> body, body.custom-background { background-size:cover; -moz-background-size: cover;-webkit-background-size: cover; -o-background-size: cover;background-attachment:fixed !important; height:100%;} <?php } if (get_theme_mod('footer_background_color') != marla_default_settings('footer_background_color')) { ?> .site-footer { background: <?php echo get_theme_mod('footer_background_color', marla_default_settings('footer_background_color')); ?> ; } <?php } if (get_theme_mod('header_fixed') != marla_default_settings('header_fixed')) { ?> #header {position: fixed; left: 0px; top: 37px; background-color: <?php echo get_theme_mod('header_background_color'); ?> ; box-shadow: 0 0 10px #222; -webkit-box-shadow: 0 0 10px #222; -moz-box-shadow: 0 0 10px #222; } * html #header { position: absolute; top: expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px'); } @media only screen and (max-width : 600px) { #header {position: static} } <?php } if (is_admin_bar_showing()) { ?> #header { top: 65px; } <?php } if (get_theme_mod('footer_fixed') != marla_default_settings('footer_fixed')) { ?> .site-footer {position: fixed; bottom:0} * html .site-footer { position: absolute; top: expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px'); } <?php } if (get_theme_mod('link_color') != marla_default_settings('link_color')) { ?> a, a:visited { color: <?php echo get_theme_mod('link_color', marla_default_settings('hover_color')); ?> ; } <?php } if (get_theme_mod('hover_color') != marla_default_settings('hover_color')) { ?> a:hover { color: <?php echo get_theme_mod('hover_color', marla_default_settings('hover_color')); ?> ; } <?php } if (get_theme_mod('marla_right_sidebar') != marla_default_settings('marla_right_sidebar')) { ?> @media only screen and (min-width : 1000px) { #sidebar {display:block; padding:25px; background-color:#FFF; overflow:hidden; float:right;width:300px} .single-post #pagina {float:left; margin-left:10%}} <?php } if (get_theme_mod('footer_color') != marla_default_settings('footer_color')) { ?> .site-footer, .site-footer a, .site-footer a:hover, .site-footer a:visited { color: <?php echo get_theme_mod('footer_color'); ?> ; } <?php } if (get_theme_mod('marla_custom_css') != marla_default_settings('marla_custom_css')) { echo get_theme_mod('marla_custom_css'); } ?> <?php echo '</style>'; if (get_theme_mod('code_header') != marla_default_settings('code_header')) { echo get_theme_mod('code_header'); } }
?> <li class="email"><a href="mailto:<?php echo get_theme_mod('marla_social_email', marla_default_settings('marla_social_email')); ?> "></a></li> <?php } ?> </ul><?php } ?> <div class="site-info clear"><?php echo get_theme_mod('footer_text', marla_default_settings('footer_text')); ?> <?php do_action('marla_credits'); ?> <a href="http://wordpress.org/" title="<?php esc_attr_e('A Semantic Personal Publishing Platform', 'marla'); ?> " rel="generator"><?php printf(__('Proudly powered by %s', 'marla'), 'WordPress'); ?> </a> <span class="sep"> | </span> <?php
<div class="fleft" id="fb-root"><fb:like href="http://www.facebook.com/<?php echo get_theme_mod('marla_social2', marla_default_settings('marla_social2')); ?> " layout="button_count" send="false" width="80" show_faces="false" font=""></fb:like></div> <?php } if (get_theme_mod('marla_social1') != marla_default_settings('marla_social1')) { ?> <div class="fright"><a href="http://twitter.com/<?php echo get_theme_mod('marla_social1', marla_default_settings('marla_social1')); ?> " class="twitter-follow-button" data-button="grey" data-text-color="#FFFFFF" data-link-color="#FFFFFF" data-lang="<?php marla_twitter_language(); ?> ">Follow @<?php echo get_theme_mod('marla_social1', marla_default_settings('marla_social1')); ?> </a></div> <?php } } ?> <div class="logo centrar "> <?php marla_admin_header_image(); ?>
<?php } // End if 'post' == get_post_type() ?> <?php if (!post_password_required() && (comments_open() || '0' != get_comments_number())) { ?> <span class="sep"> | </span> <span class="comments-link"><?php comments_popup_link(__('Leave a comment', 'marla'), __('1 Comment', 'marla'), __('% Comments', 'marla')); ?> </span> <?php } ?> <?php edit_post_link(__('Edit', 'marla'), '<span class="sep"> | </span><span class="edit-link">', '</span>'); ?> </footer><?php if (get_theme_mod('author_bio') == marla_default_settings('author_bio')) { get_template_part('author-bio'); } ?> <!-- .entry-meta --> </article><!-- #post-## -->