This file contains hidden or 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( 'fv_user_mail_body', 'fv_filter_user_mail_body', 10, 2 ); | |
| function fv_filter_user_mail_body($body, $photo) { | |
| $body = str_replace('{contestant_description}', $photo->description, $body); | |
| $body = str_replace('{contestant_full_description}', $photo->full_description, $body); | |
| return $body; | |
| } | 
  
    
      This file contains hidden or 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('fv_template_variables', 'fv_filter_upload_form_title', 10, 3); | |
| function fv_filter_upload_form_title($variables, $type, $template_path) { | |
| if ( !class_exists('FvAddon_Video') || $variables['contest']->type != FvAddon_Video::TYPE_VIDEO ) { | |
| return $variables; | |
| } | |
  
    
      This file contains hidden or 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
    
  
  
    
  | /* Yellow */ | |
| .is-gallery .clg-head-view:before { | |
| background-color:rgba(255, 196, 0, 0.7) !important; | |
| } | |
| /* Or Pink */ | |
| .is-gallery .clg-head-view:before { | |
| background-color:rgba(255,105,180, 0.7) !important; | |
| } | 
  
    
      This file contains hidden or 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 check_is_customer_or_redirect_contest() { | |
| // Redirect if User does not have permissions | |
| $user = new WP_User( $user_ID ); | |
| $is_customer = false; | |
| if ( !empty( $user->roles ) && is_array( $user->roles ) && in_array( 'customer', $user->roles ) ) { | |
| $is_customer = true; | |
| } | |
| if ( $is_customer ) { | |
| $myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' ); | 
  
    
      This file contains hidden or 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('fv/public/upload/response', 'fv_upload_add_photo_data', 11, 1); | |
| function fv_upload_add_photo_data($response) { | |
| if ( !empty($response['inserted_photo_ids'][0]) ) { | |
| $photo0 = ModelCompetitors::query()->findByPK( $response['inserted_photo_ids'][0] ); | |
| if ( !empty($photo0) ) { | |
| $response['inserted_photo_datas'][0] = FV_Public::_prepare_contestant_to_js($photo0); | |
| } | 
  
    
      This file contains hidden or 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 | |
| /** | |
| >> WP Foto Vote <<How can I allow for users to vote as many times as they wish for any photos? | |
| Add it to your theme functions.php for example. | |
| #### Note: you must have option Fast Voting (Photo Contest => Settings => Voting) disabled. #### | |
| */ | |
| // Allow for all | 
  
    
      This file contains hidden or 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
    
  
  
    
  | jQuery.cachedScript = function( url, options ) { | |
| // Allow user to set any option except for dataType, cache, and url | |
| options = $.extend( options || {}, { | |
| dataType: "script", | |
| cache: true, | |
| url: url | |
| }); | |
| // Use $.ajax() since it is more flexible than $.getScript | 
  
    
      This file contains hidden or 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( 'script_loader_tag', function ( $tag, $handle ) { | |
| //var_dump($handle); | |
| $handles_to_exclude = array('fv_main_js'=> 0,'fv_theme_story'=>0, 'fv_lib_js'=>0, 'fv_evercookie'=>0, 'jquery-core'=>0, 'jquery-migrate'=>0); | |
| if ( !isset($handles_to_exclude[$handle]) ) return $tag; | |
| if ( 'fv_main_js' == $handle ) { | |
| global $wp_scripts; | |
| $tag = '<script data-cfasync="false">' . $wp_scripts->print_extra_script( $handle, false ) . '</script>' . $tag; | 
  
    
      This file contains hidden or 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 | |
| /** | |
| * Lets save Paypal "receiver_email" | |
| */ | |
| add_action( 'edd_paypal_web_accept', 'my001_edd_process_paypal_web_accept_and_cart', 11, 2 ); | |
| function my001_edd_process_paypal_web_accept_and_cart( $data, $payment_id ) | |
| { | |
| if ($data['txn_type'] != 'web_accept' && $data['txn_type'] != 'cart' && $data['payment_status'] != 'Refunded') { | |
| return; | 
  
    
      This file contains hidden or 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: WP Foto Vote - moderation count + link to admin menu | |
| Plugin URI: http://wp-vote.net/ | |
| Description: Add moderation count + link to admin menu | |
| Author: Maxim Kaminsky | |
| Author URI: http://www.maxim-kaminsky.com/ | |
| Plugin support EMAIL: [email protected] | |
| Version: 0.1 |