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
var anArray = [true, false, false, true, true, false]; | |
var isTrue = example => { | |
return example; | |
}; | |
var trueArray = anArray.filter(isTrue); |
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
class ComponentName extends React.Component { | |
state = { } | |
render() { | |
return ( <div></div> ); | |
} | |
} |
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
const ComponentName = (props) => { | |
return ( <div></div> ); | |
} |
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
var anArray = [true, false, false, true, true, false]; | |
var trueArray = []; | |
var falseArray = []; | |
for (i = 0; i < anArray.length; i++) { | |
if (anArray[i] === true) { | |
trueArray.push(anArray[i]); | |
} else { | |
falseArray.push(anArray[i]); | |
} |
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
// Remove Default Linking to Media Items | |
function wpb_imagelink_setup() { | |
$image_set = get_option( 'image_default_link_type' ); | |
if ($image_set !== 'none') { | |
update_option('image_default_link_type', 'none'); | |
} | |
} | |
add_action('admin_init', 'wpb_imagelink_setup', 10); |
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
// Enable Widgets | |
function arphabet_widgets_init() { | |
register_sidebar( array( | |
'name' => 'articles right sidebar', | |
'id' => 'articles_right_1', | |
'before_widget' => '<div>', | |
'after_widget' => '</div>', | |
'before_title' => '<h2 class="rounded">', | |
'after_title' => '</h2>', |
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
function register_my_menu() { | |
register_nav_menu('footer-navigation',__( 'Footer Navigation' )); | |
} | |
add_action( 'init', 'register_my_menu' ); |
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
function add_favicon() { | |
$favicon_url = site_url() . '/favicon.png'; | |
echo '<rel="icon" type="image/png" href="' . $favicon_url . '"/>'; | |
} | |
add_action('login_head', 'add_favicon'); | |
add_action('admin_head', 'add_favicon'); |
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
// enqueue stylesheets | |
function enqueue_styles() { | |
// register fonts: http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic | |
wp_register_style( 'fonts', 'http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic', array(), '', 'all' ); | |
wp_enqueue_style( 'fonts' ); | |
// register main-style: styles.css | |
wp_register_style( 'main-style', get_template_directory_uri() . '/css/styles.css', array('fonts'), '', 'all' ); | |
wp_enqueue_style( 'main-style' ); | |
// register animate: animate.min.css | |
wp_register_style( 'animate', get_template_directory_uri() . '/css/lib/animate.min.css', array('fonts', 'main-style'), '', 'all' ); |
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
(function () { | |
var ulList = $("#ulList"), | |
liArray = ulList.children('li'), | |
reversedList = $(liArray).get().reverse(); | |
$(ulList).prepend(reversedList); | |
})(); |