Source: http://www.syahzul.com/2016/04/06/how-to-install-oci8-on-ubuntu-14-04-and-php-5-6/
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_audima_script() { | |
wp_enqueue_script( 'audima-script', 'https://audio.audima.co/audima-widget.js', false ); | |
} | |
add_action( 'wp_enqueue_scripts', 'add_audima_script' ); | |
function audima_the_content( $content ) { | |
$custom_content = '<div id="audimaWidget"></div>'; | |
$custom_content .= $content; | |
return $custom_content; |
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
<script type="text/javascript"> | |
let scriptWeni = document.createElement("script"); | |
scriptWeni.src = 'https://storage.googleapis.com/push-webchat/wwc-latest.js'; | |
scriptWeni.async = true; | |
scriptWeni.onload=chatLoader; | |
const firstScriptFromPage = document.getElementsByTagName('script')[0]; | |
firstScriptFromPage.parentNode.insertBefore(scriptWeni, firstScriptFromPage); | |
function chatLoader() { |
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
# Bulk update all product posts with a post status of publish to draft | |
wp post list --field=ID --post_type=product --posts_per_page=500 --post_status=publish | xargs wp post update --post_status=draft | |
# Bulk update all product posts with a post status of draft to publish | |
wp post list --field=ID --post_type=product --posts_per_page=500 --post_status=draft | xargs wp post update --post_status=publish |
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
' Declare a variable and affect a string value | |
dim myvariable | |
myvariable = "Donald Duck" | |
' Change a variable value | |
dim myvariable | |
myvariable = "Donald Duck" | |
myvariable = "Mickey Mouse" | |
' Concatenate strings |
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
#Update post type for posts from category | |
wp post list --category_name=artigos --field=ID | xargs wp post update --post_type=blog | |
#Count number of posts from all post types (except posts with other status like inherit) | |
wp post list --post_type=$(wp post-type list --field=name --format=json) --post_status=publish,trash,draft --format=count |
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
#resize2fs filesystem | |
#Ex: | |
resize2fs /dev/sdb |
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
SELECT SUM(LENGTH(option_value)) as autoload_size FROM wp_options WHERE autoload=’yes’; |
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
sudo varnishadm ban req.http.host == host.com.br '&&' req.url '~' '\\.css$' |
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
wp wc user_membership list --field=id --user=id5 --allow-root | xargs -n1 wp wc user_membership update --plan_id="274" --user=USER_NAME | |
#wp wc user_membership list can limit the results. An alternative is to use wp post list to get all membership posts: | |
wp post list --post_type=wc_user_membership --field=ID | xargs -n1 wp wc user_membership update --plan_id="274" --user=USER_NAME |
NewerOlder