File manager - Edit - /home/premiey/www/wp-includes/images/media/any.tar
Back
class-css-js.php 0000666 00000013441 15165406230 0007573 0 ustar 00 <?php /** * @version 1.1 * @package Any * @category Load JS and CSS files * @author wpdevelop * * @web-site https://wpbookingcalendar.com/ * @email info@wpbookingcalendar.com * * @modified 2015-10-28 */ abstract class WPBC_JS_CSS { public $objects = array(); public $type; // css || js function __construct() { $this->define(); add_action( 'admin_enqueue_scripts', array( $this, 'registerScripts' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'registerScripts' ) ); add_action( 'wpbc_load_js_on_admin_page', array( $this, 'load_js_on_admin_page' ) ); // Load JS. Hook fire only in admin pages of plugin. CLASS: WPBC_Admin_Menus (..\any\class\class-admin-menu.php) add_action( 'wpbc_load_css_on_admin_page', array( $this, 'load_css_on_admin_page' ) ); // Load CSS. Hook fire only in admin pages of plugin. CLASS: WPBC_Admin_Menus (..\any\class\class-admin-menu.php) } public function load_css_on_admin_page() { if ( $this->getType() == 'css' ) $this->load(); } public function load_js_on_admin_page() { if ( $this->getType() == 'js' ) $this->load(); } /** Define all Scripts or Styles here */ abstract public function define(); /** * Enqueue Scripts or Styles. * * @param type $where_to_load - can be "admin" or "client" */ abstract public function enqueue( $where_to_load ); /** * Deregister some Conflict scripts from other plugins. * * @param type $where_to_load - can be "admin" or "client" */ abstract public function remove_conflicts( $where_to_load ); // Define CSS or JavaScript public function setType($param) { $this->type = $param; } // Get type of this script public function getType() { return $this->type; } // Add new Style or Script public function add($param) { $this->objects[] = $param; } private function isLoad( $whereToLoadArray ) { $is_load = false; if ( ( is_admin() ) && ( in_array('admin', $whereToLoadArray ) ) ) $is_load = true; if ( ( ! is_admin() ) && ( in_array('client', $whereToLoadArray ) ) ) $is_load = true; return $is_load; } // Register public function registerScripts() { //if ( function_exists( 'wp_dequeue_script' ) ) $this->remove_conflicts( ( is_admin() ? 'admin': 'client' ) ); foreach( $this->objects as $script ) { if ( $this->isLoad( $script['where_to_load'] ) ) { if ( $this->getType() == 'css' ) wp_register_style( $script['handle'], $script['src'], $script['deps'], $script['version'] ); else wp_register_script( $script['handle'], $script['src'], $script['deps'], $script['version'] ); } } } // Load scripts or styles here public function load(){ $is_load_scripts = true; $is_load_scripts = apply_filters( 'wpbc_is_load_script_on_this_page', $is_load_scripts ); if ( ! $is_load_scripts ) return; // Exist, if on some page we do not need to load scripts foreach( $this->objects as $num => $script ) { if ( $this->isLoad( $script['where_to_load'] ) ) { if ( $this->getType() == 'css' ) { if ( $script['condition'] === false ) wp_enqueue_style( $script['handle'] ); else { if (! function_exists('wp_style_add_data') ) { // This function is available only since WordPress 3.6.0 Update wp_enqueue_style( $script['handle'] ); wp_style_add_data( $script['handle'], 'conditional', $script['condition'] ); } else { // Add additional "dynamic CSS" if the WP version older than 3.6.0 (its function suport since WP 3.3) if ( ($num-1) > -1 ) { // Its because "wp_add_inline_style" add the CSS to the already added style. So its require that some other simple style was added before wp_enqueue_style( $this->objects[($num-1)]['handle'] ); wp_add_inline_style( $this->objects[($num-1)]['handle'], sprintf("<!--[if ".$script['condition']."]>\n" . "<link rel='stylesheet' id='".$script['handle']."-css' href='". $script['src'] ."?ver=" . $script['version'] . "' type='text/css' media='all' />\n" . "<![endif]-->\n") ); } } } } else { wp_enqueue_script( $script['handle'] ); } } } $this->enqueue( ( is_admin() ? 'admin': 'client' ) ); if ( $this->getType() == 'css' ) do_action( 'wpbc_enqueue_style', ( is_admin() ? 'admin': 'client' ) ); if ( $this->getType() == 'js' ) do_action( 'wpbc_enqueue_script', ( is_admin() ? 'admin': 'client' ) ); } } class-admin-menu.php 0000666 00000037122 15165406230 0010425 0 ustar 00 <?php /** * @version 1.1 * @package Any * @category Menu in Admin Panel * @author wpdevelop * * @web-site https://wpbookingcalendar.com/ * @email info@wpbookingcalendar.com * * @modified 2015-11-02 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly class WPBC_Admin_Menus { /* Static Variables */ static $capability = array( 'administrator' => 'activate_plugins', 'editor' => 'publish_pages', 'author' => 'publish_posts', 'contributor' => 'edit_posts', 'subscriber' => 'read' ); protected $menu_tag; protected $menu_title; protected $menu_title_second; // For root menu chnage second title in submenu - little hack protected $page_header; // Header - H2, in page content protected $browser_header; // Browser Header Title protected $in_menu; protected $user_role; // Acceess Role for current menu item protected $mune_icon_url; // Icon - if used 'none', then you can define it in the CSS backgound: .toplevel_page_wpbc .wp-menu-image { background-image: url("../img/icon-16x16.png"); background-position: 7px 7px; } But its mean that you are need to load this CSS in every admin page. public $root_position; /* Positions for Core Menu Items 2 Dashboard 4 Separator 5 Posts 10 Media 15 Links 20 Pages 25 Comments 59 Separator 60 Appearance 65 Plugins 70 Users 75 Tools 80 Settings 99 Separator */ function __construct( $slug, $param = array() ) { $this->in_menu = false; $this->menu_tag = $slug; // For exmaple: 'wpbc-settings' - its 'page' parameter in URL if ( isset( $param['menu_title'] ) ) $this->menu_title = $param['menu_title']; if ( isset( $param['menu_title_second'] ) ) $this->menu_title_second = $param['menu_title_second']; if ( isset( $param['page_header'] ) ) $this->page_header = $param['page_header']; if ( isset( $param['browser_header'] ) ) $this->browser_header = $param['browser_header']; if ( isset( $param['in_menu'] ) ) $this->in_menu = $param['in_menu']; if ( isset( $param['position'] ) ) $this->root_position = $param['position']; else $this->root_position = null; if ( isset( $param['mune_icon_url'] ) ) $this->mune_icon_url = $param['mune_icon_url']; else $this->mune_icon_url = 'none'; if ( isset( $param['user_role'] ) ) $this->user_role = $param['user_role']; else $this->user_role = 'subscriber'; add_action( 'admin_menu', array($this, 'new_admin_page'), 10 ); add_action( 'admin_menu', array($this, 'change_second_root_menu_title'), 11 ); // Change Title of Submenu title for root menu item } public function load_js() { do_action( 'wpbc_load_js_on_admin_page' ); } public function load_css() { do_action( 'wpbc_load_css_on_admin_page' ); } /** * Define Plugin Menu Page * */ public function new_admin_page(){ if ( $this->in_menu == 'root' ) { // Main Menu $page = $this->create_plugin_menu( $this->browser_header // Browser Page Header Title , $this->menu_title // Menu Title , ( ( isset( self::$capability[ $this->user_role ] ) ) ? self::$capability[ $this->user_role ] : self::$capability[ 'subscriber' ] ) // Capabilities , $this->menu_tag // Slug // I was used early -> plugin_basename(WPBC_FILE).'wpbc' , $this->mune_icon_url // Icon // - if used 'none', then you can define it in the CSS backgound: .toplevel_page_wpbc .wp-menu-image { background-image: url("../img/icon-16x16.png"); background-position: 7px 7px; } But its mean that you are need to load this CSS in every admin page. , array( $this, 'content' ) // Function for output content of page ); } else { // Sub Menu $page = $this->create_plugin_submenu( $this->in_menu // The slug name for parent menu (or file name of standard WordPress admin page) , $this->browser_header // Page Title , $this->menu_title // Menu Title , ( ( isset( self::$capability[ $this->user_role ] ) ) ? self::$capability[ $this->user_role ] : self::$capability[ 'subscriber' ] ) // Capabilities , $this->menu_tag // Slug , array( $this, 'content' ) // Function for output content of page ); } //do_action('wpbc_define_settings_pages', $this->menu_tag ); // Define sub classes, like: page-settings-general.php $this->menu_tag - 'wpbc-settings' - its 'page' parameter in URL do_action('wpbc_menu_created', $this->menu_tag ); // Define sub classes, like: page-settings-general.php $this->menu_tag - 'wpbc-settings' - its 'page' parameter in URL do_action('wpbc_define_nav_tabs', $this->menu_tag ); // Define Nav tabs. } /** * Content of the Menu Page * Define page S t r u c t u r e, nav T A B s , set N O N C E: wpbc_ajax_admin_nonce field in ..\any\class\class-admin-page-structure.php then show page C O N T E N T in files, like page-structure.php $this->menu_tag - 'wpbc-settings' - its 'page' parameter in URL */ public function content() { do_action('wpbc_page_structure_show', $this->menu_tag ); } /** * Hack for changing Root 2nd Submenu Title * * @global type $submenu */ public function change_second_root_menu_title() { // Change Title of the Main menu inside of submenu global $submenu; if ( ( $this->in_menu == 'root' ) && ( isset( $submenu[ $this->menu_tag ] ) ) && ( isset( $this->menu_title_second ) ) ) { $submenu[ $this->menu_tag ][0][0] = $this->menu_title_second; } } /** * Add Menu * * @param type $menu_page_title * @param type $menu_title * @param type $capability * @param type $menu_slug * @param type $mune_icon_url * @param type $page_content * @param type $page_css * @param type $page_js * @return type */ protected function create_plugin_menu($menu_page_title, $menu_title, $capability, $menu_slug, $mune_icon_url, $page_content ) { /** * add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); * @return string The resulting page's hook_suffix */ //FixIn: 9.0.1.7 // The url to the icon to be used for this menu. Using 'none' would leave div.wp-menu-image empty so an icon can be added as background with CSS. if ( '<svg' == substr( $mune_icon_url, 0, 4 ) ) { /* $mune_icon_url_svg = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="" viewBox="-2 -1 20 20"> <path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM2 2a1 1 0 0 0-1 1v1h14V3a1 1 0 0 0-1-1H2zm13 3H1v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V5z"/> <path d="M9 7.5a.5.5 0 0 1 .5-.5H15v2H9.5a.5.5 0 0 1-.5-.5v-1zm-2 3v1a.5.5 0 0 1-.5.5H1v-2h5.5a.5.5 0 0 1 .5.5z"/> </svg>'; */ $mune_icon_url = sprintf( 'data:image/svg+xml;base64,%s', base64_encode( $mune_icon_url ) ); } elseif ( $mune_icon_url == 'none' ) { $mune_icon_url = 'none'; } elseif ( empty( $mune_icon_url ) ) { $mune_icon_url = ''; } else { $mune_icon_url = plugins_url( $mune_icon_url, WPBC_FILE ); } $page = add_menu_page( $menu_page_title, // The text to be displayed in the title tags of the page when the menu is selected $menu_title, // The text to be used for the menu $capability, // The capability required for this menu to be displayed to the user. $menu_slug, // The slug name to refer to this menu by (should be unique for this menu) $page_content, // The function to be called to output the content for this page. $mune_icon_url//(($mune_icon_url=='none')?'none':((empty($mune_icon_url))?'':plugins_url($mune_icon_url, WPBC_FILE)) ) // The url to the icon to be used for this menu. Using 'none' would leave div.wp-menu-image empty so an icon can be added as background with CSS. , $this->root_position /* @param int $position The position in the menu order this one should appear * Positions for Core Menu Items 2 Dashboard 4 Separator 5 Posts 10 Media 15 Links 20 Pages 25 Comments 59 Separator 60 Appearance 65 Plugins 70 Users 75 Tools 80 Settings 99 Separator */ ); add_action( 'admin_print_styles-' . $page, array( $this, 'load_css' ) ); add_action( 'admin_print_scripts-' . $page, array( $this, 'load_js' ) ); return $page; } /** * Add Sub Menu * * @param type $parent_menu_slug - The slug name for the parent menu (or the file name of a standard WordPress admin page) * @param type $menu_page_title * @param type $menu_title * @param type $capability * @param type $menu_slug * @param type $page_content * @param type $page_css * @param type $page_js * @return type */ protected function create_plugin_submenu( $parent_menu_slug, $menu_page_title, $menu_title, $capability, $menu_slug, $page_content ) { /** * function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '' ); * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. */ $page = add_submenu_page( $parent_menu_slug, // The slug name for the parent menu (or the file name of a standard WordPress admin page) $menu_page_title, // The text to be displayed in the title tags of the page when the menu is selected $menu_title, // The text to be used for the menu $capability, // The capability required for this menu to be displayed to the user. $menu_slug, // The slug name to refer to this menu by (should be unique for this menu) $page_content // The function to be called to output the content for this page. ); add_action( 'admin_print_styles-' . $page, array( $this, 'load_css' ) ); add_action( 'admin_print_scripts-' . $page, array( $this, 'load_js' ) ); return $page; } } index.php 0000666 00000000033 15165406230 0006366 0 ustar 00 <?php // Silence is golden. emails_tpl/standard-text-tpl.php 0000666 00000002273 15165406230 0012777 0 ustar 00 <?php /** * @version 1.0 * @package: Emails * @category: Templates * @author wpdevelop * * @web-site https://wpbookingcalendar.com/ * @email info@wpbookingcalendar.com * * @modified 2015-06-16 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly /** * get email template * * @param array $fields_values */ function wpbc_email_template_standard_text( $fields_values ) { ob_start(); if ( ! empty($fields_values['header_content'] ) ) { echo "= " . wp_kses_post( wptexturize( $fields_values['header_content'] ) ) . " =\n\n"; echo "----------------------------------------------------------------------\n\n"; } echo ( wp_kses_post( wptexturize( $fields_values['content'] ) ) ); if ( ! empty( $fields_values['footer_content'] ) ) { echo "\n---------------------------------------------------------------------\n\n"; echo ( wp_kses_post( wptexturize( $fields_values['footer_content'] ) ) ); } return ob_get_clean(); // Return this email content } emails_tpl/plain-text-tpl.php 0000666 00000002032 15165406230 0012273 0 ustar 00 <?php /** * @version 1.0 * @package: Emails * @category: Templates * @author wpdevelop * * @web-site https://wpbookingcalendar.com/ * @email info@wpbookingcalendar.com * * @modified 2015-06-16 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly /** * get email template * * @param array $fields_values */ function wpbc_email_template_plain_text( $fields_values ) { ob_start(); if ( ! empty($fields_values['header_content'] ) ) { echo wp_kses_post( wptexturize( $fields_values['header_content'] ) ) . "\n\n"; //Header } echo ( wp_kses_post( wptexturize( $fields_values['content'] ) ) ); //Content if ( ! empty( $fields_values['footer_content'] ) ) { echo "\n\n" . wp_kses_post( wptexturize( $fields_values['footer_content'] ) ); //Footer } return ob_get_clean(); // Return this email content } emails_tpl/plain-html-tpl.php 0000666 00000007527 15165406230 0012271 0 ustar 00 <?php /** * @version 1.0 * @package: Emails * @category: Templates * @author wpdevelop * * @web-site https://wpbookingcalendar.com/ * @email info@wpbookingcalendar.com * * @modified 2015-06-16 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly /** * get email template * * @param array $fields_values */ function wpbc_email_template_plain_html( $fields_values ) { ob_start(); // $base_color = 'background-color:' . ( empty( $fields_values['base_color'] ) ? '#557da1' : $fields_values['base_color'] ) . ';'; // $background_color = 'background-color:' . ( empty( $fields_values['background_color'] ) ? '#FDFDFD' : $fields_values['background_color'] ) . ';'; // $body_color = 'background-color:' . ( empty( $fields_values['body_color'] ) ? '#F5F5F5' : $fields_values['body_color'] ) . ';'; // $text_color = 'color:' . ( empty( $fields_values['text_color'] ) ? '#333333' : $fields_values['text_color'] ) . ';'; $base_color = ''; $background_color = ''; $body_color = ''; $text_color = ''; //////////////////////////////////////////////////////////////////////////////// // HTML Email Template //////////////////////////////////////////////////////////////////////////////// ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- dir="<?php echo is_rtl() ? 'rtl' : 'ltr'?>" --> <head><?php /* //FixIn: 9.3.1.3 ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title></title> <?php */ ?></head> <body style="Margin:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;min-width:100%;<?php echo $body_color; ?>" <?php echo is_rtl() ? 'rightmargin="0"' : 'leftmargin="0"'; ?> > <div class="wrapper" style="table-layout:fixed;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;Margin:0;padding-top:10px;padding-bottom:10px;padding-right:10px;padding-left:10px;<?php echo $body_color; ?>" <?php echo is_rtl() ? 'dir="rtl"' : 'dir="ltr"'?> > <?php if ( ! empty( $fields_values['header_content'] ) ) { ?><p style="Margin:0;Margin-bottom:10px;font-family:Helvetica, Roboto, Arial, sans-serif;line-height:150%;font-size:14px;" ><?php echo ( wp_kses_post( wptexturize( $fields_values['header_content'] ) ) ); ?></p><?php } ?><p style="Margin:0;font-size:14px;Margin-bottom:10px;font-family:Helvetica, Roboto, Arial, sans-serif;line-height:150%;<?php echo $text_color; ?>" ><?php $h2_headers = array('<p class="h2" style="Margin-bottom:10px;font-family:Helvetica, Roboto, Arial, sans-serif;display:block;font-size:18px;font-weight:bold;line-height:130%;Margin:16px 0 8px;text-align:left;color:#557da1;" >', '</p>'); $fields_values['content'] = str_replace( array( '<h2>', '</h2>' ), $h2_headers, $fields_values['content'] ); echo ( wp_kses_post( wptexturize( $fields_values['content'] ) ) ); ?></p><?php if ( ! empty( $fields_values['footer_content'] ) ) { ?><p style="Margin:0;Margin-bottom:10px;font-family:Helvetica, Roboto, Arial, sans-serif;line-height:150%;font-size:11px;" ><?php echo ( wp_kses_post( wptexturize( $fields_values['footer_content'] ) ) ); ?></p><?php } ?> </div> </body> <?php return ob_get_clean(); // Return this email content } emails_tpl/standard-html-tpl.php 0000666 00000073523 15165406230 0012765 0 ustar 00 <?php /** * @version 1.0 * @package: Emails * @category: Templates * @author wpdevelop * * @web-site https://wpbookingcalendar.com/ * @email info@wpbookingcalendar.com * * @modified 2015-06-16 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly /** * get email template * * @param array $fields_values */ function wpbc_email_template_standard_html( $fields_values ) { ob_start(); $base_color = 'background-color:' . ( empty( $fields_values['base_color'] ) ? '#557da1' : $fields_values['base_color'] ) . ';'; $background_color = 'background-color:' . ( empty( $fields_values['background_color'] ) ? '#FDFDFD' : $fields_values['background_color'] ) . ';'; $body_color = 'background-color:' . ( empty( $fields_values['body_color'] ) ? '#F5F5F5' : $fields_values['body_color'] ) . ';'; $text_color = 'color:' . ( empty( $fields_values['text_color'] ) ? '#333333' : $fields_values['text_color'] ) . ';'; //////////////////////////////////////////////////////////////////////////////// // HTML Email Template //////////////////////////////////////////////////////////////////////////////// ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- dir="<?php echo is_rtl() ? 'rtl' : 'ltr'?>" --> <head><?php /* //FixIn: 9.3.1.3 ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <?php */ ?><title></title> <style type="text/css"> body { Margin: 0; padding: 0; min-width: 100%; <?php echo $background_color; ?> } table { border-spacing: 0; font-family: sans-serif; <?php echo $text_color; ?> } td { padding: 0; } img { border: 0; } .wrapper { width: 100%; table-layout: fixed; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; Margin: 0; padding: 70px 0 70px 0; <?php echo $background_color; ?> } .webkit { max-width: 600px; } @-ms-viewport { width: device-width; } .outer { Margin: 0 auto; width: 96%; max-width: 600px; box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important; border: 1px solid #dcdcdc; border-radius: 3px !important; <?php echo $body_color; ?> } .full-width-image img { width: 100%; height: auto; } .header { border-radius: 3px 3px 0 0 !important; color: #ffffff; border-bottom: 0; font-weight: bold; line-height: 100%; vertical-align: middle; font-family: Helvetica, Roboto, Arial, sans-serif; <?php echo $base_color; ?> } .footer .inner { text-align: center; <?php //echo $base_color; ?> } .footer .inner p { font-size: 11px; } .inner { padding: 48px; } .header .inner { padding: 10px; } p { Margin: 0; } p.footer { font-size: 11px; } a { color: #ee6a56; text-decoration: underline; } .h1 { font-size: 21px; font-weight: bold; Margin-bottom: 18px; } .header .inner .h1 { color: #ffffff; display: block; font-family: Helvetica, Roboto, Arial, sans-serif; font-size: 30px; font-weight: 300; line-height: 150%; Margin: 0; padding: 26px 48px; text-align: left; text-shadow: 0 1px 0 #7797b4; -webkit-font-smoothing: antialiased; } .h2 { font-size: 18px; font-weight: bold; Margin-bottom: 12px; } .one-column .contents { text-align: left; } .one-column p { font-size: 14px; Margin-bottom: 10px; font-family: Helvetica, Roboto, Arial, sans-serif; font-size: 14px; line-height: 150%; color: #737373; } .one-column p.h2, .two-column .column .contents p.h2 { display: block; font-size: 18px; font-weight: bold; line-height: 130%; Margin: 16px 0 8px; text-align: left; color: #557da1; } .two-column { text-align: center; font-size: 0; } .two-column .column { width: 100%; max-width: 280px; display: inline-block; vertical-align: top; } .two-column .column .contents p{ font-size: 14px; Margin-bottom: 10px; font-family: Helvetica, Roboto, Arial, sans-serif; font-size: 14px; line-height: 150%; color: #737373; } .two-column .inner, .footer .inner { padding: 10px 48px; } .contents { width: 100%; } .header .inner { width: 100%; } .footer .inner { width: 100%; border-top:1px solid #dddddd; } .two-column .contents { font-size: 14px; text-align: left; } .two-column img { width: 100%; height: auto; } .two-column .text { padding-top: 10px; } .two-column p { font-size: 14px; Margin-bottom: 10px; font-family: Helvetica, Roboto, Arial, sans-serif; font-size: 14px; line-height: 150%; color: #737373; } @media screen and (max-width: 400px) { .two-column .column { max-width: 100% !important; } } @media screen and (min-width: 401px) and (max-width: 620px) { .two-column .column { max-width: 50% !important; } } </style> <!--[if (gte mso 9)|(IE)]> <style type="text/css"> table {border-collapse: collapse !important;} </style> <![endif]--> </head> <body style="Margin:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;min-width:100%;<?php echo $background_color; ?>" <?php echo is_rtl() ? 'rightmargin="0"' : 'leftmargin="0"'; ?> > <center class="wrapper" style="width:100%;table-layout:fixed;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;Margin:0;padding-top:70px;padding-bottom:70px;padding-right:0;padding-left:0;<?php echo $background_color; ?>" <?php echo is_rtl() ? 'dir="rtl"' : 'dir="ltr"'?> > <div class="webkit" style="max-width:600px;" > <!--[if (gte mso 9)|(IE)]> <table width="600" align="center" style="border-spacing:0;font-family:sans-serif;<?php echo $text_color; ?>" > <tr> <td style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;" > <![endif]--> <table class="outer" align="center" style="border-spacing:0;font-family:sans-serif;<?php echo $text_color; ?><?php echo $body_color; ?>Margin:0 auto;width:96%;max-width:600px;box-shadow:0 1px 4px rgba(0,0,0,0.1) !important;border-width:1px;border-style:solid;border-color:#dcdcdc;border-radius:3px !important;" > <?php if ( ! empty( $fields_values['header_img600_src'] ) ) { ?> <!-- Header IMG: 1 column template row --> <tr> <!-- This image must be 600px width (NOT wider). If less, then we need to set in CSS width in px of this image --> <td class="full-width-image" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;" > <img src="images/header.jpg" alt="" style="border-width:0;width:100%;height:auto;" /> <!-- src="<?php $fields_values['header_img600_src']; ?>" --> </td> </tr> <?php } ?> <!-- Header: 1 column template row --> <tr> <td class="one-column" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;" > <table width="100%" class="header" style="<?php echo $base_color; ?>border-spacing:0;border-radius:3px 3px 0 0 !important;color:#ffffff;border-bottom-width:0;font-weight:bold;line-height:100%;vertical-align:middle;font-family:Helvetica, Roboto, Arial, sans-serif;" > <tr> <td class="inner" style="padding-top:10px;padding-bottom:10px;padding-right:10px;padding-left:10px;width:100%;" > <p class="h1" style="Margin-bottom:10px;color:#ffffff;display:block;font-family:Helvetica, Roboto, Arial, sans-serif;font-size:30px;font-weight:300;line-height:150%;Margin:0;padding-top:26px;padding-bottom:26px;padding-right:48px;padding-left:48px;text-align:left;text-shadow:0 1px 0 #7797b4;-webkit-font-smoothing:antialiased;" ><?php echo ( wp_kses_post( wptexturize( $fields_values['header_content'] ) ) ); ?></p> </td> </tr> </table> </td> </tr> <!-- Content: 1 column template row --> <tr> <td class="one-column" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;" > <table width="100%" style="border-spacing:0;font-family:sans-serif;<?php echo $text_color; ?>" > <tr> <td class="inner contents" style="padding-top:48px;padding-bottom:48px;padding-right:48px;padding-left:48px;width:100%;text-align:left;" > <p style="Margin:0;font-size:14px;Margin-bottom:10px;font-family:Helvetica, Roboto, Arial, sans-serif;line-height:150%;color:#737373;" ><?php $h2_headers = array('<p class="h2" style="Margin-bottom:10px;font-family:Helvetica, Roboto, Arial, sans-serif;display:block;font-size:18px;font-weight:bold;line-height:130%;Margin:16px 0 8px;text-align:left;color:#557da1;" >', '</p>'); $fields_values['content'] = str_replace( array( '<h2>', '</h2>' ), $h2_headers, $fields_values['content'] ); echo ( wp_kses_post( wptexturize( $fields_values['content'] ) ) ); ?></p> </td> </tr> </table> </td> </tr> <!-- Footer: 1 column template row --> <tr> <td class="one-column" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;" > <table width="100%" class="footer" style="border-spacing:0;font-family:sans-serif;<?php echo $text_color; ?>" > <tr> <td class="inner" style="text-align:center;padding-top:10px;padding-bottom:10px;padding-right:48px;padding-left:48px;width:100%;border-top-width:1px;border-top-style:solid;border-top-color:#dddddd;" > <p style="Margin:0;Margin-bottom:10px;font-family:Helvetica, Roboto, Arial, sans-serif;line-height:150%;color:#737373;font-size:11px;" > <?php /* <a style="color:#ee6a56;text-decoration:underline;" >Forward to a Friend</a> <a style="color:#ee6a56;text-decoration:underline;" >Unsubscribe</a> <a style="color:#ee6a56;text-decoration:underline;" >Preferences</a><br /> */ echo ( wp_kses_post( wptexturize( $fields_values['footer_content'] ) ) ); ?> </p> </td> </tr> </table> </td> </tr> </table> <!--[if (gte mso 9)|(IE)]> </td> </tr> </table> <![endif]--> </div> </center> </body> <?php return ob_get_clean(); // Return this email content } return; // Exist from this file, at the bottom - original static HTML template for email // <editor-fold defaultstate="collapsed" desc=" Source Code of template for parsing at http://inliner.cm/ " > //////////////////////////////////////////////////////////////////////////////// // Source Code of template for parsing at http://inliner.cm/ //////////////////////////////////////////////////////////////////////////////// ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- dir="<?php echo is_rtl() ? 'rtl' : 'ltr'?>" --> <head><?php /* //FixIn: 9.3.1.3 ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <?php */ ?><title></title> <style type="text/css"> body { Margin: 0; padding: 0; min-width: 100%; background-color: #ffffff; } table { border-spacing: 0; font-family: sans-serif; color: #333333; } td { padding: 0; } img { border: 0; } .wrapper { width: 100%; table-layout: fixed; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; Margin: 0; padding: 70px 0 70px 0; background-color: #f5f5f5; } .webkit { max-width: 600px; } @-ms-viewport { width: device-width; } /* width 100% */ .outer { Margin: 0 auto; width: 96%; max-width: 600px; box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important; border: 1px solid #dcdcdc; border-radius: 3px !important; background-color: #fdfdfd; } .full-width-image img { width: 100%; height: auto; } .header { border-radius: 3px 3px 0 0 !important; color: #ffffff; border-bottom: 0; font-weight: bold; line-height: 100%; vertical-align: middle; font-family: Helvetica, Roboto, Arial, sans-serif; background-color: #557da1; } .footer .inner { text-align: center; } .footer .inner p { font-size: 11px; } .inner { padding: 48px; } .header .inner { padding: 10px; } p { Margin: 0; } p.footer { font-size: 11px; } a { color: #ee6a56; text-decoration: underline; } .h1 { font-size: 21px; font-weight: bold; Margin-bottom: 18px; } .header .inner .h1 { color: #ffffff; display: block; font-family: Helvetica, Roboto, Arial, sans-serif; font-size: 30px; font-weight: 300; line-height: 150%; Margin: 0; padding: 26px 48px; text-align: left; text-shadow: 0 1px 0 #7797b4; -webkit-font-smoothing: antialiased; } .h2 { font-size: 18px; font-weight: bold; Margin-bottom: 12px; } .one-column .contents { text-align: left; } .one-column p { font-size: 14px; Margin-bottom: 10px; font-family: Helvetica, Roboto, Arial, sans-serif; font-size: 14px; line-height: 150%; color: #737373; } .one-column p.h2, .two-column .column .contents p.h2 { display: block; font-size: 18px; font-weight: bold; line-height: 130%; Margin: 16px 0 8px; text-align: left; color: #557da1; } .two-column { text-align: center; font-size: 0; } /* Previously 300px. - TODO: need to test if we really need to have here 280 or 300px in the different email applications. Also its possible that we need to have header images, not 280px but only 260px.... */ .two-column .column { width: 100%; max-width: 280px; display: inline-block; vertical-align: top; } .two-column .column .contents p{ font-size: 14px; Margin-bottom: 10px; font-family: Helvetica, Roboto, Arial, sans-serif; font-size: 14px; line-height: 150%; color: #737373; } .two-column .inner, .footer .inner { padding: 10px 48px; } .contents { width: 100%; } .header .inner { width: 100%; } .footer .inner { width: 100%; border-top:1px solid #dddddd; } .two-column .contents { font-size: 14px; text-align: left; } .two-column img { width: 100%; height: auto; } .two-column .text { padding-top: 10px; } .two-column p { font-size: 14px; Margin-bottom: 10px; font-family: Helvetica, Roboto, Arial, sans-serif; font-size: 14px; line-height: 150%; color: #737373; } /*Media Queries*/ @media screen and (max-width: 400px) { .two-column .column { max-width: 100% !important; } } @media screen and (min-width: 401px) and (max-width: 620px) { .two-column .column { max-width: 50% !important; } } </style> <!--[if (gte mso 9)|(IE)]> <style type="text/css"> table {border-collapse: collapse;} </style> <![endif]--> </head> <body> <!-- <?php echo is_rtl() ? 'rightmargin="0"' : 'leftmargin="0"'; ?> --> <center class="wrapper" > <!-- <?php echo is_rtl() ? 'dir="rtl"' : 'dir="ltr"'?> --> <div class="webkit"> <!--[if (gte mso 9)|(IE)]> <table width="600" align="center"> <tr> <td> <![endif]--> <table class="outer" align="center"> <!-- <?php if ( ! empty( $fields_values['header_img600_src'] ) ) { ?> --> <!-- Header IMG: 1 column template row --> <tr> <!-- This image must be 600px width (NOT wider). If less, then we need to set in CSS width in px of this image --> <td class="full-width-image"> <img src="images/header.jpg" alt="" /> <!-- src="<?php $fields_values['header_img600_src']; ?>" --> </td> </tr> <!-- <?php } ?> --> <!-- Header: 1 column template row --> <tr> <td class="one-column"> <table width="100%" class="header"> <tr> <td class="inner"> <p class="h1">HTML Email Header</p> <!-- <?php echo ( wp_kses_post( wptexturize( $fields_values['header_content'] ) ) ); ?> --> </td> </tr> </table> </td> </tr> <!-- Content: 1 column template row --> <tr> <td class="one-column"> <table width="100%"> <tr> <td class="inner contents"> <!-- <?php echo ( wp_kses_post( wptexturize( $fields_values['content'] ) ) ); ?> --> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed aliquet diam a facilisis eleifend. Cras ac justo felis. Mauris faucibus, orci eu blandit fermentum, lorem nibh sollicitudin mi, sit amet interdum metus urna ut lacus.</p> <p class="h2">Lorem ipsum dolor</p> <p>Fusce eu euismod leo, a accumsan tellus. Quisque vitae dolor eu justo cursus egestas. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sit amet sapien odio. Sed pellentesque arcu mi, quis malesuada lectus lacinia et. Cras a tempor leo.</p> </td> </tr> </table> </td> </tr> <!-- <?php if ( ( ! empty( $fields_values['content_column_1'] ) ) && ( ! empty( $fields_values['content_column_2'] ) ) ) { ?> --> <!-- Content: 2 columns template row --> <tr> <td class="two-column"> <!--[if (gte mso 9)|(IE)]> <table width="100%"> <tr> <td width="50%" valign="top"> <![endif]--> <div class="column"> <!-- Column 1 --> <table width="100%"> <tr> <td class="inner"> <table class="contents"> <!-- <?php if ( ! empty( $fields_values['header_column_1_img260_src'] ) ) { ?> --> <tr> <td> <!-- width of image must be 260px --> <img src="images/two-column-01.jpg" alt="" /> <!-- src="<?php $fields_values['header_column_1_img260_src']; ?>" --> </td> </tr> <!-- <?php } ?> --> <tr> <td class="text"> <!-- <?php echo ( wp_kses_post( wptexturize( $fields_values['content_column_1'] ) ) ); ?> --> <p>Column 1 Content .... Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed aliquet diam a facilisis eleifend. Cras ac justo felis. Mauris faucibus, orci eu blandit fermentum, lorem nibh sollicitudin mi, sit amet interdum metus urna ut lacus. </p> </td> </tr> </table> </td> </tr> </table> </div> <!--[if (gte mso 9)|(IE)]> </td><td width="50%" valign="top"> <![endif]--> <div class="column"> <!-- Column 2 --> <table width="100%"> <tr> <td class="inner"> <table class="contents"> <!-- <?php if ( ! empty( $fields_values['header_column_2_img260_src'] ) ) { ?> --> <tr> <td> <!-- width of image must be 260px --> <img src="images/two-column-02.jpg" alt="" /> <!-- src="<?php $fields_values['header_column_2_img260_src']; ?>" --> </td> </tr> <!-- <?php } ?> --> <tr> <td class="text"> <!-- <?php echo ( wp_kses_post( wptexturize( $fields_values['content_column_2'] ) ) ); ?> --> <p>Column 2 Content .... Fusce eu euismod leo, a accumsan tellus. Quisque vitae dolor eu justo cursus egestas. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sit amet sapien odio. Sed pellentesque arcu mi, quis malesuada lectus lacinia et. Cras a tempor leo. </p> </td> </tr> </table> </td> </tr> </table> </div> <!--[if (gte mso 9)|(IE)]> </td> </tr> </table> <![endif]--> </td> </tr> <!-- <?php } ?> --> <!-- Footer: 1 column template row --> <tr> <td class="one-column"> <table width="100%" class="footer"> <tr> <td class="inner"> <!-- <?php echo ( wp_kses_post( wptexturize( $fields_values['footer_content'] ) ) ); ?> --> <p> <a>Forward to a Friend</a> <a>Unsubscribe</a> <a>Preferences</a><br /> You are receiving this email because you are either purchased product at WPBC or you entered your email at WPBC </p> </td> </tr> </table> </td> </tr> </table> <!--[if (gte mso 9)|(IE)]> </td> </tr> </table> <![endif]--> </div> </center> </body> <?php // </editor-fold>