This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Adds a print button to the top of estimates and invoices. | |
| * @return type | |
| */ | |
| function si_print_button() { | |
| ?> | |
| <a href="javascript:window.print()" id="print_button" class="button print_button"><?php si_e('Imprimir') ?></a> | |
| <?php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Example filter will translate/change the string "Description". | |
| * "Description" can be changed to whatever string you'd like to translate/change | |
| * just make sure to change the function name so you don't have any conflicts. | |
| */ | |
| function l10n_description( $text ) { | |
| return 'Beschrijving'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function si_redirect_if_not_logged_in() { | |
| $url = get_permalink( $invoice_id ); | |
| if ( !is_user_logged_in() ) { | |
| wp_redirect( home_url() . '/login/?redirect_to=' . $url . '&reauth=1'); | |
| exit(); | |
| } | |
| } | |
| // | |
| add_action( 'pre_si_invoice_view', 'si_redirect_if_not_logged_in' ); |
NewerOlder