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
| First, set up the parent repo: | |
| Open your forked repo in SourceTree. | |
| Select Repository -> Repository Settings in the menu bar. | |
| In the Remotes pane, press Add. | |
| Enter any name you like (often upstream or master) and the URL / path to the parent repo. | |
| Press OK, then OK. | |
| Now, to update: | |
| Select Pull in the toolbar. |
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
| On Sequel Pro, when you make a "New Connection", use "SSH" tab. | |
| MySQL Host: 127.0.0.1 | |
| Username: wordpress | |
| password: wordpress | |
| Port: 3306 | |
| SSH Host: 127.0.0.1 | |
| SSH User: vagrant | |
| SSH Password: vagrant |
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
| <!doctype html> | |
| <html class="no-js" lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Foundation Mega Menu</title> | |
| <link rel="stylesheet" href="css/app.css" /> | |
| <link href="http://cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.css" rel="stylesheet"> | |
| <script src="bower_components/modernizr/modernizr.js"></script> | |
| </head> |
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
| /* Proper way to enqueue scripts and styles */ | |
| function mytheme_custom_scripts(){ | |
| // Register and Enqueue a Stylesheet | |
| // get_template_directory_uri will look up parent theme location | |
| wp_register_style( 'name-of-style', get_template_directory_uri() . '/css/custom-style.css'); | |
| wp_enqueue_style( 'name-of-style' ); | |
| // Register and Enqueue a Script |
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 the following code: in function.php | |
| That’s it. The jQuery library and my_script.js will now be loaded within the <head></head> area of every page of your WordPress site except the admin pages. | |
| **/ | |
| function add_my_script() { | |
| wp_register_script('my_script', home_url() . '/wp-content/themes/mythemename/js/my_script.js', array( 'jquery' )); | |
| wp_enqueue_script('my_script'); | |
| } |
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
| /** Turn it on its side (sidebar) **/ | |
| /* WordPress Admin Bar Styles */ | |
| #wpadminbar { | |
| width:120px; | |
| min-width:120px; | |
| height:100%; | |
| } | |
| #wpadminbar ul li { | |
| width:100%; | |
| } |
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_action('bp_ajax_querystring','bpdev_exclude_users',20,2); | |
| function bpdev_exclude_users($qs=false,$object=false){ | |
| //list of users to exclude | |
| $excluded_user=join(',',bpdev_get_subscriber_user_ids());//comma separated ids of users whom you want to exclude | |
| if($object!='members')//hide for members only | |
| return $qs; | |
| $args=wp_parse_args($qs); |
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 | |
| namespace Custom_Reg; | |
| class Custom_Reg { | |
| protected $form; | |
| protected $saver; | |
| function __construct( Form $form, Saver $saver ) { |
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
| /********************** | |
| Foundation Top-Bar | |
| ***********************/ | |
| add_action('wp_head', 'admin_bar_fix', 5); | |
| function admin_bar_fix() { | |
| if( !is_admin() && is_admin_bar_showing() ) { | |
| remove_action( 'wp_head', '_admin_bar_bump_cb' ); | |
| $output = '<style type="text/css">'."\n\t"; | |
| //$output .= 'body.admin-bar { padding-top: 28px; }'."\n"; |