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
<?php | |
/** | |
* A wordpress function that triggers #publish button onClick | |
* when on a post page (admin); then: | |
* 1) gets all custom_fields of an extended Pod that are marked Required, of the current post_type | |
* 2) checks if all the required fields have a value, if not, throws an error | |
* 3) checks if custom_field XYZ has a value between 50 & 80, if not throws an error | |
* 4) changes post_status to "publish" | |
* 5) re-directs to homepage. | |
*/ |
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
{ | |
"workbench.colorTheme": "Quiet Light", | |
"workbench.startupEditor": "newUntitledFile", | |
"breadcrumbs.enabled": false, | |
"liveSassCompile.settings.formats": [ | |
{ | |
"format": "compressed", | |
"extensionName": ".min.css", | |
"savePath": null | |
} |
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
function add_custom_pt( $query ) { | |
if ( !is_admin() && $query->is_main_query() ) { | |
$query->set( 'post_type', array( 'post', 'the_custom_pt' ) ); | |
} | |
} | |
add_action( 'pre_get_posts', 'add_custom_pt' ); |
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
"php": { | |
"prefix": "php", | |
"body": [ | |
"<?php $1 ?>" | |
], | |
"description": "php tag" | |
} | |
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
/** | |
* Change the custom logo URL | |
*/ | |
function my_custom_logo_link() { | |
// The logo | |
$custom_logo_id = get_theme_mod( 'custom_logo' ); | |
// If has logo | |
if ( $custom_logo_id ) { |
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
/* System Fonts as used by Medium and WordPress */ | |
body { | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | |
} |
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
/** | |
* SVG support | |
*/ | |
function svg_mime_types( $mimes ) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes;} | |
add_filter( 'upload_mimes', 'svg_mime_types' ); | |
function svg_size() { | |
echo '<style> |
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
IFS=$'\r\n' GLOBIGNORE='*' | |
command eval 'arr=($(cat ep_names))' | |
for i in "${arr[@]}" | |
do | |
echo "$i" | |
done |
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
set tabsize 4 | |
set tabstospaces | |
set smooth | |
set tempfile |
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
ARRAY=("Narcos - 01x01 - Descenso" | |
"Narcos - 01x02 - The Sword of Simon Bolivar" | |
"Narcos - 01x03 - The Men of Always" | |
"Narcos - 01x04 - The Palace in Flames" | |
"Narcos - 01x05 - There Will Be a Future" | |
"Narcos - 01x06 - Explosivos" | |
"Narcos - 01x07 - You Will Cry Tears of Blood" | |
"Narcos - 01x08 - La Gran Mentira" | |
"Narcos - 01x09 - La Catedral" | |
"Narcos - 01x10 - Despegue"); j=0; for i in *.srt; do mv "$i" "${ARRAY[$j]}".srt; let j=j+1;done |
NewerOlder