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
// ==UserScript== | |
// @name myProfit | |
// @version 1.11.6 | |
// @namespace https://gist.github.com/pauloiankoski/2fbaf199904c24369f60a51e5f3935e8/ | |
// @description This script will add new columns to the AssetDetail page to report the total result including provents. | |
// @author pauloiankoski / prcvilla | |
// @match https://myprofitweb.com/App/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=myprofitweb.com | |
// @grant none | |
// ==/UserScript== |
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 | |
if ( ! function_exists( 'console_log' ) ) { | |
function console_log( $var ) { | |
$backtrace = debug_backtrace(); | |
$log[] = sprintf( | |
'"DEBUG: On %s at line %d:"', | |
str_replace( $_SERVER['DOCUMENT_ROOT'], '', $backtrace[0]['file'] ), | |
$backtrace[0]['line'] | |
); | |
$log[] = sprintf( '"(%s)"', gettype( $var ) ); |
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
# refresh: package.json | |
nvm install 10.16.3 | |
nvm use | |
npm i -g gulp-cli | |
npm install | |
npm rebuild node-sass |
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
jQuery(document).ready(function($)) { | |
var preventSubmit = true | |
$('.acf-field[data-name="repeater_value"]').hide() | |
$('.wp-admin.post-type-page form#post').on('submit', function(e) { | |
if ( ! preventSubmit ) { | |
return | |
} | |
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
gulp // Compile all files from all folders | |
gulp css // Compile all SASS files from all folders | |
gulp js // Minify all JS files from all folders | |
gulp --plugin1 // Compile all files from plugin1 folder | |
gulp css --plugin1 // Compile all SASS files from plugin1 folder | |
gulp js --plugin1 // Minify all JS files from plugin1 folder | |
gulp --plugin1 --theme1 // Compile all files from plugin1 and theme1 folders | |
gulp css --plugin1 --theme1 // Compile all SASS files from plugin1 and theme1 folders |
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
if ( $score_points < $cancel_score && $cancel_score < 100 ) { | |
$new_status = 'wc-cancelled'; | |
} elseif ( $score_points < $hold_score && $hold_score < 100 ) { | |
$new_status = 'wc-on-hold'; | |
} |
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
jQuery(document).ready(function($){ | |
var woocommerce_form = $( '.woocommerce-cart form' ); | |
woocommerce_form.on('change', '.qty', function(){ | |
form = $(this).closest('form'); | |
// emulates button Update cart click | |
$("<input type='hidden' name='update_cart' id='update_cart' value='1'>").appendTo(form); | |
// get the form data before disable button... | |
formData = form.serialize(); |
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
.metaslider { | |
.ms-image { | |
background-position : center center !important; | |
background-size : cover !important; | |
height : 500px; | |
} | |
} |
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 | |
/* | |
* Template Name: que redireciona para filho | |
*/ | |
$child_page = get_pages( "child_of=" . $post->ID . "&sort_column=menu_order" ); | |
if ( $child_page ) { | |
$firstchild = $child_page[0]; | |
wp_redirect( get_permalink( $firstchild->ID ) ); | |
exit; | |
} |
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 | |
if ( is_front_page() ) : | |
?> | |
<div class="video-container"> | |
<video autoplay loop poster="polina.jpg"> | |
<source src="<?php vulcano_images( 'bg-video.webm' ); ?>" type="video/webm"> | |
<source src="<?php vulcano_images( 'bg-video.mp4' ); ?>" type="video/mp4"> | |
</video> | |
</div> | |
<?php |
NewerOlder