This file contains hidden or 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 | |
$age = 0; | |
$message0 = "At first, "; | |
$message1 = "you are age "; | |
$message2 = "After a while: "; | |
$message3 = "you die!"; | |
echo ($message0); | |
while($age<50){ |
This file contains hidden or 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 getClass(){ | |
$class = "Level 1"; | |
$random = rand(0,3); | |
if($random==0) | |
{ | |
$class = "Level 2"; | |
} | |
elseif($random==1) |
This file contains hidden or 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 | |
add_action( 'wp_enqueue_scripts', 'parent_style_enqueue' ); | |
function parent_style_enqueue() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
} |
This file contains hidden or 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
//add a favicon for your WordPress website | |
function blog_favicon() { | |
//this will load the favicon from the root directory of your blog | |
// echo '<link rel="Shortcut Icon" type="image/x-icon" href="'.get_bloginfo('wpurl').'/favicon.ico" />'; | |
//this will load the favicon from the root directory of your theme | |
echo '<link rel="Shortcut Icon" type="image/x-icon" href="'.get_bloginfo('stylesheet_directory').'/favicon.ico" />' . "\n"; | |
} |
This file contains hidden or 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
.hyphenate { | |
overflow-wrap: break-word; | |
word-wrap: break-word; | |
-webkit-hyphens: auto; | |
-ms-hyphens: auto; | |
-moz-hyphens: auto; | |
hyphens: auto; | |
} |
This file contains hidden or 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 | |
/* | |
Plugin Name: Personal Information Widget for Footer | |
Plugin URI: https://gist.github.com/jimmy89Li | |
Description: Custom widget for personal information | |
Author: jimmyLi | |
Version: 1.0.0 | |
Author URI: https://gist.github.com/jimmy89Li | |
*/ | |
This file contains hidden or 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 | |
wp_register_style( | |
'style', | |
get_template_directory_uri() . 'style.css', | |
array( 'theme-style' ), | |
'1.0', | |
'screen' | |
); | |
This file contains hidden or 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 | |
// Remove WordPress version | |
remove_action('wp_head', 'wp_generator'); | |
?> |
OlderNewer