Last active
March 8, 2017 14:34
-
-
Save pranali333/b7ed8c40903765a23916978714dc3a81 to your computer and use it in GitHub Desktop.
Add conditional check before applying watermark on rtMedia uploads
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 | |
// IMPORTANT | |
// Before using this gist code, make sure you have added this code - https://gist.github.com/pranali333/085e312f18fc2b9bd7333f8c17b56630 | |
add_action( 'init', 'pre_watermark_condition', 11 ); | |
function pre_watermark_condition() { | |
if ( isset( $_POST['unique_hidden_field'] ) ) { | |
if ( Media is free ){ | |
// Remove action to apply watermark | |
remove_class_action( 'rtemdia_after_file_upload_before_activity','RTMediaWatermark', 'load_filter', 10 ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment