Skip to content

Instantly share code, notes, and snippets.

<?php $Get_URL = $_SERVER['REQUEST_URI'];
if ( $Get_URL == '/' ) { ?>
<p>Web Marketing powered by <a href="http://www.ceatus.com/" target="_blank">Ceatus Media Group</a></p>
<?php } else { ?>
<p>Web Marketing powered by Ceatus Media Group</p>
<?php } ?>
::-webkit-input-placeholder { /* Safari, Chrome and Opera */
color: orange;
}
:-moz-placeholder { /* Firefox 18- */
color: orange;
}
::-moz-placeholder { /* Firefox 19+ */
color: orange;
}
:-ms-input-placeholder { /* IE 10+ */
<?php
/**
* Enqueue scripts and styles.
*/
if (!is_admin()) {
function greenwald_enqueue_scripts_styles() {
// Styles
wp_enqueue_style( 'style', get_stylesheet_directory_uri() . "/style.css" );
wp_enqueue_style( 'mobile-color-scheme', get_stylesheet_directory_uri() . "/mobile_color_scheme.css" );
wp_enqueue_style( 'new-mobile-navigation-styles', get_template_directory_uri() . '/mobile-nav-main.css' );
// CMG Forms
function cmgForm($atts) {
return <<< HTML
// html here
HTML;
}
add_shortcode('cmgForm', 'cmgForm');
#add to an existing enqueue function
wp_enqueue_script( 'cmg-form-js', 'https://dil34hcn6yju7.cloudfront.net/assets/cmgform.js', null, null, false );
#add a separate enqueue function
function cmg_cdn_script() {
wp_enqueue_script( 'cmg-form-js', 'https://dil34hcn6yju7.cloudfront.net/assets/cmgform.js', null, null, false );
}
add_action("wp_enqueue_scripts", "cmg_cdn_script");
#rackspace hosting gzip
#--Uses mod_deflate for sending compressed requests--#
SetOutputFilter DEFLATE
#--Don't compress these
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
#--compresses static files--#
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
<?php if ( is_user_logged_in() ) { } else { ?>
<div style="opacity:0.75;font-size:22px;text-align:center;display:block;padding:20px;background:#F00;color:#fff;position:fixed;bottom:50px;width:100%;z-index:9999;margin-top:30px;">
<strong>NOTE:</strong> This site is currently in under production and has not passed quality control.
</div>
<?php } ?>
#the information in this notice MUST BE CUSTOMIZED PER SITE
function your_admin_notice(){
echo '<div class="update-nag">
<p><strong>Version Control:</strong> <span style="color:green; font-weight: bold;">ACTIVE</span></p>
<p><strong>Mobile Site:</strong> <span style="color:green; font-weight: bold;">YES - Responsive/Theme Switcher/Third Party</span> / <span style="color:red; font-style:italic;">NO</span></p>
<p><strong>CMG CDN JS Enqueued:</strong> <span style="color:green; font-weight: bold;">YES</span> / <span style="color:red; font-style:italic;">NO - Enqueued, Not CDN OR CDN, Not enqueued</span></p>
<p><strong>HTML5 Form Validation:</strong> <span style="color:green; font-weight: bold;">YES</span></p>
<p><strong>SCSS:</strong> <span style="color:green; font-weight: bold;">YES</span></p>#remove this line is SCSS is not used
<p><strong>Foundation:</strong> <span style="color:green; font-weight: bold;">YES</span></p>#remove this line if Foundation is not used