Changeset 2207376
- Timestamp:
- 12/06/2019 07:38:18 PM (6 years ago)
- Location:
- promissa/trunk
- Files:
-
- 9 edited
-
languages/promissa-nl_NL.mo (modified) (previous)
-
languages/promissa-nl_NL.po (modified) (3 diffs)
-
languages/promissa.pot (modified) (2 diffs)
-
promissa.php (modified) (5 diffs)
-
readme.txt (modified) (3 diffs)
-
shortcodes/calendar.php (modified) (9 diffs)
-
shortcodes/css/popper.css (modified) (1 diff)
-
shortcodes/upcoming_mass.php (modified) (2 diffs)
-
widgets/upcoming_mass.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
promissa/trunk/languages/promissa-nl_NL.po
r2188093 r2207376 2 2 msgstr "" 3 3 "Project-Id-Version: Pro Missa\n" 4 "POT-Creation-Date: 2019-1 1-08 00:04+0100\n"5 "PO-Revision-Date: 2019-1 1-08 00:04+0100\n"4 "POT-Creation-Date: 2019-12-06 19:22+0100\n" 5 "PO-Revision-Date: 2019-12-06 19:22+0100\n" 6 6 "Last-Translator: Kerk en IT <info@kerkenit.nl>\n" 7 7 "Language-Team: Marco van 't Klooster <info@kerkenit.nl>\n" … … 105 105 msgstr "zondags" 106 106 107 #. Plugin Name of the plugin/theme 108 #: promissa.php:97 promissa.php:98 107 #: promissa.php:86 promissa.php:87 109 108 msgid "Pro Missa" 110 109 msgstr "Pro Missa" … … 198 197 msgstr "Toon aanwezigen:" 199 198 200 #. Plugin URI of the plugin/theme 201 msgid "https://www.promissa.nl/plugins/wordpress" 202 msgstr "https://www.promissa.nl/plugins/wordpress" 203 204 #. Description of the plugin/theme 205 msgid "" 206 "This plugin will give you shortcodes and widgets with the latest masses and " 207 "events of Pro Missa." 208 msgstr "" 209 "Deze plug-in geeft je shortcodes en widgets met de nieuwste missen en " 210 "evenementen van Pro Missa." 211 212 #. Author of the plugin/theme 213 msgid "Kerk en IT" 214 msgstr "Kerk en IT" 215 216 #. Author URI of the plugin/theme 217 msgid "https://www.kerkenit.nl" 218 msgstr "https://www.kerkenit.nl" 199 #~ msgid "https://www.promissa.nl/plugins/wordpress" 200 #~ msgstr "https://www.promissa.nl/plugins/wordpress" 201 202 #~ msgid "" 203 #~ "This plugin will give you shortcodes and widgets with the latest masses " 204 #~ "and events of Pro Missa." 205 #~ msgstr "" 206 #~ "Deze plug-in geeft je shortcodes en widgets met de nieuwste missen en " 207 #~ "evenementen van Pro Missa." 208 209 #~ msgid "Kerk en IT" 210 #~ msgstr "Kerk en IT" 211 212 #~ msgid "https://www.kerkenit.nl" 213 #~ msgstr "https://www.kerkenit.nl" 219 214 220 215 #~ msgid "Every" -
promissa/trunk/languages/promissa.pot
r2188093 r2207376 4 4 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" 5 5 "Project-Id-Version: Pro Missa\n" 6 "POT-Creation-Date: 2019-1 1-08 00:03+0100\n"6 "POT-Creation-Date: 2019-12-06 19:22+0100\n" 7 7 "PO-Revision-Date: 2019-07-29 16:31+0200\n" 8 8 "Last-Translator: Kerk en IT <info@kerkenit.nl>\n" … … 104 104 105 105 #. Plugin Name of the plugin/theme 106 #: promissa.php: 97 promissa.php:98106 #: promissa.php:86 promissa.php:87 107 107 msgid "Pro Missa" 108 108 msgstr "" -
promissa/trunk/promissa.php
r2207322 r2207376 4 4 Plugin URI: https://www.promissa.nl/plugins/wordpress 5 5 Description: This plugin will give you shortcodes and widgets with the latest masses and events of Pro Missa. 6 Version: 1.2. 46 Version: 1.2.5 7 7 Author: Kerk en IT 8 8 Author URI: https://www.kerkenit.nl 9 9 Text Domain: promissa 10 Domain Path: languages10 Domain Path: /languages 11 11 License: GPL2 12 12 */ … … 28 28 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 29 29 */ 30 setlocale(LC_ALL, get_locale()); 30 31 31 if ( ! defined( 'PROMISSA_FILE' ) ) { 32 if (!defined( 'PROMISSA_FILE' ) ) 33 { 32 34 define( 'PROMISSA_FILE', __FILE__ ); 33 35 } 34 36 35 if ( ! defined( 'PROMISSA_PATH' ) ) { 36 define( 'PROMISSA_PATH', plugin_dir_path( PROMISSA_FILE ) ); 37 } 38 39 if ( ! defined( 'PROMISSA_BASENAME' ) ) { 40 define( 'PROMISSA_BASENAME', plugin_basename( PROMISSA_FILE ) ); 41 } 42 43 if ( ! defined( 'PROMISSA_URL' ) ) { 44 define( 'PROMISSA_URL', plugin_dir_url( PROMISSA_FILE) ); 45 } 46 47 if ( ! defined( 'PROMISSA_SLUG' ) ) { 48 define( 'PROMISSA_SLUG', 'promissa' ); 49 } 50 51 if ( ! defined( 'PROMISSA_NAME' ) ) { 52 define( 'PROMISSA_NAME', 'promissa' ); 53 } 54 55 if ( ! defined( 'PROMISSA_LANG' ) ) { 56 //define( 'PROMISSA_LANG', basename( dirname(__FILE__) ).'/languages/' ); 57 define( 'PROMISSA_LANG', PROMISSA_NAME . '/languages/' ); 58 } 59 load_plugin_textdomain( 'promissa', false, PROMISSA_LANG ); 60 61 class ProMissa { 62 63 static function init() { 64 global $wpdb; 65 load_plugin_textdomain( 'promissa', false, basename( dirname(__FILE__) ).'/languages/' ); 66 67 } 68 static function activation() { 69 self::init(); 70 } 71 static function deactivation() { 72 return true; 73 } 74 static function uninstall() { 75 self::init(); 76 } 77 } 78 register_activation_hook( PROMISSA_FILE, array( 'ProMissa', 'activation' ) ); 79 register_deactivation_hook( PROMISSA_FILE, array( 'ProMissa', 'deactivation' ) ); 80 register_uninstall_hook( PROMISSA_FILE, array( 'ProMissa', 'uninstall' ) ); 81 82 83 if (!function_exists('ProMissa_add_menu_items')) { 84 85 function ProMissa_add_menu_items() { 37 if (!function_exists('ProMissa_add_menu_items')) 38 { 39 function ProMissa_add_menu_items() 40 { 86 41 add_options_page( 87 42 __('Pro Missa', 'promissa'), … … 103 58 } 104 59 105 if (!function_exists('ProMissa_init')) { 106 function ProMissa_init() { 60 if (!function_exists('ProMissa_init')) 61 { 62 function ProMissa_init() 63 { 107 64 require_once( dirname( PROMISSA_FILE) . '/functions.php' ); 108 65 require_once( dirname( PROMISSA_FILE) . '/admin/settings.php' ); … … 110 67 } 111 68 112 function register_ProMissa_parish_widgets() { 69 function register_ProMissa_widgets() 70 { 113 71 register_widget( 'ProMissa_UpcommingMassTimes_Widget' ); 114 72 } … … 118 76 add_action('wp_footer', 'flush_ob_end'); 119 77 endif; 78 120 79 add_action('init', 'ProMissa_init'); 121 80 add_action('admin_menu', 'ProMissa_add_menu_items'); 122 add_action('widgets_init', 'register_ProMissa_ parish_widgets' );81 add_action('widgets_init', 'register_ProMissa_widgets' ); 123 82 ?> -
promissa/trunk/readme.txt
r2207322 r2207376 9 9 Requires at least: 5.2.1 10 10 Tested up to: 5.3 11 Stable tag: 1.2. 411 Stable tag: 1.2.5 12 12 Requires PHP: 5.2.4 13 Requires at least: 4.6 13 14 14 15 This plugin will give you shortcodes and widgets with the latest masses and events of Pro Missa. … … 16 17 == Description == 17 18 18 This plugin will show all the times of masses who are stored in Pro Missa.19 This plugin will show all the times of masses who are stored in Pro Missa. 19 20 This plugins will enable a shortcode and a widget with the upcoming events in your parish. 20 21 You can add multiple widgets to your theme of add a shortcode in you homepage. … … 80 81 == Changelog == 81 82 83 = 1.2.5 = 84 85 * Translations 86 * Optimised code 87 82 88 = 1.2.4 = 83 89 -
promissa/trunk/shortcodes/calendar.php
r2207291 r2207376 1 1 <?php 2 2 define('FULLCALENDER', '4.2.0'); 3 setlocale(LC_ALL, 'nl_NL');4 3 $ProMissaEvents = array(); 5 4 if(!function_exists('promissa_calendar_handler')) : 6 function promissa_calendar_handler( $atts, $content = null ) {7 load_plugin_textdomain( 'promissa', false, PROMISSA_LANG);5 function promissa_calendar_handler( $atts, $content = null ) 6 { 8 7 $atts_extended = shortcode_atts( array( 9 8 'church_id' => '', … … 21 20 else : 22 21 $masses = ProMissaREST('Calendar', '?size=' . $limit); 22 23 //var_dump($masses); 23 24 endif; 24 25 $output = ''; … … 43 44 wp_enqueue_script( 'fullcalender-daygrid', 'https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/' . FULLCALENDER . '/daygrid/main.min.js', array ( 'fullcalender-core' ), FULLCALENDER, true); 44 45 wp_enqueue_script( 'fullcalender-timegrid', 'https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/' . FULLCALENDER . '/timegrid/main.min.js', array ( 'fullcalender-core' ), FULLCALENDER, true); 45 //wp_enqueue_script( 'fullcalender-list', 'https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/' . FULLCALENDER . '/list/main.min.js', array ( 'fullcalender-core' ), FULLCALENDER, true);46 46 wp_enqueue_script( 'popper', 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.15.0/umd/popper.min.js', array ( 'jquery' ), '1.15.0', true); 47 47 wp_enqueue_script( 'tooltip', 'https://cdnjs.cloudflare.com/ajax/libs/tooltip.js/1.3.2/umd/tooltip.min.js', array ( 'popper' ), '1.3.2', true); … … 52 52 wp_enqueue_style( 'fullcalender', 'https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/' . FULLCALENDER . '/daygrid/main.min.css', false,FULLCALENDER,'all'); 53 53 wp_enqueue_style( 'fullcalender', 'https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/' . FULLCALENDER . '/timegrid/main.min.css', false,FULLCALENDER,'all'); 54 //wp_enqueue_style( 'fullcalender', 'https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/' . FULLCALENDER . '/list/main.min.css', false,FULLCALENDER,'all');55 56 57 54 58 55 if(count($masses) > 0) : 56 $dateFormatter = \IntlDateFormatter::create( 57 Locale::getDefault(), 58 IntlDateFormatter::NONE, 59 IntlDateFormatter::NONE, 60 date_default_timezone_get(), 61 IntlDateFormatter::GREGORIAN, 62 'cccc d MMMM Y' 63 ); 59 64 60 $dateFormatter = \IntlDateFormatter::create(61 Locale::getDefault(),62 IntlDateFormatter::NONE,63 IntlDateFormatter::NONE,64 date_default_timezone_get(),65 IntlDateFormatter::GREGORIAN,66 'cccc d MMMM Y'67 );68 65 foreach($masses as $mass) 69 66 { … … 75 72 $ProMissaEvents[] = array( 76 73 'id' => $mass['ID'], 77 'title' => $mass['massType']. ' (' . (strlen($mass['short']) > 2 ? substr($mass['short'], 0, 2) : $mass['short']) . ')',74 'title' => (!empty($mass['note']) ? $mass['note'] : $mass['massType']) . ' (' . (strlen($mass['short']) > 2 ? substr($mass['short'], 0, 2) : $mass['short']) . ')', 78 75 //'tooltip' => "<span><strong>" . (!empty($mass['note']) ? $mass['massType'] : (!empty($mass['memo']) ? Trim($mass['memo']) : Trim($mass['massType']))) . "</strong></span><br />Locatie: <strong>" . $mass['church'] . "</strong><br />Datum: <strong>" . $dateFormatter->format($date) . "</strong><br />Aanvang: <strong>" .$date->format('H.i\\u') . "</strong>", 79 'tooltip' => "<table><tr><th colspan=\"2\">" . (!empty($mass['note']) ? $mass['note'] : (!empty($mass['memo']) ? Trim($mass['memo']) : Trim($mass['massType']))) . "</th></tr><tr><td>" . __('Location', 'promissa') . ": </td><td>" . $mass['church'] . "</td></tr><tr><td>" . __('Date', 'promissa') . ": </td><td>" . $dateFormatter->format($date) . "</td></tr><tr><td>" . __('Time', 'promissa') . ": </td><td>" .$date->format('H.i\\u') . "</td></tr></table>", 76 'tooltip' => "<table><tr><th colspan=\"2\">" . (!empty($mass['note']) ? $mass['note'] : (!empty($mass['memo']) ? Trim($mass['memo']) : Trim($mass['massType']))) . "</th></tr><tr><td>" . __('Location', 'promissa') . ": </td><td>" . $mass['church'] . "</td></tr><tr><td>" . __('Date', 'promissa') . ": </td><td>" . $dateFormatter->format($date) . "</td></tr><tr><td>" . __('Time', 'promissa') . ": </td><td>" .$date->format('H.i\\u') . "</td></tr>" . 77 (!empty($mass['note']) && !empty($mass['memo']) ? 78 "<tr><td>" . __('Note', 'promissa') . ": </td><td>" . Trim($mass['memo']) . "</td></tr>" : "") . 79 "</table>", 80 80 81 81 'start' => jsDateTime($mass['start']), … … 89 89 $output = json_encode($ProMissaEvents); 90 90 91 92 93 91 return '<div id="calendar"></div>'; 94 92 endif; … … 98 96 } 99 97 endif; 98 100 99 function footer_script(){ 101 100 global $ProMissaEvents; ?> … … 104 103 105 104 add_action('wp_footer', 'footer_script'); 106 107 function head_style(){ ?>108 <style type="text/css" media="screen">109 110 111 </style>112 <?php }113 105 add_action( 114 106 'wp_enqueue_scripts', … … 127 119 } 128 120 129 remove_shortcode( 'promissa-calendar' );130 121 add_shortcode( 'promissa-calendar', 'promissa_calendar_handler' ); 131 122 ?> -
promissa/trunk/shortcodes/css/popper.css
r2188531 r2207376 1 .popper,.tooltip{position:absolute;z-index:9999;background:rgba(0,0,0,.75);color:#FFFFFF;min-width:150px;border-radius:3px;box-shadow:0 0 2px rgba(0,0,0,0.5);padding:10px;text-align:left}.style5 .tooltip{background:#333;color:#FFFFFF;max-width:200px;width:auto;font-size:0.8rem;padding:0.5em 1em}.popper .popper__arrow,.tooltip .tooltip-arrow{width:0;height:0;border-style:solid;position:absolute;margin:5px}.popper .popper__arrow,.tooltip .tooltip-arrow{border-color:#333}.style5 .tooltip .tooltip-arrow{border-color:#222}.popper[x-placement^="top"],.tooltip[x-placement^="top"]{margin-bottom:5px}.popper[x-placement^="top"] .popper__arrow,.tooltip[x-placement^="top"] .tooltip-arrow{border-width:5px 5px 0 5px;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent;bottom:-5px;left:calc(50% - 5px);margin-top:0;margin-bottom:0}.popper[x-placement^="bottom"],.tooltip[x-placement^="bottom"]{margin-top:5px}.tooltip[x-placement^="bottom"] .tooltip-arrow,.popper[x-placement^="bottom"] .popper__arrow{border-width:0 5px 5px 5px;border-left-color:transparent;border-right-color:transparent;border-top-color:transparent;top:-5px;left:calc(50% - 5px);margin-top:0;margin-bottom:0}.tooltip[x-placement^="right"],.popper[x-placement^="right"]{margin-left:5px}.popper[x-placement^="right"] .popper__arrow,.tooltip[x-placement^="right"] .tooltip-arrow{border-width:5px 5px 5px 0;border-left-color:transparent;border-top-color:transparent;border-bottom-color:transparent;left:-5px;top:calc(50% - 5px);margin-left:0;margin-right:0}.popper[x-placement^="left"],.tooltip[x-placement^="left"]{margin-right:5px}.popper[x-placement^="left"] .popper__arrow,.tooltip[x-placement^="left"] .tooltip-arrow{border-width:5px 0 5px 5px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;right:-5px;top:calc(50% - 5px);margin-left:0;margin-right:0}.tooltip-inner table tr th{font-size:125%;text-align:center}.tooltip-inner table,.tooltip-inner table tr,.tooltip-inner table tr > td,.tooltip-inner table tr > th{border:none !important}#calendar .fc-timeGridDay-view .fc-content-skeleton,#calendar .fc-timeGridWeek-view .fc-content-skeleton{position:absolute;top:0}#calendar .fc-list-view .fc-list-heading-alt{margin-left:3px}#calendar table,#calendar table tbody,#calendar table tbody tr,#calendar table tbody tr td,#calendar table thead,#calendar table thead tr,#calendar table thead tr td{background:transparent !important}#calendar table tbody tr td {border:1px solid #ddd !important}#calendar table{margin-bottom:0 !important}1 .popper,.tooltip{position:absolute;z-index:9999;background:rgba(0,0,0,.75);color:#FFFFFF;min-width:150px;border-radius:3px;box-shadow:0 0 2px rgba(0,0,0,0.5);padding:10px;text-align:left}.style5 .tooltip{background:#333;color:#FFFFFF;max-width:200px;width:auto;font-size:0.8rem;padding:0.5em 1em}.popper .popper__arrow,.tooltip .tooltip-arrow{width:0;height:0;border-style:solid;position:absolute;margin:5px}.popper .popper__arrow,.tooltip .tooltip-arrow{border-color:#333}.style5 .tooltip .tooltip-arrow{border-color:#222}.popper[x-placement^="top"],.tooltip[x-placement^="top"]{margin-bottom:5px}.popper[x-placement^="top"] .popper__arrow,.tooltip[x-placement^="top"] .tooltip-arrow{border-width:5px 5px 0 5px;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent;bottom:-5px;left:calc(50% - 5px);margin-top:0;margin-bottom:0}.popper[x-placement^="bottom"],.tooltip[x-placement^="bottom"]{margin-top:5px}.tooltip[x-placement^="bottom"] .tooltip-arrow,.popper[x-placement^="bottom"] .popper__arrow{border-width:0 5px 5px 5px;border-left-color:transparent;border-right-color:transparent;border-top-color:transparent;top:-5px;left:calc(50% - 5px);margin-top:0;margin-bottom:0}.tooltip[x-placement^="right"],.popper[x-placement^="right"]{margin-left:5px}.popper[x-placement^="right"] .popper__arrow,.tooltip[x-placement^="right"] .tooltip-arrow{border-width:5px 5px 5px 0;border-left-color:transparent;border-top-color:transparent;border-bottom-color:transparent;left:-5px;top:calc(50% - 5px);margin-left:0;margin-right:0}.popper[x-placement^="left"],.tooltip[x-placement^="left"]{margin-right:5px}.popper[x-placement^="left"] .popper__arrow,.tooltip[x-placement^="left"] .tooltip-arrow{border-width:5px 0 5px 5px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;right:-5px;top:calc(50% - 5px);margin-left:0;margin-right:0}.tooltip-inner table tr th{font-size:125%;text-align:center}.tooltip-inner table,.tooltip-inner table tr,.tooltip-inner table tr > td,.tooltip-inner table tr > th{border:none !important}#calendar .fc-timeGridDay-view .fc-content-skeleton,#calendar .fc-timeGridWeek-view .fc-content-skeleton{position:absolute;top:0}#calendar .fc-list-view .fc-list-heading-alt{margin-left:3px}#calendar table,#calendar table tbody,#calendar table tbody tr,#calendar table tbody tr td,#calendar table thead,#calendar table thead tr,#calendar table thead tr td{background:transparent !important}#calendar table tbody tr td.fc-today{background:#fcf8e3 !important;}#calendar table tbody tr td{border:1px solid #ddd !important}#calendar table{margin-bottom:0 !important} -
promissa/trunk/shortcodes/upcoming_mass.php
r2136288 r2207376 1 1 <?php 2 2 3 4 setlocale(LC_ALL, 'nl_NL');5 3 if(!function_exists('promissa_upcoming_masses_handler')) : 6 function promissa_upcoming_masses_handler( $atts, $content = null ) {7 load_plugin_textdomain( 'promissa', false, PROMISSA_LANG);4 function promissa_upcoming_masses_handler( $atts, $content = null ) 5 { 8 6 $atts_extended = shortcode_atts( array( 9 7 'church_id' => '', … … 91 89 } 92 90 endif; 93 remove_shortcode( 'promissa-upcoming-masses' );94 91 add_shortcode( 'promissa-upcoming-masses', 'promissa_upcoming_masses_handler' ); 95 92 ?> -
promissa/trunk/widgets/upcoming_mass.php
r2136288 r2207376 8 8 * Register widget with WordPress. 9 9 */ 10 function __construct() { 11 12 load_plugin_textdomain( 'promissa', false, PROMISSA_LANG); 10 function __construct() 11 { 13 12 $widget_ops = array('classname' => 'promissa_widget_masses promissa_upcoming_masses', 'description' => __( 'This widget will show the upcoming mass times. This is recommended if your primary target audience are seekers to faith.', 'promissa' )); 14 13 parent::__construct(
Note: See TracChangeset
for help on using the changeset viewer.