WordPress.org

Forums

WP Email Capture
Some small fixes for WP Email Capture 2.10 (4 posts)

  1. Ov3rfly
    Member
    Posted 10 months ago #

    Here some small fixes for WP Email Capture 2.10, old code is commented, new code below old code.

    display.php, 18:

    //echo "<div class='wp-email-capture-error'>".__('Error:','WPEC'). $error ."</div>";
    echo "<div class='wp-email-capture-error'>".__('Error:','WPEC'). " " . $error ."</div>";

    display.php, 57:

    //$display .= "<div class='wp-email-capture-error'>Error: ". $error ."</div>\n";
    $display .= "<div class='wp-email-capture-error'>".__('Error:','WPEC'). " " . $error ."</div>\n";

    process.php, 179:

    if ($message == "\n\n")
    {
    	//$message .= __("Thank you for signing up for our newsletter, please click the link below to confirm your subscription","WPEC");
    	$message .= __("Thank you for signing up for our newsletter, please click the link below to confirm your subscription","WPEC") . "\n\n";
    }
    
    //$message.= " ". $siteurl ."?wp_email_confirm=1&wp_email_capture_passkey=$confirm_code";
    $message.= $siteurl ."?wp_email_confirm=1&wp_email_capture_passkey=$confirm_code";

    And as a lot of german strings were missing or outdated in the translation, here an updated german language file:

    http://wikisend.com/download/260104/wp-email-capture-2.10-languages-de_DE.zip
    (link valid 90 days from today)

    Thanks for the great plugin.

    https://wordpress.org/plugins/wp-email-capture/

  2. Ov3rfly
    Member
    Posted 10 months ago #

    One more, with this one the WP Email Capture dashboard widget can be used also by non-admins.

    dashboard.php, 38:

    //if (current_user_can('administrator')){
    if (current_user_can( apply_filters( 'wp_email_capture_dashboard_capability', 'administrator' ) )){

    With the patch in place the dashboard widget capability can be configured e.g. via functions.php of a theme, example for Editor role:

    function ov3rfly_wp_email_capture_dashboard_capability( $capability ) {
    	$capability = 'edit_pages';
    	return $capability;
    }
    add_filter( 'wp_email_capture_dashboard_capability', 'ov3rfly_wp_email_capture_dashboard_capability' );
  3. Rhys Wynne
    Member
    Plugin Author

    Posted 6 months ago #

    These have (finally!) been added to WP Email Capture :)

  4. Ov3rfly
    Member
    Posted 6 months ago #

    Thanks.

    The fix in display.php, 57 went wrong though, an additional space char was added instead of the __() translation call.

Reply

You must log in to post.

About this Plugin

  • WP Email Capture
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.