- Check for an existing
.gitignore
file in the project directory
ls -a
Best way to override a plugin function is to use mu-plugins (Must Use Plugins) | |
https://gregrickaby.com/2013/10/create-mu-plugin-for-wordpress/#comment-14420 | |
Aleternatively, follow below : | |
1. Copy the plugin shortcode function and put it anywhere in Child Theme and rename it like custom_cs_user_login_shortcode. | |
2. use 'wp_head' action to remove the plugin shortcode and register the new shortcode again with the new function name like custom_cs_user_login_shortcode. | |
/********************************************* |
function fadeOut(el){ | |
el.style.opacity = 1; | |
(function fade() { | |
if ((el.style.opacity -= .1) < 0) { | |
el.style.display = "none"; | |
} else { | |
requestAnimationFrame(fade); | |
} | |
})(); |
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
[PostCSS] is a powerful tool for transforming stylesheets. If it’s unfamiliar to you, PostCSS turns stylesheets into readable objects in JavaScript called ASTs (Abstract Syntax Trees) and then turns those ASTs back into stylesheets, completing the circle.
Nothing changes. What’s the fun in that? The greatness of PostCSS is found in PostCSS plugins.
PostCSS plugins read and modify the AST before it’s turned back into a stylesheet. There are plugins to automatically add [vendor prefixes] to properties and selectors, or interpret Sass-like [variables], [mixins], and [loops], or down-mix [future] and [experimental] features to CSS. PostCSS plugins can even generate entirely new documents based on the CSS, like [styleguides].
Writing a PostCSS plugin is remarkably simple, thanks to its solid API. Still, one of the first challenges aspiring plugin authors face is importing other files. In other words, replacing links in a stylesheet with the contents of those links. This is where something like `@import
#!/bin/sh | |
# Start my day by automating (allthethings) | |
# Add SSH Keys | |
echo '--------------------' | |
echo ' Adding SSH Keys...' | |
echo '--------------------' | |
ssh-add ~/.ssh/github_id_rsa | |
ssh-add ~/.ssh/bitbucket_id_rsa |
— you might not need jQuery | |
> http://youmightnotneedjquery.com/ | |
— Go Make Things | |
> http://gomakethings.com/ditching-jquery-for-vanilla-js/ | |
> http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/ | |
— ids & classes, together at last | |
> <div class="header-notification" id="header-notification"></div> |
<?php | |
function filter_input_object($input_object, $sfid) | |
{ | |
//ensure we are only filtering the correct field name - in this case the field we want to filter has the name `_sfm_colours` | |
//we also want to make sure its a `select` input type we're filtering | |
if(($input_object['name']!='_sfm_colours')||($input_object['type']!='select')) | |
{ | |
return $input_object; | |
} | |
# ----------------------------------------------------------------- | |
# .gitignore for WordPress @salcode | |
# ver 20180808 | |
# | |
# 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. |
<?php | |
/** | |
* Obtain the path to the admin directory. | |
* | |
* @return string | |
*/ | |
function my_plugin_get_admin_path() { | |
// Replace the site base URL with the absolute path to its installation directory. | |
$admin_path = str_replace( get_bloginfo( 'url' ) . '/', ABSPATH, get_admin_url() ); | |