Plugin Directory

Changeset 3206531


Ignore:
Timestamp:
12/11/2024 06:04:22 PM (12 months ago)
Author:
shanebp
Message:

tagging 1.6

Location:
bp-email-assign-templates/tags/1.6
Files:
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • bp-email-assign-templates/tags/1.6/languages/bp-email-templates.pot

    r1374209 r3206531  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: bp-email-templates\n"
     3"Project-Id-Version: bp-email-assign-templates\n"
    44"POT-Creation-Date: 2016-03-17 13:24-0800\n"
    55"PO-Revision-Date: 2016-03-17 13:25-0800\n"
  • bp-email-assign-templates/tags/1.6/loader.php

    r2726282 r3206531  
    33 * Plugin Name: BP Email Assign Templates
    44 * Description: Assign Templates to BuddyPress Emails
    5  * Version: 1.5
     5 * Version: 1.6
    66 * Author: PhiloPress
    77 * Author URI: https://www.philopress.com/
    8  * Text Domain: bp-email-templates
     8 * Text Domain: bp-email-assign-templates
    99 * Domain Path: /languages
    1010 * License: GPLv2 or later
     
    1919    if( $vcheck ) {
    2020
    21         load_plugin_textdomain( 'bp-email-templates', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
     21        load_plugin_textdomain( 'bp-email-assign-templates', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
    2222
    2323        if ( is_admin() || is_network_admin() ) {
     
    9494function pp_etemplates_bp_check() {
    9595
    96     if ( !class_exists('BuddyPress') )
     96    if ( ! class_exists('BuddyPress') ) {
    9797        add_action( 'admin_notices', 'pp_etemplates_install_buddypress_notice' );
     98    }
    9899
    99100}
  • bp-email-assign-templates/tags/1.6/pp-email-templates-admin-buddyboss.php

    r2726282 r3206531  
    7777                <input type="hidden" id="eto-editor" name="eto-editor" value="1" />
    7878                <input type="hidden" name="eto-option-name" id="eto-option-name" value="<?php echo $eto->option_name; ?>"/>
    79                 <input id="eto-submit" name="eto-submit" type="button" class="button button-primary" onclick="validateEtoForm()" value="<?php _e('Update Template Option', 'bp-email-templates'); ?>"  />
     79                <input id="eto-submit" name="eto-submit" type="button" class="button button-primary" onclick="validateEtoForm()" value="<?php _e('Update Template Option', 'bp-email-assign-templates'); ?>"  />
    8080                </form>
    8181            <?php
    8282            }
    8383            else
    84                 echo '<br/><div class="error_div"><strong>' . __('The Template Option was not found.', 'bp-email-templates' ) . '</strong></div>';
     84                echo '<br/><div class="error_div"><strong>' . __('The Template Option was not found.', 'bp-email-assign-templates' ) . '</strong></div>';
    8585
    8686        echo '</div>';
     
    115115
    116116                if ( $update_option )
    117                     echo '<br/><div class="entry-content"><strong>' . __('Template Option was Updated', 'bp-email-templates' ) . '</strong></div><br/>';
     117                    echo '<br/><div class="entry-content"><strong>' . __('Template Option was Updated', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    118118                else
    119                     echo '<br/><div class="error_div"><strong>' . __('There was a problem Updating that Template Option.', 'bp-email-templates' ) . '</strong></div><br/>';
     119                    echo '<br/><div class="error_div"><strong>' . __('There was a problem Updating that Template Option.', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    120120
    121121            }
     
    124124        }
    125125        else
    126             echo '<br/><div class="error_div"><strong>' . __('Please fill out both fields.', 'bp-email-templates' ) . '</strong></div><br/>';
     126            echo '<br/><div class="error_div"><strong>' . __('Please fill out both fields.', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    127127
    128128    }
     
    152152            <tr>
    153153                <td>Option File: <div id='eto-file-name-error' class='error_div'></div></td>
    154                 <td><input type="text" name="eto-file-name" id="eto-file-name" maxlength="50" size="50" value="" /><br/><em><?php _e('The file must already exist in the root of your active theme directory.', 'bp-email-templates'); ?></em></td>
     154                <td><input type="text" name="eto-file-name" id="eto-file-name" maxlength="50" size="50" value="" /><br/><em><?php _e('The file must already exist in the root of your active theme directory.', 'bp-email-assign-templates'); ?></em></td>
    155155            </tr>
    156156
    157157        </table>
    158158        <input type="hidden" id="eto-creator" name="eto-creator" value="1" />
    159         <input id="eto-submit" name="eto-submit" type="button" class="button button-primary" onclick="validateEtoForm()" value="<?php _e('Create Template Option', 'bp-email-templates'); ?>"  />
     159        <input id="eto-submit" name="eto-submit" type="button" class="button button-primary" onclick="validateEtoForm()" value="<?php _e('Create Template Option', 'bp-email-assign-templates'); ?>"  />
    160160
    161161    </form>
     
    168168
    169169     $content =
    170         __( 'On this screen, you can create, edit or delete an email template option.', 'bp-email-templates' ) .
    171         '<p>' . __( 'The Option Name can be anything but should be unique.', 'bp-email-templates' ) . '</p>';
     170        __( 'On this screen, you can create, edit or delete an email template option.', 'bp-email-assign-templates' ) .
     171        '<p>' . __( 'The Option Name can be anything but should be unique.', 'bp-email-assign-templates' ) . '</p>';
    172172
    173173
    174174    $content .=
    175         '<p>' . __( 'The file name needs to end with ".php" and must be a file that exists in your active theme.', 'bp-email-templates' ) . '</p>' .
    176         '<p>' . __( 'If you want email templates to live in a separate directory in your theme, then include the path as part of the file name. For example "/bp-email-templates/bp-email-for-friends.php"', 'bp-email-templates' ) . '</p>';
     175        '<p>' . __( 'The file name needs to end with ".php" and must be a file that exists in your active theme.', 'bp-email-assign-templates' ) . '</p>' .
     176        '<p>' . __( 'If you want email templates to live in a separate directory in your theme, then include the path as part of the file name. For example "/bp-email-assign-templates/bp-email-for-friends.php"', 'bp-email-assign-templates' ) . '</p>';
    177177
    178178
    179179    $content .=
    180         '<p>' . __( 'BuddyBoss includes a <em>single</em> default email template.', 'bp-email-templates' ) .
     180        '<p>' . __( 'BuddyBoss includes a <em>single</em> default email template.', 'bp-email-assign-templates' ) .
    181181        '<br>You will find it here: &nbsp;<em>...plugins/buddyboss-platform/bp-templates/bp-nouveau/buddypress/assets/emails/single-bp-email.php</em>
    182182        '  . '</p>' .
    183         '<p>' . __( 'But what if you want multiple and assignable templates? Or have a template that does not use the customizer settings?', 'bp-email-templates' ) . '</p>' .
    184         '<p>' . __( 'If so, create a copy of the default email template, rename it and adjust as necessary. You can change the layout, include images, remove the customizer setting calls, etc.', 'bp-email-templates' ) . '</p>' .
    185         '<p>' . __( '[ The customizer settings <em>will apply to all templates</em> that call the customizer settings. ]', 'bp-email-templates' ) . '</p>' .
    186         '<p>' . __( 'Then upload the new template to your active theme directory and create an option here.', 'bp-email-templates' ) . '</p>' .
    187         '<p>' . __( 'Your new option will be available for selection on the Email create and edit screens in the "Email Template" area.', 'bp-email-templates' ) . '</p>';
     183        '<p>' . __( 'But what if you want multiple and assignable templates? Or have a template that does not use the customizer settings?', 'bp-email-assign-templates' ) . '</p>' .
     184        '<p>' . __( 'If so, create a copy of the default email template, rename it and adjust as necessary. You can change the layout, include images, remove the customizer setting calls, etc.', 'bp-email-assign-templates' ) . '</p>' .
     185        '<p>' . __( '[ The customizer settings <em>will apply to all templates</em> that call the customizer settings. ]', 'bp-email-assign-templates' ) . '</p>' .
     186        '<p>' . __( 'Then upload the new template to your active theme directory and create an option here.', 'bp-email-assign-templates' ) . '</p>' .
     187        '<p>' . __( 'Your new option will be available for selection on the Email create and edit screens in the "Email Template" area.', 'bp-email-assign-templates' ) . '</p>';
    188188
    189189        return $content;
     
    224224                if ( $new_option ) {
    225225                    update_option( 'bp_email_templates_count', $count, false );
    226                     echo '<br/><div class="entry-content"><strong>' . __('Template Option was created.', 'bp-email-templates' ) . '</strong></div><br/>';
     226                    echo '<br/><div class="entry-content"><strong>' . __('Template Option was created.', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    227227                }
    228228                else
    229                     echo '<br/><div class="error_div"><strong>' . __('There was a problem creating that Template Option.', 'bp-email-templates' ) . '</strong></div><br/>';
     229                    echo '<br/><div class="error_div"><strong>' . __('There was a problem creating that Template Option.', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    230230
    231231            }
     
    235235        }
    236236        else
    237             echo '<br/><div class="error_div"><strong>' . __('Please fill out both fields.', 'bp-email-templates' ) . '</strong></div>';
     237            echo '<br/><div class="error_div"><strong>' . __('Please fill out both fields.', 'bp-email-assign-templates' ) . '</strong></div>';
    238238    }
    239239}
     
    247247    if ( '.php' != $file_name_end ) {
    248248
    249         echo '<br/><div class="error_div"><strong>' . __('The file name must end with .php', 'bp-email-templates' ) . '</strong></div>';
     249        echo '<br/><div class="error_div"><strong>' . __('The file name must end with .php', 'bp-email-assign-templates' ) . '</strong></div>';
    250250
    251251        return false;
     
    257257    if ( '' == $template_exists ) {
    258258
    259         echo '<br/><div class="error_div"><strong>' . sprintf( __('The file %s was not found in the root of your active theme.', 'bp-email-templates' ), $filename ) . '</strong></div>';
     259        echo '<br/><div class="error_div"><strong>' . sprintf( __('The file %s was not found in the root of your active theme.', 'bp-email-assign-templates' ), $filename ) . '</strong></div>';
    260260
    261261        return false;
     
    306306
    307307        <form id="eto-filter" method="post">
    308             <input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" />
     308            <input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ) ?>" />
    309309            <?php $pp_etemplates_list_table->display();  ?>
    310310        </form>
     
    380380
    381381            if ( 'delete-single'===$this->current_action() ) {
    382                 $nonce = $_REQUEST['_wpnonce'];
    383                 if (! wp_verify_nonce($nonce, 'eto-nonce') ) die('Security check');
    384 
     382                if (! wp_verify_nonce($_REQUEST['_wpnonce'], 'eto-nonce') ) die('Security check');
    385383                $this->delete_eto( $_GET['gid'] );
    386384            }
     
    445443                                        echo "<br /><div class='row-actions'><span class='edit'>";
    446444                                        $edit_nonce= wp_create_nonce('eto-edit-nonce');
    447                                         echo sprintf('<a href="?page=email-templates&action=edit-single&gid=%s&_wpnonce=%s" ">' . __('Edit', 'bp-email-templates') . '</a>',$rec->option_id,$edit_nonce);
     445                                        echo sprintf('<a href="?page=email-templates&action=edit-single&gid=%s&_wpnonce=%s" ">' . __('Edit', 'bp-email-assign-templates') . '</a>',$rec->option_id,$edit_nonce);
    448446                                        echo "</span> | <span class='trash'>";
    449447                                        $nonce= wp_create_nonce('eto-nonce');
    450                                         echo sprintf('<a href="?page=email-templates&action=%s&gid=%s&_wpnonce=%s" onclick="return confirm(\'Are you sure you want to Delete this Template Option?\');">' . __('Delete', 'bp-email-templates') . '</a>','delete-single',$rec->option_id,$nonce);
     448                                        echo sprintf('<a href="?page=email-templates&action=%s&gid=%s&_wpnonce=%s" onclick="return confirm(\'Are you sure you want to Delete this Template Option?\');">' . __('Delete', 'bp-email-assign-templates') . '</a>','delete-single',$rec->option_id,$nonce);
    451449                                        echo "</span></div></td>";
    452450                                    break;
     
    516514
    517515    $columns['title']       = __( 'Title', 'buddypress' );
    518     $columns['etemplate']   = __( 'Template', 'bp-email-templates' );
    519     $columns['date']        = __( 'Date', 'bp-email-templates' );
     516    $columns['etemplate']   = __( 'Template', 'bp-email-assign-templates' );
     517    $columns['date']        = __( 'Date', 'bp-email-assign-templates' );
    520518
    521519    return $columns;
  • bp-email-assign-templates/tags/1.6/pp-email-templates-admin-buddypress.php

    r2726282 r3206531  
    3030
    3131     $content =
    32         '<p>' . __( 'On this screen, you can create, edit or delete an email template option.', 'bp-email-templates' ) . '</p>' .
    33         '<p>' . __( 'The Option Name can be anything but should be unique.', 'bp-email-templates' ) . '</p>';
     32        '<p>' . __( 'On this screen, you can create, edit or delete an email template option.', 'bp-email-assign-templates' ) . '</p>' .
     33        '<p>' . __( 'The Option Name can be anything but should be unique.', 'bp-email-assign-templates' ) . '</p>';
    3434    $screen->add_help_tab( array(
    3535        'id'        => 'name_tab',
    36         'title'     => __('Option Name', 'bp-email-templates'),
     36        'title'     => __('Option Name', 'bp-email-assign-templates'),
    3737        'content'   => $content,
    3838    ) );
    3939
    4040    $content =
    41         '<p>' . __( 'The file name needs to end with ".php" and must be a file that exists in your active theme.', 'bp-email-templates' ) . '</p>' .
    42         '<p>' . __( 'If you want email templates to live in a separate directory in your theme, then include the path as part of the file name. For example "/bp-email-templates/bp-email-for-friends.php"', 'bp-email-templates' ) . '</p>';
     41        '<p>' . __( 'The file name needs to end with ".php" and must be a file that exists in your active theme.', 'bp-email-assign-templates' ) . '</p>' .
     42        '<p>' . __( 'If you want email templates to live in a separate directory in your theme, then include the path as part of the file name. For example "/bp-email-assign-templates/bp-email-for-friends.php"', 'bp-email-assign-templates' ) . '</p>';
    4343    $screen->add_help_tab( array(
    4444        'id'        => 'file_tab',
    45         'title'     => __('Option File', 'bp-email-templates'),
     45        'title'     => __('Option File', 'bp-email-assign-templates'),
    4646        'content'   => $content,
    4747    ) );
    4848
    4949    $content =
    50         '<p>' . __( 'BuddyPress includes a <em>single</em> default email template.', 'bp-email-templates' ) .
    51         ' <a href="https://codex.buddypress.org/emails/#customize-email-template" target="_blank">'. __('More Info', 'bp-email-templates'). '</a>' . '</p>' .
    52         '<p>' . __( 'But what if you want multiple and assignable templates? Or have a template that does not use the customizer settings?', 'bp-email-templates' ) . '</p>' .
    53         '<p>' . __( 'If so, create a copy of the default email template, rename it and adjust as necessary. You can change the layout, include images, remove the customizer setting calls, etc.', 'bp-email-templates' ) . '</p>' .
    54         '<p>' . __( '[ The customizer settings <em>will apply to all templates</em> that call the customizer settings. ]', 'bp-email-templates' ) . '</p>' .
    55         '<p>' . __( 'Then upload the new template to your active theme directory and create an option here.', 'bp-email-templates' ) . '</p>' .
    56         '<p>' . __( 'Your new option will be available for selection on the Email create and edit screens in the lower right area.', 'bp-email-templates' ) . '</p>';
     50        '<p>' . __( 'BuddyPress includes a <em>single</em> default email template.', 'bp-email-assign-templates' ) .
     51        ' <a href="https://codex.buddypress.org/emails/#customize-email-template" target="_blank">'. __('More Info', 'bp-email-assign-templates'). '</a>' . '</p>' .
     52        '<p>' . __( 'But what if you want multiple and assignable templates? Or have a template that does not use the customizer settings?', 'bp-email-assign-templates' ) . '</p>' .
     53        '<p>' . __( 'If so, create a copy of the default email template, rename it and adjust as necessary. You can change the layout, include images, remove the customizer setting calls, etc.', 'bp-email-assign-templates' ) . '</p>' .
     54        '<p>' . __( '[ The customizer settings <em>will apply to all templates</em> that call the customizer settings. ]', 'bp-email-assign-templates' ) . '</p>' .
     55        '<p>' . __( 'Then upload the new template to your active theme directory and create an option here.', 'bp-email-assign-templates' ) . '</p>' .
     56        '<p>' . __( 'Your new option will be available for selection on the Email create and edit screens in the lower right area.', 'bp-email-assign-templates' ) . '</p>';
    5757    $screen->add_help_tab( array(
    5858        'id'        => 'template_tab',
    59         'title'     => __('Create a Template', 'bp-email-templates'),
     59        'title'     => __('Create a Template', 'bp-email-assign-templates'),
    6060        'content'   => $content,
    6161    ) );
     
    100100                <input type="hidden" id="eto-editor" name="eto-editor" value="1" />
    101101                <input type="hidden" name="eto-option-name" id="eto-option-name" value="<?php echo $eto->option_name; ?>"/>
    102                 <input id="eto-submit" name="eto-submit" type="button" class="button button-primary" onclick="validateEtoForm()" value="<?php _e('Update Template Option', 'bp-email-templates'); ?>"  />
     102                <input id="eto-submit" name="eto-submit" type="button" class="button button-primary" onclick="validateEtoForm()" value="<?php _e('Update Template Option', 'bp-email-assign-templates'); ?>"  />
    103103                </form>
    104104            <?php
    105105            }
    106106            else
    107                 echo '<br/><div class="error_div"><strong>' . __('The Template Option was not found.', 'bp-email-templates' ) . '</strong></div>';
     107                echo '<br/><div class="error_div"><strong>' . __('The Template Option was not found.', 'bp-email-assign-templates' ) . '</strong></div>';
    108108
    109109        echo '</div>';
     
    138138
    139139                if ( $update_option )
    140                     echo '<br/><div class="entry-content"><strong>' . __('Template Option was Updated', 'bp-email-templates' ) . '</strong></div><br/>';
     140                    echo '<br/><div class="entry-content"><strong>' . __('Template Option was Updated', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    141141                else
    142                     echo '<br/><div class="error_div"><strong>' . __('There was a problem Updating that Template Option.', 'bp-email-templates' ) . '</strong></div><br/>';
     142                    echo '<br/><div class="error_div"><strong>' . __('There was a problem Updating that Template Option.', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    143143
    144144            }
     
    147147        }
    148148        else
    149             echo '<br/><div class="error_div"><strong>' . __('Please fill out both fields.', 'bp-email-templates' ) . '</strong></div><br/>';
     149            echo '<br/><div class="error_div"><strong>' . __('Please fill out both fields.', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    150150
    151151    }
     
    173173            <tr>
    174174                <td>Option File: <div id='eto-file-name-error' class='error_div'></div></td>
    175                 <td><input type="text" name="eto-file-name" id="eto-file-name" maxlength="50" size="50" value="" /><br/><em><?php _e('The file must already exist in your active theme directory.', 'bp-email-templates'); ?></em></td>
     175                <td><input type="text" name="eto-file-name" id="eto-file-name" maxlength="50" size="50" value="" /><br/><em><?php _e('The file must already exist in your active theme directory.', 'bp-email-assign-templates'); ?></em></td>
    176176            </tr>
    177177
    178178        </table>
    179179        <input type="hidden" id="eto-creator" name="eto-creator" value="1" />
    180         <input id="eto-submit" name="eto-submit" type="button" class="button button-primary" onclick="validateEtoForm()" value="<?php _e('Create Template Option', 'bp-email-templates'); ?>"  />
     180        <input id="eto-submit" name="eto-submit" type="button" class="button button-primary" onclick="validateEtoForm()" value="<?php _e('Create Template Option', 'bp-email-assign-templates'); ?>"  />
    181181
    182182    </form>
     
    218218                if ( $new_option ) {
    219219                    update_option( 'bp_email_templates_count', $count, false );
    220                     echo '<br/><div class="entry-content"><strong>' . __('Template Option was created.', 'bp-email-templates' ) . '</strong></div><br/>';
     220                    echo '<br/><div class="entry-content"><strong>' . __('Template Option was created.', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    221221                }
    222222                else
    223                     echo '<br/><div class="error_div"><strong>' . __('There was a problem creating that Template Option.', 'bp-email-templates' ) . '</strong></div><br/>';
     223                    echo '<br/><div class="error_div"><strong>' . __('There was a problem creating that Template Option.', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    224224
    225225            }
     
    229229        }
    230230        else
    231             echo '<br/><div class="error_div"><strong>' . __('Please fill out both fields.', 'bp-email-templates' ) . '</strong></div>';
     231            echo '<br/><div class="error_div"><strong>' . __('Please fill out both fields.', 'bp-email-assign-templates' ) . '</strong></div>';
    232232    }
    233233}
     
    241241    if ( '.php' != $file_name_end ) {
    242242
    243         echo '<br/><div class="error_div"><strong>' . __('The file name must end with .php', 'bp-email-templates' ) . '</strong></div>';
     243        echo '<br/><div class="error_div"><strong>' . __('The file name must end with .php', 'bp-email-assign-templates' ) . '</strong></div>';
    244244
    245245        return false;
     
    251251    if ( '' == $template_exists ) {
    252252
    253         echo '<br/><div class="error_div"><strong>' . sprintf( __('The file %s was not found in your active theme.', 'bp-email-templates' ), $filename ) . '</strong></div>';
     253        echo '<br/><div class="error_div"><strong>' . sprintf( __('The file %s was not found in your active theme.', 'bp-email-assign-templates' ), $filename ) . '</strong></div>';
    254254
    255255        return false;
     
    264264    <div class="wrap">
    265265        <div id="icon-tools" class="icon32"><br /></div>
    266         <h2><?php _e( 'BuddyPress Email Assign Templates', 'bp-email-templates' )?></h2>
     266        <h2><?php _e( 'BuddyPress Email Assign Templates', 'bp-email-assign-templates' )?></h2>
    267267
    268268<?php
     
    296296
    297297        <form id="eto-filter" method="post">
    298             <input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" />
     298            <input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ) ?>" />
    299299            <?php $pp_etemplates_list_table->display();  ?>
    300300        </form>
     
    370370
    371371            if ( 'delete-single'===$this->current_action() ) {
    372                 $nonce = $_REQUEST['_wpnonce'];
    373                 if (! wp_verify_nonce($nonce, 'eto-nonce') ) die('Security check');
    374 
     372                if (! wp_verify_nonce($_REQUEST['_wpnonce'], 'eto-nonce') ) die('Security check');
    375373                $this->delete_eto( $_GET['gid'] );
    376374            }
     
    435433                                        echo "<br /><div class='row-actions'><span class='edit'>";
    436434                                        $edit_nonce= wp_create_nonce('eto-edit-nonce');
    437                                         echo sprintf('<a href="?post_type=bp-email&page=%s&action=%s&gid=%s&_wpnonce=%s" ">' . __('Edit', 'bp-email-templates') . '</a>',$_REQUEST['page'],'edit-single',$rec->option_id,$edit_nonce);
     435                                        echo sprintf('<a href="?post_type=bp-email&page=%s&action=%s&gid=%s&_wpnonce=%s" ">' . __('Edit', 'bp-email-assign-templates') . '</a>',esc_attr( $_REQUEST['page'] ),'edit-single',$rec->option_id,$edit_nonce);
    438436                                        echo "</span> | <span class='trash'>";
    439437                                        $nonce= wp_create_nonce('eto-nonce');
    440                                         echo sprintf('<a href="?post_type=bp-email&page=%s&action=%s&gid=%s&_wpnonce=%s" onclick="return confirm(\'Are you sure you want to Delete this Template Option?\');">' . __('Delete', 'bp-email-templates') . '</a>',$_REQUEST['page'],'delete-single',$rec->option_id,$nonce);
     438                                        echo sprintf('<a href="?post_type=bp-email&page=%s&action=%s&gid=%s&_wpnonce=%s" onclick="return confirm(\'Are you sure you want to Delete this Template Option?\');">' . __('Delete', 'bp-email-assign-templates') . '</a>',esc_attr( $_REQUEST['page'] ),'delete-single',$rec->option_id,$nonce);
    441439                                        echo "</span></div></td>";
    442440                                    break;
     
    506504
    507505    $columns['title']       = __( 'Title', 'buddypress' );
    508     $columns['etemplate']   = __( 'Template', 'bp-email-templates' );
    509     $columns['date']        = __( 'Date', 'bp-email-templates' );
     506    $columns['etemplate']   = __( 'Template', 'bp-email-assign-templates' );
     507    $columns['date']        = __( 'Date', 'bp-email-assign-templates' );
    510508
    511509    return $columns;
  • bp-email-assign-templates/tags/1.6/pp-email-templates-admin-metabox.php

    r2726282 r3206531  
    77function pp_etemplates_custom_metabox(){
    88
    9     add_meta_box( 'bp-etemplate', __( 'Email Template', 'bp-email-templates' ), 'pp_etemplates_template_metabox', null, 'side', 'low' );
     9    add_meta_box( 'bp-etemplate', __( 'Email Template', 'bp-email-assign-templates' ), 'pp_etemplates_template_metabox', null, 'side', 'low' );
    1010}
    1111add_action( 'add_meta_boxes_' . bp_get_email_post_type(), 'pp_etemplates_custom_metabox' );
  • bp-email-assign-templates/tags/1.6/pp-email-templates-admin.php

    r2648754 r3206531  
    3030
    3131     $content =
    32         '<p>' . __( 'On this screen, you can create, edit or delete an email template option.', 'bp-email-templates' ) . '</p>' .
    33         '<p>' . __( 'The Option Name can be anything but should be unique.', 'bp-email-templates' ) . '</p>';
     32        '<p>' . __( 'On this screen, you can create, edit or delete an email template option.', 'bp-email-assign-templates' ) . '</p>' .
     33        '<p>' . __( 'The Option Name can be anything but should be unique.', 'bp-email-assign-templates' ) . '</p>';
    3434    $screen->add_help_tab( array(
    3535        'id'        => 'name_tab',
    36         'title'     => __('Option Name', 'bp-email-templates'),
     36        'title'     => __('Option Name', 'bp-email-assign-templates'),
    3737        'content'   => $content,
    3838    ) );
    3939
    4040    $content =
    41         '<p>' . __( 'The file name needs to end with ".php" and must be a file that exists in your active theme.', 'bp-email-templates' ) . '</p>' .
    42         '<p>' . __( 'If you want email templates to live in a separate directory in your theme, then include the path as part of the file name. For example "/bp-email-templates/bp-email-for-friends.php"', 'bp-email-templates' ) . '</p>';
     41        '<p>' . __( 'The file name needs to end with ".php" and must be a file that exists in your active theme.', 'bp-email-assign-templates' ) . '</p>' .
     42        '<p>' . __( 'If you want email templates to live in a separate directory in your theme, then include the path as part of the file name. For example "/bp-email-assign-templates/bp-email-for-friends.php"', 'bp-email-assign-templates' ) . '</p>';
    4343    $screen->add_help_tab( array(
    4444        'id'        => 'file_tab',
    45         'title'     => __('Option File', 'bp-email-templates'),
     45        'title'     => __('Option File', 'bp-email-assign-templates'),
    4646        'content'   => $content,
    4747    ) );
    4848
    4949    $content =
    50         '<p>' . __( 'BuddyPress includes a <em>single</em> default email template.', 'bp-email-templates' ) .
    51         ' <a href="https://codex.buddypress.org/emails/#customize-email-template" target="_blank">'. __('More Info', 'bp-email-templates'). '</a>' . '</p>' .
    52         '<p>' . __( 'But what if you want multiple and assignable templates? Or have a template that does not use the customizer settings?', 'bp-email-templates' ) . '</p>' .
    53         '<p>' . __( 'If so, create a copy of the default email template, rename it and adjust as necessary. You can change the layout, include images, remove the customizer setting calls, etc.', 'bp-email-templates' ) . '</p>' .
    54         '<p>' . __( '[ The customizer settings <em>will apply to all templates</em> that call the customizer settings. ]', 'bp-email-templates' ) . '</p>' .
    55         '<p>' . __( 'Then upload the new template to your active theme directory and create an option here.', 'bp-email-templates' ) . '</p>' .
    56         '<p>' . __( 'Your new option will be available for selection on the Email create and edit screens in the lower right area.', 'bp-email-templates' ) . '</p>';
     50        '<p>' . __( 'BuddyPress includes a <em>single</em> default email template.', 'bp-email-assign-templates' ) .
     51        ' <a href="https://codex.buddypress.org/emails/#customize-email-template" target="_blank">'. __('More Info', 'bp-email-assign-templates'). '</a>' . '</p>' .
     52        '<p>' . __( 'But what if you want multiple and assignable templates? Or have a template that does not use the customizer settings?', 'bp-email-assign-templates' ) . '</p>' .
     53        '<p>' . __( 'If so, create a copy of the default email template, rename it and adjust as necessary. You can change the layout, include images, remove the customizer setting calls, etc.', 'bp-email-assign-templates' ) . '</p>' .
     54        '<p>' . __( '[ The customizer settings <em>will apply to all templates</em> that call the customizer settings. ]', 'bp-email-assign-templates' ) . '</p>' .
     55        '<p>' . __( 'Then upload the new template to your active theme directory and create an option here.', 'bp-email-assign-templates' ) . '</p>' .
     56        '<p>' . __( 'Your new option will be available for selection on the Email create and edit screens in the lower right area.', 'bp-email-assign-templates' ) . '</p>';
    5757    $screen->add_help_tab( array(
    5858        'id'        => 'template_tab',
    59         'title'     => __('Create a Template', 'bp-email-templates'),
     59        'title'     => __('Create a Template', 'bp-email-assign-templates'),
    6060        'content'   => $content,
    6161    ) );
     
    100100                <input type="hidden" id="eto-editor" name="eto-editor" value="1" />
    101101                <input type="hidden" name="eto-option-name" id="eto-option-name" value="<?php echo $eto->option_name; ?>"/>
    102                 <input id="eto-submit" name="eto-submit" type="button" class="button button-primary" onclick="validateEtoForm()" value="<?php _e('Update Template Option', 'bp-email-templates'); ?>"  />
     102                <input id="eto-submit" name="eto-submit" type="button" class="button button-primary" onclick="validateEtoForm()" value="<?php _e('Update Template Option', 'bp-email-assign-templates'); ?>"  />
    103103                </form>
    104104            <?php
    105105            }
    106106            else
    107                 echo '<br/><div class="error_div"><strong>' . __('The Template Option was not found.', 'bp-email-templates' ) . '</strong></div>';
     107                echo '<br/><div class="error_div"><strong>' . __('The Template Option was not found.', 'bp-email-assign-templates' ) . '</strong></div>';
    108108
    109109        echo '</div>';
     
    138138
    139139                if ( $update_option )
    140                     echo '<br/><div class="entry-content"><strong>' . __('Template Option was Updated', 'bp-email-templates' ) . '</strong></div><br/>';
     140                    echo '<br/><div class="entry-content"><strong>' . __('Template Option was Updated', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    141141                else
    142                     echo '<br/><div class="error_div"><strong>' . __('There was a problem Updating that Template Option.', 'bp-email-templates' ) . '</strong></div><br/>';
     142                    echo '<br/><div class="error_div"><strong>' . __('There was a problem Updating that Template Option.', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    143143
    144144            }
     
    147147        }
    148148        else
    149             echo '<br/><div class="error_div"><strong>' . __('Please fill out both fields.', 'bp-email-templates' ) . '</strong></div><br/>';
     149            echo '<br/><div class="error_div"><strong>' . __('Please fill out both fields.', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    150150
    151151    }
     
    173173            <tr>
    174174                <td>Option File: <div id='eto-file-name-error' class='error_div'></div></td>
    175                 <td><input type="text" name="eto-file-name" id="eto-file-name" maxlength="50" size="50" value="" /><br/><em><?php _e('The file must already exist in your active theme directory.', 'bp-email-templates'); ?></em></td>
     175                <td><input type="text" name="eto-file-name" id="eto-file-name" maxlength="50" size="50" value="" /><br/><em><?php _e('The file must already exist in your active theme directory.', 'bp-email-assign-templates'); ?></em></td>
    176176            </tr>
    177177
    178178        </table>
    179179        <input type="hidden" id="eto-creator" name="eto-creator" value="1" />
    180         <input id="eto-submit" name="eto-submit" type="button" class="button button-primary" onclick="validateEtoForm()" value="<?php _e('Create Template Option', 'bp-email-templates'); ?>"  />
     180        <input id="eto-submit" name="eto-submit" type="button" class="button button-primary" onclick="validateEtoForm()" value="<?php _e('Create Template Option', 'bp-email-assign-templates'); ?>"  />
    181181
    182182    </form>
     
    218218                if ( $new_option ) {
    219219                    update_option( 'bp_email_templates_count', $count, false );
    220                     echo '<br/><div class="entry-content"><strong>' . __('Template Option was created.', 'bp-email-templates' ) . '</strong></div><br/>';
     220                    echo '<br/><div class="entry-content"><strong>' . __('Template Option was created.', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    221221                }
    222222                else
    223                     echo '<br/><div class="error_div"><strong>' . __('There was a problem creating that Template Option.', 'bp-email-templates' ) . '</strong></div><br/>';
     223                    echo '<br/><div class="error_div"><strong>' . __('There was a problem creating that Template Option.', 'bp-email-assign-templates' ) . '</strong></div><br/>';
    224224
    225225            }
     
    229229        }
    230230        else
    231             echo '<br/><div class="error_div"><strong>' . __('Please fill out both fields.', 'bp-email-templates' ) . '</strong></div>';
     231            echo '<br/><div class="error_div"><strong>' . __('Please fill out both fields.', 'bp-email-assign-templates' ) . '</strong></div>';
    232232    }
    233233}
     
    241241    if ( '.php' != $file_name_end ) {
    242242
    243         echo '<br/><div class="error_div"><strong>' . __('The file name must end with .php', 'bp-email-templates' ) . '</strong></div>';
     243        echo '<br/><div class="error_div"><strong>' . __('The file name must end with .php', 'bp-email-assign-templates' ) . '</strong></div>';
    244244
    245245        return false;
     
    251251    if ( '' == $template_exists ) {
    252252
    253         echo '<br/><div class="error_div"><strong>' . sprintf( __('The file %s was not found in your active theme.', 'bp-email-templates' ), $filename ) . '</strong></div>';
     253        echo '<br/><div class="error_div"><strong>' . sprintf( __('The file %s was not found in your active theme.', 'bp-email-assign-templates' ), $filename ) . '</strong></div>';
    254254
    255255        return false;
     
    264264    <div class="wrap">
    265265        <div id="icon-tools" class="icon32"><br /></div>
    266         <h2><?php _e( 'BuddyPress Email Assign Templates', 'bp-email-templates' )?></h2>
     266        <h2><?php _e( 'BuddyPress Email Assign Templates', 'bp-email-assign-templates' )?></h2>
    267267
    268268<?php
     
    296296
    297297        <form id="eto-filter" method="post">
    298             <input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" />
     298            <input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ) ?>" />
    299299            <?php $pp_etemplates_list_table->display();  ?>
    300300        </form>
     
    370370
    371371            if ( 'delete-single'===$this->current_action() ) {
    372                 $nonce = $_REQUEST['_wpnonce'];
    373                 if (! wp_verify_nonce($nonce, 'eto-nonce') ) die('Security check');
    374 
     372                if (! wp_verify_nonce($_REQUEST['_wpnonce'], 'eto-nonce') ) die('Security check');
    375373                $this->delete_eto( $_GET['gid'] );
    376374            }
     
    435433                                        echo "<br /><div class='row-actions'><span class='edit'>";
    436434                                        $edit_nonce= wp_create_nonce('eto-edit-nonce');
    437                                         echo sprintf('<a href="?post_type=bp-email&page=%s&action=%s&gid=%s&_wpnonce=%s" ">' . __('Edit', 'bp-email-templates') . '</a>',$_REQUEST['page'],'edit-single',$rec->option_id,$edit_nonce);
     435                                        echo sprintf('<a href="?post_type=bp-email&page=%s&action=%s&gid=%s&_wpnonce=%s" ">' . __('Edit', 'bp-email-assign-templates') . '</a>',esc_attr( $_REQUEST['page'] ),'edit-single',$rec->option_id,$edit_nonce);
    438436                                        echo "</span> | <span class='trash'>";
    439437                                        $nonce= wp_create_nonce('eto-nonce');
    440                                         echo sprintf('<a href="?post_type=bp-email&page=%s&action=%s&gid=%s&_wpnonce=%s" onclick="return confirm(\'Are you sure you want to Delete this Template Option?\');">' . __('Delete', 'bp-email-templates') . '</a>',$_REQUEST['page'],'delete-single',$rec->option_id,$nonce);
     438                                        echo sprintf('<a href="?post_type=bp-email&page=%s&action=%s&gid=%s&_wpnonce=%s" onclick="return confirm(\'Are you sure you want to Delete this Template Option?\');">' . __('Delete', 'bp-email-assign-templates') . '</a>',esc_attr( $_REQUEST['page'] ),'delete-single',$rec->option_id,$nonce);
    441439                                        echo "</span></div></td>";
    442440                                    break;
     
    506504
    507505    $columns['title']       = __( 'Title', 'buddypress' );
    508     $columns['etemplate']   = __( 'Template', 'bp-email-templates' );
    509     $columns['date']        = __( 'Date', 'bp-email-templates' );
     506    $columns['etemplate']   = __( 'Template', 'bp-email-assign-templates' );
     507    $columns['date']        = __( 'Date', 'bp-email-assign-templates' );
    510508
    511509    return $columns;
  • bp-email-assign-templates/tags/1.6/readme.txt

    r2726282 r3206531  
    66Plugin URI: https://philopress.com
    77Requires at least: WP 4.0
    8 Text Domain: bp-email-templates
     8Text Domain: bp-email-assign-templates
    99Domain Path: /languages
    10 Tested up to: 5.9
    11 Stable tag: 1.5
     10Tested up to: 6.5
     11Stable tag: 1.6
    1212License: GPLv2 or later
    1313
     
    5454== Upgrade Notice ==
    5555
     56= 1.6 =
     57* fixes XSS security issue
     58
    5659= 1.5 =
    5760* update support for BuddyBoss
     
    7982== Changelog ==
    8083
     84= 1.6 =
     85* fixes XSS security issue
     86
    8187= 1.5 =
    8288* update support for BuddyBoss
Note: See TracChangeset for help on using the changeset viewer.