Changeset 3206531
- Timestamp:
- 12/11/2024 06:04:22 PM (12 months ago)
- Location:
- bp-email-assign-templates/tags/1.6
- Files:
-
- 7 edited
- 1 copied
-
. (copied) (copied from bp-email-assign-templates/trunk)
-
languages/bp-email-templates.pot (modified) (1 diff)
-
loader.php (modified) (3 diffs)
-
pp-email-templates-admin-buddyboss.php (modified) (13 diffs)
-
pp-email-templates-admin-buddypress.php (modified) (14 diffs)
-
pp-email-templates-admin-metabox.php (modified) (1 diff)
-
pp-email-templates-admin.php (modified) (14 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bp-email-assign-templates/tags/1.6/languages/bp-email-templates.pot
r1374209 r3206531 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: bp-email- templates\n"3 "Project-Id-Version: bp-email-assign-templates\n" 4 4 "POT-Creation-Date: 2016-03-17 13:24-0800\n" 5 5 "PO-Revision-Date: 2016-03-17 13:25-0800\n" -
bp-email-assign-templates/tags/1.6/loader.php
r2726282 r3206531 3 3 * Plugin Name: BP Email Assign Templates 4 4 * Description: Assign Templates to BuddyPress Emails 5 * Version: 1. 55 * Version: 1.6 6 6 * Author: PhiloPress 7 7 * Author URI: https://www.philopress.com/ 8 * Text Domain: bp-email- templates8 * Text Domain: bp-email-assign-templates 9 9 * Domain Path: /languages 10 10 * License: GPLv2 or later … … 19 19 if( $vcheck ) { 20 20 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' ); 22 22 23 23 if ( is_admin() || is_network_admin() ) { … … 94 94 function pp_etemplates_bp_check() { 95 95 96 if ( ! class_exists('BuddyPress') )96 if ( ! class_exists('BuddyPress') ) { 97 97 add_action( 'admin_notices', 'pp_etemplates_install_buddypress_notice' ); 98 } 98 99 99 100 } -
bp-email-assign-templates/tags/1.6/pp-email-templates-admin-buddyboss.php
r2726282 r3206531 77 77 <input type="hidden" id="eto-editor" name="eto-editor" value="1" /> 78 78 <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'); ?>" /> 80 80 </form> 81 81 <?php 82 82 } 83 83 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>'; 85 85 86 86 echo '</div>'; … … 115 115 116 116 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/>'; 118 118 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/>'; 120 120 121 121 } … … 124 124 } 125 125 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/>'; 127 127 128 128 } … … 152 152 <tr> 153 153 <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> 155 155 </tr> 156 156 157 157 </table> 158 158 <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'); ?>" /> 160 160 161 161 </form> … … 168 168 169 169 $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>'; 172 172 173 173 174 174 $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>'; 177 177 178 178 179 179 $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' ) . 181 181 '<br>You will find it here: <em>...plugins/buddyboss-platform/bp-templates/bp-nouveau/buddypress/assets/emails/single-bp-email.php</em> 182 182 ' . '</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>'; 188 188 189 189 return $content; … … 224 224 if ( $new_option ) { 225 225 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/>'; 227 227 } 228 228 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/>'; 230 230 231 231 } … … 235 235 } 236 236 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>'; 238 238 } 239 239 } … … 247 247 if ( '.php' != $file_name_end ) { 248 248 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>'; 250 250 251 251 return false; … … 257 257 if ( '' == $template_exists ) { 258 258 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>'; 260 260 261 261 return false; … … 306 306 307 307 <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'] ) ?>" /> 309 309 <?php $pp_etemplates_list_table->display(); ?> 310 310 </form> … … 380 380 381 381 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'); 385 383 $this->delete_eto( $_GET['gid'] ); 386 384 } … … 445 443 echo "<br /><div class='row-actions'><span class='edit'>"; 446 444 $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); 448 446 echo "</span> | <span class='trash'>"; 449 447 $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); 451 449 echo "</span></div></td>"; 452 450 break; … … 516 514 517 515 $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' ); 520 518 521 519 return $columns; -
bp-email-assign-templates/tags/1.6/pp-email-templates-admin-buddypress.php
r2726282 r3206531 30 30 31 31 $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>'; 34 34 $screen->add_help_tab( array( 35 35 'id' => 'name_tab', 36 'title' => __('Option Name', 'bp-email- templates'),36 'title' => __('Option Name', 'bp-email-assign-templates'), 37 37 'content' => $content, 38 38 ) ); 39 39 40 40 $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>'; 43 43 $screen->add_help_tab( array( 44 44 'id' => 'file_tab', 45 'title' => __('Option File', 'bp-email- templates'),45 'title' => __('Option File', 'bp-email-assign-templates'), 46 46 'content' => $content, 47 47 ) ); 48 48 49 49 $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>'; 57 57 $screen->add_help_tab( array( 58 58 'id' => 'template_tab', 59 'title' => __('Create a Template', 'bp-email- templates'),59 'title' => __('Create a Template', 'bp-email-assign-templates'), 60 60 'content' => $content, 61 61 ) ); … … 100 100 <input type="hidden" id="eto-editor" name="eto-editor" value="1" /> 101 101 <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'); ?>" /> 103 103 </form> 104 104 <?php 105 105 } 106 106 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>'; 108 108 109 109 echo '</div>'; … … 138 138 139 139 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/>'; 141 141 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/>'; 143 143 144 144 } … … 147 147 } 148 148 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/>'; 150 150 151 151 } … … 173 173 <tr> 174 174 <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> 176 176 </tr> 177 177 178 178 </table> 179 179 <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'); ?>" /> 181 181 182 182 </form> … … 218 218 if ( $new_option ) { 219 219 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/>'; 221 221 } 222 222 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/>'; 224 224 225 225 } … … 229 229 } 230 230 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>'; 232 232 } 233 233 } … … 241 241 if ( '.php' != $file_name_end ) { 242 242 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>'; 244 244 245 245 return false; … … 251 251 if ( '' == $template_exists ) { 252 252 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>'; 254 254 255 255 return false; … … 264 264 <div class="wrap"> 265 265 <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> 267 267 268 268 <?php … … 296 296 297 297 <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'] ) ?>" /> 299 299 <?php $pp_etemplates_list_table->display(); ?> 300 300 </form> … … 370 370 371 371 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'); 375 373 $this->delete_eto( $_GET['gid'] ); 376 374 } … … 435 433 echo "<br /><div class='row-actions'><span class='edit'>"; 436 434 $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); 438 436 echo "</span> | <span class='trash'>"; 439 437 $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); 441 439 echo "</span></div></td>"; 442 440 break; … … 506 504 507 505 $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' ); 510 508 511 509 return $columns; -
bp-email-assign-templates/tags/1.6/pp-email-templates-admin-metabox.php
r2726282 r3206531 7 7 function pp_etemplates_custom_metabox(){ 8 8 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' ); 10 10 } 11 11 add_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 30 30 31 31 $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>'; 34 34 $screen->add_help_tab( array( 35 35 'id' => 'name_tab', 36 'title' => __('Option Name', 'bp-email- templates'),36 'title' => __('Option Name', 'bp-email-assign-templates'), 37 37 'content' => $content, 38 38 ) ); 39 39 40 40 $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>'; 43 43 $screen->add_help_tab( array( 44 44 'id' => 'file_tab', 45 'title' => __('Option File', 'bp-email- templates'),45 'title' => __('Option File', 'bp-email-assign-templates'), 46 46 'content' => $content, 47 47 ) ); 48 48 49 49 $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>'; 57 57 $screen->add_help_tab( array( 58 58 'id' => 'template_tab', 59 'title' => __('Create a Template', 'bp-email- templates'),59 'title' => __('Create a Template', 'bp-email-assign-templates'), 60 60 'content' => $content, 61 61 ) ); … … 100 100 <input type="hidden" id="eto-editor" name="eto-editor" value="1" /> 101 101 <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'); ?>" /> 103 103 </form> 104 104 <?php 105 105 } 106 106 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>'; 108 108 109 109 echo '</div>'; … … 138 138 139 139 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/>'; 141 141 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/>'; 143 143 144 144 } … … 147 147 } 148 148 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/>'; 150 150 151 151 } … … 173 173 <tr> 174 174 <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> 176 176 </tr> 177 177 178 178 </table> 179 179 <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'); ?>" /> 181 181 182 182 </form> … … 218 218 if ( $new_option ) { 219 219 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/>'; 221 221 } 222 222 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/>'; 224 224 225 225 } … … 229 229 } 230 230 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>'; 232 232 } 233 233 } … … 241 241 if ( '.php' != $file_name_end ) { 242 242 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>'; 244 244 245 245 return false; … … 251 251 if ( '' == $template_exists ) { 252 252 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>'; 254 254 255 255 return false; … … 264 264 <div class="wrap"> 265 265 <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> 267 267 268 268 <?php … … 296 296 297 297 <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'] ) ?>" /> 299 299 <?php $pp_etemplates_list_table->display(); ?> 300 300 </form> … … 370 370 371 371 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'); 375 373 $this->delete_eto( $_GET['gid'] ); 376 374 } … … 435 433 echo "<br /><div class='row-actions'><span class='edit'>"; 436 434 $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); 438 436 echo "</span> | <span class='trash'>"; 439 437 $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); 441 439 echo "</span></div></td>"; 442 440 break; … … 506 504 507 505 $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' ); 510 508 511 509 return $columns; -
bp-email-assign-templates/tags/1.6/readme.txt
r2726282 r3206531 6 6 Plugin URI: https://philopress.com 7 7 Requires at least: WP 4.0 8 Text Domain: bp-email- templates8 Text Domain: bp-email-assign-templates 9 9 Domain Path: /languages 10 Tested up to: 5.911 Stable tag: 1. 510 Tested up to: 6.5 11 Stable tag: 1.6 12 12 License: GPLv2 or later 13 13 … … 54 54 == Upgrade Notice == 55 55 56 = 1.6 = 57 * fixes XSS security issue 58 56 59 = 1.5 = 57 60 * update support for BuddyBoss … … 79 82 == Changelog == 80 83 84 = 1.6 = 85 * fixes XSS security issue 86 81 87 = 1.5 = 82 88 * update support for BuddyBoss
Note: See TracChangeset
for help on using the changeset viewer.