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
/** | |
* Following script will render Taxonomy Tree attached with specified post type | |
* in following example post_type use: books | |
* output can be seen here: https://www.diigo.com/item/image/4xv00/xrhq | |
*/ | |
$posttype = 'books' | |
//getting all taxonomies with attached with $posttype | |
$taxonomy_names = get_object_taxonomies( $posttype ); |
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
/** | |
** 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 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
// 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 '[email protected]'; |
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
// 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 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
{ | |
"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 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 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 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
// 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 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
/** | |
* 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 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 | |
/** | |
* Inputs rendering class | |
**/ | |
// constants/configs | |
define( 'ECHOABLE', false ); | |
class NM_Form { |
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
// Add this code at theme's function.php at bottom | |
add_filter('wooconvo_message_receivers', 'wooconvo_change_admin_email', 10, 2) | |
function wooconvo_message_receivers($receivers, $is_admin) { | |
if( $is_admin ) { | |
$receivers = array('[email protected]'); // add more email if need in array | |
} | |
return $receivers; | |
} |
OlderNewer