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
// code snippets version of fix for bug reported here: | |
// https://github.com/soflyy/oxygen-bugs-and-features/issues/2820 | |
// add this snippet to some code snippet plugin and run it once. If using | |
// Code Snippets, select "Only Run Once" then "Save and Activate". | |
// This should restore the XML that were erased or corrupted. | |
// Tested on a sandbox instance. Replicated bug on a sandbox instance. | |
// Started sandbox, Oxygen loads, saved options.php, Oxygen crashes. |
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 | |
/*** Add a custom favicon for the admin area ***/ | |
function custom_admin_favicon() { | |
$url = ''; // Place the path to your dashboard icon here. | |
echo '<link rel="Shortcut Icon" type="image/x-icon" href="' . $url . '" />'; | |
} | |
add_action( 'admin_head', 'custom_admin_favicon' ); | |
/*** Add a custom default front end favicon ***/ |
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
/* I'll put here different examples of dynamic query for Oxygen repeater : | |
* - Use one of the following repeater_dynamic_query definitions | |
* in code block just BEFORE the repeater | |
* - Set the repeater custom query settings : post type, number of posts, order... | |
* - Add the remove_action in a code block AFTER the repeater | |
*/ | |
/**************************************************************************************************** | |
* Display related posts for any CPT with taxonomy: |
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 | |
$order->get_data(); (not needed is using the code above) | |
$order_id = $order_data['id']; | |
$order_parent_id = $order_data['parent_id']; | |
$order_status = $order_data['status']; | |
$order_currency = $order_data['currency']; | |
$order_version = $order_data['version']; | |
$order_payment_method = $order_data['payment_method']; | |
$order_payment_method_title = $order_data['payment_method_title']; |
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 | |
# Get the required project variables | |
printf "Project name: " | |
read PROJECT_NAME | |
printf "Project folder name: " | |
read PROJECT_FOLDER | |
printf "Database Name: " |
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( 'woocommerce_thankyou', 'ad_redirectcustom'); | |
function ad_redirectcustom( $order_id ){ | |
$order = new WC_Order( $order_id ); | |
$items = $order->get_items(); | |
$product_id=223074;//id of your product | |
$product_id2=223076;// id of your product | |
$url ='';// url for the redirection after purchase your product | |
$url2=''; | |
foreach ( $items as $item ) { |
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 | |
/** | |
* @package Media_hacks | |
* @version 1.0 | |
*/ | |
/* | |
Plugin Name: Media hacks | |
Plugin URI: http://wordpress.org/extend/plugins/# | |
Description: This is an example plugin | |
Author: Carlo Daniele |
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 | |
/** | |
* Gravity Wiz // Gravity Forms // Advanced Conditional Logic | |
* | |
* PLEASE NOTE: This snippet is a proof-of-concept. It is not supported and we have no plans to improve it. | |
* | |
* Allows multiple groups of conditional logic per field. | |
* | |
* @version 0.1 | |
* @author David Smith <[email protected]> |
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 theFolder to choose folder with prompt "Select folder with original pages files :" | |
--Do it | |
tell application "Finder" | |
set theNames to name of files of theFolder ¬ | |
whose name extension is "pages" | |
end tell | |
-- How many files to export | |
set item_count to (get count of items in theNames) |
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
document.addEventListener('copy', function() { | |
//Get the selected text and append the extra info | |
var selection = window.getSelection(), | |
pagelink = '<br /><br /> Read more at: ' + document.location.href, | |
copytext = selection + pagelink, | |
newdiv = document.createElement('div'); | |
//hide the newly created container | |
newdiv.style.position = 'absolute'; | |
newdiv.style.left = '-99999px'; |
NewerOlder