This file contains 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
git checkout --orphan temp #temp is the name of the temporary branch | |
git add -A # Add all files and commit them | |
git commit -m "Initial commit" | |
git branch -D master # Deletes the master branch | |
git branch -m master # Rename the current branch to master | |
git push -f origin master |
This file contains 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
git log --oneline --decorate --all --graph |
This file contains 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
git add -p |
This file contains 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 @salcode | |
# ver 20150227 | |
# | |
# From the root of your project run | |
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore | |
# to download this file | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. |
This file contains 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_filter('manage_$post_type_posts_columns', 'set_$post_type_columns'); | |
function set_$post_type_columns($columns) { | |
$columns['order'] = 'Order'; | |
return $columns; | |
} | |
add_action('manage_$post_type_posts_custom_column', 'set_$post_type_show_columns'); | |
function set_$post_type_show_columns($name) { | |
global $post; | |
switch ($name) { | |
case 'order': |
This file contains 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 CS Cart theme and addon development | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any addons, folders, files 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 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
// Put this in child theme's function.php | |
// Upload the logo to /imahes folder of child theme | |
// Logo must be 80 x 80 or apply custom CSS | |
// custom admin login logo | |
function custom_login_logo() { | |
echo '<style type="text/css"> | |
h1 a { | |
background-image: url(wp-content/themes/'.get_stylesheet().'/images/logo.png) !important; | |
width:186px!important; | |
background-size: 186px 65px!important; |
This file contains 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 excerpt to pages | |
add_action( 'init', 'custom_add_excerpts_to_pages' ); | |
function custom_add_excerpts_to_pages() { | |
add_post_type_support( 'page', 'excerpt' ); | |
} | |
/* | |
Add Page Order column to Pages List Admin page | |
*/ | |
add_filter('manage_pages_columns', 'custom_columns'); |
This file contains 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
define('AUTOSAVE_INTERVAL', 300 ); // seconds | |
define('WP_POST_REVISIONS', false ); | |
define( 'WPCF7_ADMIN_READ_CAPABILITY', 'manage_options' ); | |
define( 'WPCF7_ADMIN_READ_WRITE_CAPABILITY', 'manage_options' ); | |
define('DISALLOW_FILE_EDIT', TRUE); |
This file contains 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 Customize_WP_Login_Page | |
{ | |
public function run() | |
{ | |
add_action('login_enqueue_scripts', array( $this, 'login_enqueue_scripts' )); | |
add_action('login_title', array( $this, 'replace_login_title' )); | |
add_action('login_headerurl', array( $this, 'replace_login_headerurl' )); | |
add_action('login_headertitle', array( $this, 'replace_login_headertitle' )); | |
} |
OlderNewer