Plugin Directory

Changeset 3183695


Ignore:
Timestamp:
11/07/2024 10:10:27 AM (16 months ago)
Author:
investi
Message:

add 'latest-presentation' widget shortcode

Location:
investi/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • investi/trunk/includes/widgets.php

    r3118753 r3183695  
    279279    ";
    280280}
     281
     282function investi_interactive_announcements_func( $atts ) {
     283 
     284  $dateFormat = $atts['date-format'] ?? '';;
     285  if(empty($dateFormat)){
     286    $dateFormat = "dd MMM yyyy";
     287  }
     288  $announcementsPerPage = $atts['announcements-per-page'] ?? '';
     289  $headerTitle = $atts['announcement-header-title'] ?? ' ';
     290  $commentsWording = $atts['comments-wording'] ?? '';
     291 
     292  $filterRegex = $atts['filter-regex'] ?? '';
     293 
     294  $searchBox = investi_is_flag('searchbox', $atts ) ? 'data-investi-searchbox' : '';
     295  $noComments = investi_is_flag('no-comments', $atts ) ? 'data-investi-no-comments' : '';
     296 
     297  return "
     298 
     299 
     300  <div class=\"investi-interactive-announcements\"
     301  data-investi-announcements-per-page=\"$announcementsPerPage\"
     302  data-investi-announcement-header-title=\"$headerTitle\"
     303  data-investi-comments-wording=\"$commentsWording\"
     304  data-investi-filter-regex=\"$filterRegex\"
     305  data-investi-announcement-date-format=\"$dateFormat\"
     306  $searchBox
     307  $noComments
     308  ></div>
     309  ";
     310}
     311
     312function investi_latest_presentation_func( $atts ) {
     313 
     314  $dateFormat = $atts['date-format'] ?? '';;
     315  if(empty($dateFormat)){
     316    $dateFormat = "dd MMM yyyy";
     317  }
     318  $announcementsPerPage = $atts['announcements-per-page'] ?? '';
     319  $headerTitle = $atts['announcement-header-title'] ?? ' ';
     320  $commentsWording = $atts['comments-wording'] ?? '';
     321 
     322  $filterRegex = $atts['filter-regex'] ?? '';
     323
     324  $imageWidth = $atts['image-width'] ?? '';;
     325  if(!empty($imageWidth)){
     326    $imageWidth = 'data-investi-latest-presentation-image-width='.$imageWidth;
     327  }
     328
     329  $imageHeight = $atts['image-height'] ?? '';;
     330  if(!empty($imageHeight)){
     331    $imageHeight = 'data-investi-latest-presentation-image-height='.$imageHeight;
     332  }
     333   
     334 
     335  return "
     336 
     337 
     338  <div class=\"investi-latest-presentation\"
     339 
     340  data-investi-filter-regex=\"$filterRegex\"
     341  data-investi-announcement-date-format=\"$dateFormat\"
     342  $imageWidth
     343  $imageHeight
     344  ></div>
     345  ";
     346}
  • investi/trunk/investi.php

    r3118753 r3183695  
    77* Plugin URI: https://web.investi.com.au/wordpress-plugin
    88* Description: Share Price Charts and Widgets. Our comprehensive and timely data quickly summarises your current and historical share price performance,displaying charts and widgets to enhance engagement with your investor audience.
    9 * Version: 1.0.6
     9* Version: 1.0.7
    1010* Author: Investi Services Pty Ltd
    1111* Author URI: https://web.investi.com.au
     
    130130add_shortcode( 'investi-share-price-bid', 'investi_share_price_bid_func' );
    131131add_shortcode( 'investi-share-price-updated', 'investi_share_price_updated_func' );
     132add_shortcode( 'investi-interactive-announcements', 'investi_interactive_announcements_func' );
     133add_shortcode( 'investi-latest-presentation', 'investi_latest_presentation_func' );
  • investi/trunk/readme.txt

    r3118753 r3183695  
    66Requires PHP:      7.2
    77Tested up to: 6.4.1
    8 Stable tag: 1.0.6
    9 Version: 1.0.6
     8Stable tag: 1.0.7
     9Version: 1.0.7
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1515== Description ==
    1616
    17 Share price charts and announcement widgets for the ASX, LSE, AIM & FSE. Our comprehensive and timely data quickly summarises your current and historical share price performance,displaying charts and widgets to enhance engagement with your investor audience.
     17Share price charts and announcement widgets for the ASX, LSE/AIM, TSXV, FSE and OTCmarkets. Our comprehensive and timely data quickly summarises your current and historical share price performance,displaying charts and widgets to enhance engagement with your investor audience.
    1818
    1919== Installation ==
     
    4949== Changelog ==
    5050
     51= 1.0.7 =
     52* add 'latest-presentation' widget shortcode
     53
    5154= 1.0.6 =
    5255* add priceSensitiveOnly flag to accordion widget
Note: See TracChangeset for help on using the changeset viewer.