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 src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$( document ).ready(function(){ | |
var userLang = navigator.language || navigator.userLanguage; | |
if (userLang == "it") { | |
window.location.href = "http://www.neber.it/area-riservata/area-riservata.html" | |
} | |
else { | |
window.location.href = "http://www.neber.it/area-riservata/area-riservata-en.html" | |
} |
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 wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |
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 | |
/* -------------------------------------------------------------------- | |
:: Auto-Includer | |
Loads PHP files from the /includes/ directory. For WordPress sites, | |
this code would go in your functions.php file. | |
-------------------------------------------------------------------- */ | |
foreach (glob(__DIR__ . '/includes/*.php') as $my_theme_filename) { |
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
#!/bin/bash | |
# Install script for Latest WordPress by Johnathan Williamson - extended by Don Gilbert | |
# Disclaimer: It might not bloody work | |
# Disclaimer 2: I'm not responsible for any screwups ... :) | |
# DB Variables | |
echo "MySQL Host:" | |
read mysqlhost | |
export mysqlhost |
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
#!/bin/bash -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
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 remove_product_editor() { | |
remove_post_type_support( 'product', 'editor' ); | |
} | |
add_action( 'init', 'remove_product_editor' ); |
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
// _dt_fancy_header_bg_image | |
add_filter( 'vc_gitem_template_attribute_fancy_image', 'vc_gitem_template_attribute_fancy_image', 10, 2 ); | |
function vc_gitem_template_attribute_fancy_image( $value, $data ) { | |
/** | |
* @var Wp_Post $post | |
* @var string $data | |
*/ | |
global $post; |
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_action( 'get_header', 'dt_media_sidebar', 10 ); | |
function dt_media_sidebar() { | |
$config = Presscore_Config::get_instance(); | |
if(is_singular( 'post' )){ | |
$config->set( 'sidebar_position', 'left' ); //to change sidebar postion | |
$config->set( 'sidebar_widgetarea_id', 'sidebar_1' ); //repalce with sidebar widget area 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
add_action( 'get_header', 'dt_archive_layout', 10 ); | |
function dt_archive_layout() { | |
$config = Presscore_Config::get_instance(); | |
if(is_search() ){ | |
$config->set( 'post.meta.fields.date', '0' ); | |
$config->set( 'post.meta.fields.categories', '0' ); | |
$config->set( 'post.meta.fields.comments', '0' ); |
OlderNewer