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
/** | |
** Following filter can be used to change FROM Email When Form is Submitted | |
** Plugin URL: http://najeebmedia.com/wordpress-plugin/wp-contact-form-file-upload/ | |
**/ | |
add_filter('webcontact_from_email', 'set_my_email', 10, 2); | |
/** | |
** @param: | |
** $email - default 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
// visit plugin url: http://najeebmedia.com/wordpress-plugin/wp-front-end-file-upload-and-download-manager/ | |
/** | |
* change FROM EMAIL | |
* Notification when file uploaded by user | |
**/ | |
add_filter('fileupload_from_email', 'change_from_email'); | |
function change_from_email($dedault_email){ | |
return 'any@otheremail.com'; |
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
// assumng col is a int value | |
$wpdb->query( $wpdb->prepare ("INSERT into table_name (col1, col2, col3) VALUES (%d, %s, %s)", | |
array('$value1','$value2', '$value3') | |
) | |
); |
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
{ | |
"name" : "File Upload and Download Manager", | |
"slug" : "nm-file-upload-manager-pro", | |
"download_url" : "", | |
"version" : "10.7", | |
"author" : "N-Media", | |
"sections" : { | |
"description" : "<h2>10.6 September 21, 2016 </h2> | |
<ul> | |
<li>Bug fixed: Files were renaming to 'blob', now it's fixed.</li> |
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 render_shortcode_template($atts){ | |
extract(shortcode_atts(array(), $atts)); | |
if($this -> get_option("_show_icons") == 'yes'){ | |
wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'); | |
} | |
wp_enqueue_style($this->plugin_meta['shortname'].'-styles', $this->plugin_meta['url'].'templates/post-frontend-style.css'); | |
//getting dynamic css |
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
// this will add tab heading | |
add_filter('um_profile_tabs', 'user_files', 1000 ); | |
function user_files($tabs) { | |
$tabs['userfiles'] = array( | |
'name' => 'My Files', // you can change this | |
'icon' => 'um-faicon-file', // you can change this | |
); | |
return $tabs; |
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
/** | |
* WPML | |
* registering and translating strings input by users | |
*/ | |
if( ! function_exists('nm_wpml_register') ) { | |
function nm_wpml_register($field_value, $domain) { | |
$field_name = $domain . ' - ' . sanitize_key($field_value); |
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 | |
/** | |
* Inputs rendering class | |
**/ | |
// constants/configs | |
define( 'ECHOABLE', false ); | |
class NM_Form { |
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
"use strict" | |
var successCallback = function(data) { | |
var checkout_form = jQuery( 'form.woocommerce-checkout' ); | |
// add a token to our hidden input field | |
console.log(data); | |
var token = data.response.token.token; | |
checkout_form.find('#twoco_token').val(token); | |
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
create host file in /etc/apache2/sites-available | |
make sure AWS Route 53 as Host/Zone Entry for this | |
For WordPress Permissions Issue | |
> sudo chown www-data:www-data /var/www/ -R |
OlderNewer