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: Marketpress csv converter | |
Author: Hoang | |
Version: 1.0 | |
*/ | |
add_action('admin_menu', 'mpc_admin_menu'); | |
function mpc_admin_menu() | |
{ |
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 _mp_cart_shipping($editable = false, $echo = false) | |
{ | |
global $mp, $current_user; | |
$meta = wp_parse_args(get_user_meta($current_user->ID, 'mp_shipping_info', true), array( | |
'address1' => '', | |
'address2' => '', | |
'city' => '', | |
'state' => '', | |
'zip' => '', |
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
add_action('wdf_after_goal_complete', 'fundraiser_done_send_email'); | |
function fundraiser_done_send_email($pledges) | |
{ | |
$small_amount_emails = array(); | |
$large_amount_emails = array(); | |
foreach ($pledges as $pledge) { | |
$data = get_post_meta($pledge->ID, 'wdf_transaction', true); | |
if ($data['gross'] < 5) { | |
$small_amount_emails[] = $data['payer_email']; | |
} else { |
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: Jobs & Experts Job location field | |
Author: Hoang Ngo | |
Version: 1.0 | |
*/ | |
add_filter('je_job_additions_field', 'job_add_location_field'); | |
function job_add_location_field($fields) |
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
add_shortcode('m_count_down', 'm_count_down'); | |
function m_count_down($attr) | |
{ | |
if (class_exists('Membership_Plugin')) { | |
$subscription_id = isset($attr['s_id']) ? $attr['s_id'] : 0; | |
if (!is_user_logged_in()) { | |
return ''; | |
} | |
if ($subscription_id == 0) { |
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: Membership Users Exporter | |
Author: Hoang Ngo | |
Version: 1.0 | |
*/ | |
add_action('admin_menu', 'me_main_menu'); | |
add_action('wp_loaded', 'me_export_users'); | |
function me_main_menu() | |
{ |
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
add_shortcode('list_domains_wpmu', 'list_domains_wpmu'); | |
function list_domains_wpmu($attrs = array()) | |
{ | |
$default = array( | |
'root_domain' => parse_url(get_site_url(1), PHP_URL_HOST) | |
); | |
$a = wp_parse_args($attrs, $default); | |
$domains = get_site_option('md_domains'); | |
$data = array(); | |
foreach ($domains as $domain) { |
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(){function t(t){"closed"===r?t._show()?(s=t,r="open"):e(t):u[u.length]=t}function e(){if(r="closed",s=null,u.length>0){var e=u.shift();t(e)}}function o(t,e,o){var n,p,d=0,r=i(window.location.toString()),u=i(document.referrer.toString()),s=null,c=function(e){s=jQuery.extend({},t),s.popup=e,a(s)};return void 0!==window.force_popover&&(d=window.force_popover.toString()),void 0!==e&&(d=e.toString()),t.ajax_data=t.ajax_data||{},p=jQuery.extend({},t.ajax_data),p.action="inc_popup",p["do"]=t["do"],p.thefrom=r,p.thereferrer=u,d&&(p.po_id=d),o&&(p.data=o),t.preview&&(p.preview=!0),n={url:t.ajaxurl,dataType:"jsonp",jsonpCallback:"po_data",data:p,success:function(t){c(t)},complete:function(){jQuery(document).trigger("popup-load-done",[s])}},jQuery.ajax(n)}function a(t){if(void 0!==t){var e=function(t){void 0!==t&&(void 0!==t.popup&&void 0!==t.popup.html&&(jQuery('<style type="text/css">'+t.popup.styles+"</style>").appendTo("head"),jQuery(t.popup.html).appendTo("body").hide()),window.inc_popup=new d(t),window.i |
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
add_shortcode( 'global_recent_posts', 'global_recent_posts_sc' ); | |
function global_recent_posts_sc( $atts ) { | |
$atts = wp_parse_args( $atts, array( | |
'order' => 'ASC', | |
'orderby' => 'post_title', | |
'is_meta' => 0, | |
'post_type' => 'post', | |
'post_status' => 'publish', | |
'recentglobalpostsdisplay' => 'title_content', | |
'recentglobalpostsnumber' => '5', |
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
add_shortcode( 'global_recent_posts', 'global_recent_posts_sc' ); | |
function global_recent_posts_sc( $atts ) { | |
$data = wp_parse_args( $atts, array( | |
'order' => '', | |
'orderby' => '', | |
'is_meta' => 0, | |
'post_type' => 'post', | |
'post_status' => 'publish', | |
'recentglobalpostsdisplay' => 'title_content', | |
'recentglobalpostsnumber' => '5', |
OlderNewer