Ejemplo n.º 1
0
 private function seplocation($title, $sep)
 {
     $name = awpcp_get_blog_name($decode_html = false);
     $regex = false;
     $seplocation = false;
     $left = '/^' . preg_quote($name, '/') . '\\s*' . preg_quote(trim($sep), '/') . '\\s*/';
     $right = '/' . '\\s*' . preg_quote(trim($sep), '/') . '\\s*' . preg_quote($name, '/') . '/';
     $seplocation = '';
     if (preg_match($left, $title, $matches)) {
         $seplocation = 'left';
         $regex = $left;
     } else {
         if (preg_match($right, $title, $matches)) {
             $seplocation = 'right';
             $regex = $right;
         }
     }
     if ($regex) {
         $title = preg_replace($regex, '', $title);
         $name = $matches[0];
     } else {
         $name = '';
     }
     return array($title, $name, $seplocation);
 }
<?php

// emails are sent in plain text, trailing whitespace are required for proper formatting
echo sprintf(__('Hello %s,', 'AWPCP'), $ad->ad_contact_name);
?>
 

<?php 
$message = __('Your Ad "%s" was recently approved by the admin. You should be able to see the Ad published here: %s.', 'AWPCP');
echo sprintf($message, $ad->get_title(), urldecode(url_showad($ad->ad_id)));
?>
 

<?php 
echo awpcp_get_blog_name();
?>
 
<?php 
echo home_url();
?>
 
Ejemplo n.º 3
0
function awpcp_listing_updated_user_message($listing, $messages)
{
    $admin_email = awpcp_admin_recipient_email_address();
    $payments_api = awpcp_payments_api();
    $show_total_amount = $payments_api->payments_enabled();
    $show_total_credits = $payments_api->credit_system_enabled();
    $currency_code = awpcp_get_currency_code();
    $blog_name = awpcp_get_blog_name();
    if (!is_null($transaction)) {
        $transaction_totals = $transaction->get_totals();
        $total_amount = $transaction_totals['money'];
        $total_credits = $transaction_totals['credits'];
    } else {
        $total_amount = 0;
        $total_credits = 0;
    }
    if (get_awpcp_option('requireuserregistration')) {
        $include_listing_access_key = false;
        $include_edit_listing_url = true;
    } else {
        $include_listing_access_key = get_awpcp_option('include-ad-access-key');
        $include_edit_listing_url = false;
    }
    $params = compact('ad', 'admin_email', 'transaction', 'currency_code', 'show_total_amount', 'show_total_credits', 'include_listing_access_key', 'include_edit_listing_url', 'total_amount', 'total_credits', 'message', 'blog_name');
    $email = new AWPCP_Email();
    $email->to[] = "{$ad->ad_contact_name} <{$ad->ad_contact_email}>";
    $email->subject = get_awpcp_option('listingaddedsubject');
    $email->prepare(AWPCP_DIR . '/frontend/templates/email-place-ad-success-user.tpl.php', $params);
    return $email;
}
Ejemplo n.º 4
0
$awpcp_plugin_path = AWPCP_DIR;
$awpcp_plugin_url = AWPCP_URL;
$imagespath = $awpcp_plugin_path . '/resources/images';
$awpcp_imagesurl = $awpcp_plugin_url . '/resources/images';
// common
require_once AWPCP_DIR . "/debug.php";
require_once AWPCP_DIR . "/functions.php";
require_once AWPCP_DIR . "/includes/functions/categories.php";
require_once AWPCP_DIR . "/includes/functions/deprecated.php";
require_once AWPCP_DIR . "/includes/functions/format.php";
require_once AWPCP_DIR . "/includes/functions/hooks.php";
require_once AWPCP_DIR . "/includes/functions/listings.php";
require_once AWPCP_DIR . "/includes/functions/notifications.php";
require_once AWPCP_DIR . "/includes/functions/payments.php";
require_once AWPCP_DIR . "/includes/functions/routes.php";
$nameofsite = awpcp_get_blog_name();
// cron
require_once AWPCP_DIR . "/cron.php";
// other resources
require_once AWPCP_DIR . "/dcfunctions.php";
require_once AWPCP_DIR . "/functions_awpcp.php";
require_once AWPCP_DIR . "/upload_awpcp.php";
// API & Classes
require_once AWPCP_DIR . "/includes/exceptions.php";
require_once AWPCP_DIR . "/includes/compatibility/compatibility.php";
require_once AWPCP_DIR . "/includes/compatibility/class-add-meta-tags-plugin-integration.php";
require_once AWPCP_DIR . "/includes/compatibility/class-all-in-one-seo-pack-plugin-integration.php";
require_once AWPCP_DIR . "/includes/compatibility/class-facebook-plugin-integration.php";
require_once AWPCP_DIR . '/includes/compatibility/class-facebook-all-plugin-integration.php';
require_once AWPCP_DIR . "/includes/compatibility/class-yoast-wordpress-seo-plugin-integration.php";
require_once AWPCP_DIR . "/includes/compatibility/class-woocommerce-plugin-integration.php";
	<input type="hidden" value="1" name="no_note" />
    <input type="hidden" value="1" name="upload">

	<?php 
if ($is_test_mode_enabled) {
    ?>
	<input type="hidden" name="test_ipn" value="1" />
	<?php 
}
?>

    <?php 
$text = _x('Return to %s', 'paypal-checkout-form', 'AWPCP');
?>
    <input type="hidden" value="<?php 
echo esc_attr(sprintf($text, awpcp_get_blog_name($decode_html = false)));
?>
" name="cbt">

	<?php 
$alt = __("Make payments with PayPal - it's fast, free and secure!", "AWPCP");
?>
	<input type="image" src="<?php 
echo esc_attr($awpcp_imagesurl);
?>
/payments-paypal-checkout-express.gif" border="0" name="submit" alt="<?php 
echo esc_attr($alt);
?>
" />

	<?php 
Ejemplo n.º 6
0
/**
 * Return the name and email address of the account that should receive notifications intented for
 * administrator users.
 *
 * @since	3.0
 * @return	string	name <email@address>
 */
function awpcp_admin_email_to()
{
    return awpcp_format_email_address(awpcp_admin_recipient_email_address(), awpcp_get_blog_name());
}