- Related Setup: https://gist.github.com/hofmannsven/6814278
- Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
- Interactive Beginners Tutorial: http://try.github.io/
- Git Cheatsheet by GitHub: https://services.github.com/on-demand/downloads/github-git-cheat-sheet/
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
# ----------------------------------------------------------------- | |
# .gitignore for WordPress @khleomix for MavenTechSolutions.ph | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. | |
# | |
# To ignore uncommitted changes in a file that is already tracked, use | |
# git update-index --assume-unchanged | |
# | |
# To stop tracking a file that is currently tracked, use |
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
.container { | |
display: grid; | |
grid-template-columns: repeat(4, 1fr); /* this will create a 4 columns grid equal width */ | |
/* grid-template-columns: 1fr 1fr 2fr; can also be used like this */ | |
grid-template-rows: repeat(3, 100px); /* will create 3 rows with 100px height each */ | |
grid-gap: 1em; /* will add gutters in between rows and columns at 1em each */ | |
/* grid-gap: 1em 2em; 1em row gaps and 2em column gaps */ | |
} |
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
INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'demo', MD5('yourpassword'), 'Your Name', '[email protected]', 'http://www.test.com/', '2011-06-07 00:00:00', '', '0', 'Your Name'); | |
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); | |
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_user_level', '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
// check version | |
node -v || node --version | |
// list installed versions of node (via nvm) | |
nvm ls | |
// install specific version of node | |
nvm install 6.9.2 | |
// set default version of node |
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 | |
/** | |
* Displays numeric pagination with offset. | |
* | |
* @param array $custom_query Custom WP_Query. | |
* @return void | |
* @author JC Palmes | |
*/ | |
function display_numeric_pagination_with_offset( $custom_query ) { |
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.blocks.registerBlockVariation( | |
'core/columns', | |
{ | |
name: 'unicorn', | |
title: 'Unicorn', | |
isDefault: true, // will override core block and remove it from the inserter, set to false or remove to use as a separate block. | |
attributes: { | |
className: 'unicorn-columns', | |
}, |
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 | |
/** | |
* Fix pagination on archive pages | |
* | |
* @author JC Palmes | |
*/ | |
function khleomix_remove_page_from_query_string( $query_string ) { | |
if ( isset( $query_string['name'] ) == 'page' && isset( $query_string['page'] ) ) { | |
unset( $query_string['name'] ); | |
$query_string['paged'] = $query_string['page']; |
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 | |
$posts = new WP_Query( array( 's' => $search_string ) ); | |
$posts = $posts->get_posts(); | |
foreach( $posts as $post ) { /* ... */ } |
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
Closes # | |
### Link | |
### Feature Description | |
### Feature Screenshots |
OlderNewer