WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Absolute Privacy] Email variables (6 posts)

  1. muckngrind5
    Member
    Posted 4 years ago #

    Does anyone know how to use variables in the absolute privacy custom emails? The new version seems to have deleted the old email format and I can't figure out how to set up emails with variables. Any help would be greatly appreciated.

    Thanks,
    Derek

    http://wordpress.org/extend/plugins/absolute-privacy/

  2. muckngrind5
    Member
    Posted 4 years ago #

    I looked through the code and found the variables:

    '%username%' => $user->user_login,
    '%name%' => $user->display_name,
    '%blogname%' =>  get_bloginfo('name'),
    '%blogurl%' => get_bloginfo('url'),
    '%approval_url%' => get_bloginfo('url') . '/wp-admin/options-general.php?page=' . dirname(plugin_basename(__FILE__)) . '/absolute_privacy.php&mode=moderate&id='.$user_id

    As an example here is the old approval notification:

    Your registration with %blogname% has been approved!
    
    Your may login using the following information:
    
    Username: %username%
    Password: (hidden)
    URL: %blogurl%/wp-login.php'
  3. johnkolbert
    Member
    Posted 4 years ago #

    @muckngrind5, ah, an oversite on my part. I should have included that in the documentation. I'll add that in the next version.

    Glad it looks like you found what you needed.

  4. lozanno
    Member
    Posted 4 years ago #

    Hi kolbert!... Is there a variable to include the user email into the "Admin Notification Message" ???

    Thanks, great job!

  5. johnkolbert
    Member
    Posted 4 years ago #

    Currently not, but I'll add it in for an upcoming version. In the mean time, you can add it in yourself if you are comfortable editing PHP. Just open absolute_privacy.php and replace lines 515-520 (the $replace array variable) with this:

    $replace = array('%username%' => $user->user_login,
    				 '%name%' => $user->display_name,
    				 '%blogname%' =>  get_bloginfo('name'),
    				 '%blogurl%' => get_bloginfo('url'),
    				 '%approval_url%' => get_bloginfo('url') . '/wp-admin/options-general.php?page=' . dirname(plugin_basename(__FILE__)) . '/absolute_privacy.php&mode=moderate&id='.$user_id,
    				 '%user_email%' => $user->user_email
    				 );
  6. binaryeric
    Member
    Posted 4 years ago #

    I have been using the default "%name%" since I enabled the plug-in, but the emails all are displaying the "username" in this location instead.

    Has anyone else seen this?

Topic Closed

This topic has been closed to new replies.

About this Topic