This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Checks to see if your tagline is set to the default and shows an admin notice to update it | |
* Throw this in function.php for your theme | |
*/ | |
if (get_option('blogdescription') == 'Just another WordPress site') { add_action('admin_notices', create_function( '', "echo '<div class=\"error\"><p>".sprintf(__('Please update your <a href="%s">tagline</a>', 'bb'), admin_url('options-general.php'))."</p></div>';" ) ); }; | |
// Different approach | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function themename_customize_register($wp_customize){ | |
$wp_customize->add_section('themename_color_scheme', array( | |
'title' => __('Color Scheme', 'themename'), | |
'priority' => 120, | |
)); | |
// ============================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Modify the "Enter title here" text when adding new CPT, post or page | |
* | |
* @access public | |
* @since 1.0 | |
* @return void | |
*/ | |
function rc_change_default_title( $title ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$services = getenv("VCAP_SERVICES"); | |
if ( $services != null){ | |
$services_json = json_decode($services,true); | |
$mysql_config = $services_json["mysql-5.1"][0]["credentials"]; | |
define('DB_NAME', $mysql_config["name"]); | |
define('DB_USER', $mysql_config["user"]); | |
define('DB_PASSWORD', $mysql_config["password"]); | |
define('DB_HOST', $mysql_config["hostname"]); | |
define('DB_PORT', $mysql_config["port"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
while ( have_posts() ) : the_post(); | |
if ( have_comments() ) | |
{ | |
echo '<ol class="comment-list">'; | |
wp_list_comments(); | |
echo '</ol>'; | |
} | |
endwhile; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.target { | |
height: 0; | |
-webkit-transform: translate3d(0, 0, 0); | |
-moz-transform: translate3d(0, 0, 0); | |
-ms-transform: translate3d(0, 0, 0); | |
-o-transform: translate3d(0, 0, 0); | |
transform: translate3d(0, 0, 0); | |
-webkit-transition: all 0.3s ease-out; | |
-moz-transition: all 0.3s ease-out; | |
-ms-transition: all 0.3s ease-out; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-defer="view" | |
data-img-src="//path/to/image.jpg" | |
data-img-alt="imgtitle" | |
data-img-width="150"> | |
Image text placeholder | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.gear { | |
position: absolute; | |
width: 60px; | |
height: 60px; | |
background: url("/images/gear.png") no-repeat; | |
background-size: 100% 100%; | |
z-index: 2; | |
-webkit-animation-name: gearSpin; | |
-moz-animation-name: gearSpin; | |
-ms-animation-name: gearSpin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Toggle | |
*/ | |
body{ | |
background: #111; | |
} | |
.container{ | |
background: #fff; | |
margin:0 auto; |
OlderNewer