#Adding an existing project to GitHub using the command line
Simple steps to add existing project to Github.
In Terminal, change the current working directory to your local project.
##2. Initialize the local directory as a Git repository.
git init
| // This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.github.io | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
| */ |
| <?php | |
| function themename_customize_register($wp_customize){ | |
| $wp_customize->add_section('themename_color_scheme', array( | |
| 'title' => __('Color Scheme', 'themename'), | |
| 'priority' => 120, | |
| )); | |
| // ============================= |
| <?php | |
| /** | |
| * Plugin Name: My Plugin | |
| * Plugin Description: Settings API Demo | |
| */ | |
| add_action( 'admin_menu', 'my_admin_menu' ); | |
| function my_admin_menu() { | |
| add_options_page( 'My Plugin', 'My Plugin', 'manage_options', 'my-plugin', 'my_options_page' ); | |
| } |
| // php | |
| if(preg_match('/BB10|/i', $_SERVER['HTTP_USER_AGENT'])) { | |
| echo 'You\'re on BlackBerry 10!'; | |
| } | |
| // js | |
| if(navigator.userAgent.match(/BB10/i)){ | |
| alert('BlackBerry 10!!'); |
| (function($) { | |
| $('a[href*=#]:not([href=#])').click(function() | |
| { | |
| if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') | |
| || location.hostname == this.hostname) | |
| { | |
| var target = $(this.hash), | |
| headerHeight = $(".primary-header").height() + 5; // Get fixed header height | |
| <?php | |
| //for use in the loop, list 5 post titles related to first tag on current post | |
| $tags = wp_get_post_tags($post->ID); | |
| $tag_in = array(); | |
| foreach($tags as $tag): | |
| setup_postdata($tag); | |
| $tag_in[] = $tag->slug; | |
| endforeach; | |
| $the_tags = implode(",", $tag_in); //Create | |
| <?php | |
| /*================================================== | |
| "get_the_terms" to the order of the "term_order". (order by ASC.) | |
| ================================================== */ | |
| function get_the_terms_orderby_termorder($taxonomy){ | |
| global $post; | |
| $terms = get_the_terms($post->ID, $taxonomy); | |
| $array = array(); | |
| foreach($terms as $term){ | |
| $array[$term->term_order] = (object)array( |
| (function(){ | |
| /** | |
| * Create a new MediaLibraryTaxonomyFilter we later will instantiate | |
| */ | |
| var MediaLibraryTaxonomyFilter = wp.media.view.AttachmentFilters.extend({ | |
| id: 'media-attachment-taxonomy-filter', | |
| createFilters: function() { | |
| var filters = {}; | |
| // Formats the 'terms' we've included via wp_localize_script() |
| <?php | |
| // curl -sS https://getcomposer.org/installer | php | |
| // php composer.phar require aws/aws-sdk-php | |
| // export AWS_ACCESS_KEY_ID=... | |
| // export AWS_SECRET_ACCESS_KEY=... | |
| $queueUrl = '<INSERT_URL_OF_EXISTING_QUEUE_HERE>'; |