Changeset 2842798
- Timestamp:
- 01/03/2023 12:39:59 PM (3 years ago)
- Location:
- cta-builder
- Files:
-
- 6 added
- 7 edited
-
assets/screenshot-7.png (added)
-
assets/screenshot-8.png (added)
-
assets/screenshot-9.png (added)
-
trunk/assets/css/main-style.css (modified) (1 diff)
-
trunk/includes/trs_create_meta_boxes.php (modified) (1 diff)
-
trunk/includes/trs_cta_banner_sizes_render_metabox.php (modified) (1 diff)
-
trunk/includes/trs_cta_register_widget.php (added)
-
trunk/includes/trs_cta_shortcode_render_metabox.php (modified) (1 diff)
-
trunk/includes/trs_shortcode.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/trs_cta_builder.php (modified) (2 diffs)
-
trunk/widgets (added)
-
trunk/widgets/trs_cta_widget.php (added)
Legend:
- Unmodified
- Added
- Removed
-
cta-builder/trunk/assets/css/main-style.css
r2682187 r2842798 23 23 } 24 24 } 25 26 27 /* style for widget banner_size */ 28 .banner { 29 width: 100%; 30 } 31 @media only screen and (min-width: 786px) { 32 .banner[data-banner-size="box"] { 33 width: 500px; 34 } 35 } 36 37 .banner[data-banner-size="full_width"] { 38 width: 100%; 39 max-width: none; 40 } 41 42 43 /* syle for widget banner_position */ 44 45 .banner { 46 /* default position and size */ 47 position: relative; 48 top: 0; 49 left: 0; 50 width: 100%; 51 height: 100%; 52 53 /* other styles for the banner */ 54 background-color: #fff; 55 text-align: center; 56 } 57 58 .banner[data-banner-position="top left"] { 59 top: 50%; 60 left: 0; 61 transform: translateY(-50%); 62 } 63 64 .banner[data-banner-position="top center"] { 65 top: 50%; 66 left: 50%; 67 transform: translate(-50%, -50%); 68 } 69 70 .banner[data-banner-position="top right"] { 71 top: 0; 72 right: 0; 73 left: 50%; 74 } 75 76 .banner[data-banner-position="center left"] { 77 top: 50%; 78 left: 0; 79 transform: translateY(-50%); 80 } 81 82 .banner[data-banner-position="center center"] { 83 top: 0; 84 left: 50%; 85 transform: translateX(-50%); 86 } 87 88 .banner[data-banner-position="center right"] { 89 top: 50%; 90 right: 0; 91 left: 50%; 92 transform: translateY(-50%); 93 } 94 95 .banner[data-banner-position="bottom left"] { 96 bottom: 0; 97 left: 0; 98 } 99 100 .banner[data-banner-position="bottom center"] { 101 bottom: 0; 102 left: 50%; 103 transform: translateX(-50%); 104 } 105 106 .banner[data-banner-position="bottom right"] { 107 bottom: 0; 108 right: 0; 109 left: 50%; 110 } -
cta-builder/trunk/includes/trs_create_meta_boxes.php
r2682187 r2842798 1 1 <?php 2 2 3 /** 3 4 * Create the metabox 4 5 */ 5 if(!function_exists('trs_cta_create_metabox')){ 6 function trs_cta_create_metabox() { 7 8 add_meta_box( 9 'cta_banner_size_metabox', // Metabox ID 10 'Banner Sizes', // Title to display 11 'trs_cta_banner_sizes_render_metabox', // Function to call that contains the metabox content 12 'cta', // Post type to display metabox on 13 'normal', // Where to put it (normal = main colum, side = sidebar, etc.) 14 'default' // Priority relative to other metaboxes 15 ); 6 if (!function_exists('trs_cta_create_metabox')) { 7 function trs_cta_create_metabox() 8 { 16 9 17 add_meta_box( 18 'cta_image_properties_metabox', // Metabox ID 19 'Banner Image Properties', // Title to display 20 'trs_cta_image_properties_render_metabox', // Function to call that contains the metabox content 21 'cta', // Post type to display metabox on 22 'normal', // Where to put it (normal = main colum, side = sidebar, etc.) 23 'default' // Priority relative to other metaboxes 24 ); 25 26 add_meta_box( 27 'cta_text_properties_metabox', // Metabox ID 28 'Banner Text Properties', // Title to display 29 'trs_cta_text_properties_render_metabox', // Function to call that contains the metabox content 30 'cta', // Post type to display metabox on 31 'normal', // Where to put it (normal = main colum, side = sidebar, etc.) 32 'default' // Priority relative to other metaboxes 33 ); 10 add_meta_box( 11 'cta_banner_size_metabox', // Metabox ID 12 'Banner Sizes', // Title to display 13 'trs_cta_banner_sizes_render_metabox', // Function to call that contains the metabox content 14 'cta', // Post type to display metabox on 15 'normal', // Where to put it (normal = main colum, side = sidebar, etc.) 16 'default' // Priority relative to other metaboxes 17 ); 34 18 35 add_meta_box( 36 'cta_shortcode_metabox', // Metabox ID 37 'Shortcode', // Title to display 38 'trs_cta_shortcode_render_metabox', // Function to call that contains the metabox content 39 'cta', // Post type to display metabox on 40 'side', // Where to put it (normal = main colum, side = sidebar, etc.) 41 'default' // Priority relative to other metaboxes 42 ); 19 add_meta_box( 20 'cta_image_properties_metabox', // Metabox ID 21 'Banner Image Properties', // Title to display 22 'trs_cta_image_properties_render_metabox', // Function to call that contains the metabox content 23 'cta', // Post type to display metabox on 24 'normal', // Where to put it (normal = main colum, side = sidebar, etc.) 25 'default' // Priority relative to other metaboxes 26 ); 27 28 add_meta_box( 29 'cta_text_properties_metabox', // Metabox ID 30 'Banner Text Properties', // Title to display 31 'trs_cta_text_properties_render_metabox', // Function to call that contains the metabox content 32 'cta', // Post type to display metabox on 33 'normal', // Where to put it (normal = main colum, side = sidebar, etc.) 34 'default' // Priority relative to other metaboxes 35 ); 36 37 add_meta_box( 38 'cta_shortcode_metabox', // Metabox ID 39 'Shortcode', // Title to display 40 'trs_cta_shortcode_render_metabox', // Function to call that contains the metabox content 41 'cta', // Post type to display metabox on 42 'side', // Where to put it (normal = main colum, side = sidebar, etc.) 43 'default' // Priority relative to other metaboxes 44 ); 45 } 46 add_action('add_meta_boxes', 'trs_cta_create_metabox'); 43 47 } 44 add_action( 'add_meta_boxes', 'trs_cta_create_metabox' );45 } -
cta-builder/trunk/includes/trs_cta_banner_sizes_render_metabox.php
r2682187 r2842798 68 68 69 69 /** 70 71 /**72 70 * Sanitize the submitted data 73 71 * This keeps malicious code out of our database. -
cta-builder/trunk/includes/trs_cta_shortcode_render_metabox.php
r2682187 r2842798 1 1 <?php 2 2 3 /** 3 4 * Render the Shortcode metabox markup 4 5 */ 5 if(!function_exists('trs_cta_shortcode_render_metabox')){ 6 function trs_cta_shortcode_render_metabox() { 7 // Variables 8 global $post; 6 if (!function_exists('trs_cta_shortcode_render_metabox')) { 7 function trs_cta_shortcode_render_metabox() 8 { 9 // Variables 10 global $post; 9 11 ?> 10 12 <!-- Banner Size Field --> 11 <fieldset> 12 <div class="bannerSizesField banneField"> 13 <label for="shortcode_metabox"></label> 13 <fieldset> 14 <div class="bannerSizesField banneField"> 15 <label for="shortcode_metabox"></label> 16 <?php 17 if ('publish' === esc_attr(get_post_status($post->ID))) { 18 ?> 19 <p>[trs_cta_banner id="<?php echo esc_attr($post->ID); ?>"]</p> 20 <?php 21 } 22 ?> 23 </div> 24 </fieldset> 14 25 <?php 15 if( 'publish' === esc_attr( get_post_status( $post->ID ))){ 16 ?> 17 <p>[trs_cta_banner id="<?php echo esc_attr( $post->ID );?>"]</p> 18 <?php 19 } 20 ?> 21 </div> 22 </fieldset> 23 <?php 24 } 25 } 26 } 27 } -
cta-builder/trunk/includes/trs_shortcode.php
r2682187 r2842798 36 36 <!-- Main DIV for style --> 37 37 <div class="cta-section default-size" style=" 38 background: url( '<?php echo esc_attr( get_the_post_thumbnail_url( $post->ID ) )?>');38 background: url(<?php echo get_post_meta( get_the_ID(), 'cta_banner_url', true ); ?>); 39 39 background-color: <?php echo esc_attr( get_post_meta($post->ID, 'cta_bg_color', true ) );?>; 40 40 border: <?php echo esc_attr( get_post_meta($post->ID, 'cta_border', true ) ).' '.esc_attr( get_post_meta($post->ID, 'cta_border_color', true ) ) ;?>; -
cta-builder/trunk/readme.txt
r2697008 r2842798 1 === Call -to-action Builder===1 === Call To Action Builder=== 2 2 Contributors: therightsw, muhammad-jamil-baig 3 3 Donate link: https://therightsw.com/ 4 4 Tags: banner, cta, call-to-action, images, page, links, fonts, colors, shortcode, click, count, heading, sub-heading 5 5 Requires at least: 5.2 6 Tested up to: 5.97 Stable tag: 1. 06 Tested up to: 6.1 7 Stable tag: 1.1 8 8 Requires PHP: 7.2 9 9 License: GPLv2 or later … … 15 15 CTA (call-to-action) Builder plugin allows you to create HTML5 clickable banners and add to your pages with shortcode. It is user friendly. User can set heading & sub-heading text, User can set font size, font color, text alignment, font family, image size, image position, border, border color, background color. This plugin will generate a shortcode which can be used in any page or template. Shows number of clicks in admin. 16 16 17 Every self-respected businessman should have an elegant and colorful banner on website to attract more customers. With the Banner widget of the Call To Action plugin, you will be able to display all the information you need with a background image in just a few clicks.Moreover You can add backgorund color for banner If you don't want to insert banner image. 18 19 Step 1 — Add the Banner widget ot the page 20 21 Open your website’s dashboard and find the page where you want to place a banner. Use the search field at the top to locate the Banner widget when you open it in the Elementor page builder. Drag & drop it to the desired location on the page. 22 23 Step 2 — Choose the content and define settings 24 25 Open the Content menu tab in the left-side menu, then expand the Content section. 26 27 Let's look over the features this section has to offer: 28 29 * Banner Size. you can select banner size here from drop down. 30 * Bannere Position. You can select banner posiyion here from drop down. 31 * Image. The background image from your media library can be chosen here. 32 * Image Size. The size of the image can be selected from this drop down menu. 33 * Heading. The text you enter here will appear above the banner image as a title. 34 * Sub Heading. You can insert an explanation or notification here if the banner needs it. Along with the image, the text will be displayed over the banner image. 35 * Link.If your banner is supposed to lead the user to a certain page insert the link to it here 36 37 The last step is to style your banner up. Proceed to the Style tab and create your perfect banner design. 38 17 39 For more info about WordPress plugin development, visit The Right Software [plugin development services](https://therightsw.com/plugin-development/) page. 18 40 View other [WordPress Plugins](https://profiles.wordpress.org/therightsw/#content-plugins). 19 41 Send your problems to [hello@therightsw.com](mailto:hello@therightsw.com). Dont forget to mention WordPress and WooCommerce versions. 20 42 21 Tested on WP 5.943 Tested on WP 6.1 22 44 23 = Version 1. 0=24 * InitialPlugin Release45 = Version 1.1 = 46 * Updated Plugin Release 25 47 26 48 == Installation == -
cta-builder/trunk/trs_cta_builder.php
r2697007 r2842798 1 1 <?php 2 2 3 /** 3 * Plugin Name: C TA Builder4 * Plugin Name: Call To Action 4 5 * Plugin URI: https://therightsw.com/plugin-development/ 5 6 * Description: This **TRS CTA Builder** call-to-action plugin allows you to create HTML5 clickable banners and add to your pages with shortcode. It is user friendly. User can set heading & sub-heading text, User can set font size, font color, text alignment, font family, image size, image position, border, border color, background color. This plugin will generate a shortcode which can be used in any page or template. Shows number of clicks in admin. 6 * Version: 1. 07 * Version: 1.1 7 8 * Requires at least: 5.2 8 9 * Requires PHP: 7.2 … … 10 11 * Author URI: https://therightsw.com/plugin-development/ 11 12 * License: GPL v2 or later 13 * Text Domain: Call To Action 12 14 */ 13 14 include( plugin_dir_path( __FILE__ ) . 'trs_cta_activate.php');15 15 16 include( plugin_dir_path( __FILE__ ) . 'includes/trs_cta_post_type.php');16 include(plugin_dir_path(__FILE__) . 'trs_cta_activate.php'); 17 17 18 include( plugin_dir_path( __FILE__ ) . 'functions.php');18 include(plugin_dir_path(__FILE__) . 'includes/trs_cta_post_type.php'); 19 19 20 include( plugin_dir_path( __FILE__ ) . 'includes/trs_create_meta_boxes.php');20 include(plugin_dir_path(__FILE__) . 'functions.php'); 21 21 22 include( plugin_dir_path( __FILE__ ) . 'includes/trs_cta_image_properties_render_metabox.php');22 include(plugin_dir_path(__FILE__) . 'includes/trs_create_meta_boxes.php'); 23 23 24 include( plugin_dir_path( __FILE__ ) . 'includes/trs_cta_text_properties_render_metabox.php');24 include(plugin_dir_path(__FILE__) . 'includes/trs_cta_image_properties_render_metabox.php'); 25 25 26 include( plugin_dir_path( __FILE__ ) . 'includes/trs_cta_banner_sizes_render_metabox.php');26 include(plugin_dir_path(__FILE__) . 'includes/trs_cta_text_properties_render_metabox.php'); 27 27 28 include( plugin_dir_path( __FILE__ ) . 'includes/trs_cta_shortcode_render_metabox.php');28 include(plugin_dir_path(__FILE__) . 'includes/trs_cta_banner_sizes_render_metabox.php'); 29 29 30 include( plugin_dir_path( __FILE__ ) . 'includes/trs_shortcode.php');30 include(plugin_dir_path(__FILE__) . 'includes/trs_cta_shortcode_render_metabox.php'); 31 31 32 include( plugin_dir_path( __FILE__ ) . 'includes/trs_cta_counter.php');32 include(plugin_dir_path(__FILE__) . 'includes/trs_shortcode.php'); 33 33 34 include( plugin_dir_path( __FILE__ ) . 'trs_cta_uninstall.php'); 34 include(plugin_dir_path(__FILE__) . 'includes/trs_cta_counter.php'); 35 36 include(plugin_dir_path(__FILE__) . 'trs_cta_uninstall.php'); 37 38 include(plugin_dir_path(__FILE__) . 'includes/trs_cta_register_widget.php');
Note: See TracChangeset
for help on using the changeset viewer.