From 4143858726ded2ee2937fc4fede94a8d73101680 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Thu, 11 Feb 2021 12:01:24 -0600 Subject: [PATCH 01/20] Admin: float submenu dividers to fix WordPress 5.7 comflict. This commit applies additional CSS to (and around) submenu items to improve compatibility with WordPress 5.6 and 5.7. --- .../includes/admin/assets/css/ltr/sc-menu.css | 43 ++++++++++++++----- .../admin/assets/css/min/ltr/sc-menu.css | 2 +- .../admin/assets/css/min/rtl/sc-menu.css | 2 +- .../includes/admin/assets/css/rtl/sc-menu.css | 43 ++++++++++++++----- 4 files changed, 68 insertions(+), 22 deletions(-) diff --git a/sugar-calendar/includes/admin/assets/css/ltr/sc-menu.css b/sugar-calendar/includes/admin/assets/css/ltr/sc-menu.css index 39601284..31560206 100644 --- a/sugar-calendar/includes/admin/assets/css/ltr/sc-menu.css +++ b/sugar-calendar/includes/admin/assets/css/ltr/sc-menu.css @@ -3,22 +3,33 @@ /* Secondary Separators */ #adminmenu ul > li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after, -#adminmenu ul > li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after +#adminmenu ul > li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after, +#adminmenu ul > li:last-child a[href^="admin.php?page=sc-addons"]:before { display: block; - border-bottom: 1px solid rgba(255,255,255,0.2); - height: 14px; - margin: 0 -13px; + margin: 13px -15px 8px -15px; content: ''; + float: left; + width: calc(100% + 30px); +} + +/* Bottom Separators */ +#adminmenu ul > li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after, +#adminmenu ul > li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after +{ + border-bottom: 1px solid rgba(255,255,255,0.2); } +/* Top Separator */ #adminmenu ul > li:last-child a[href^="admin.php?page=sc-addons"]:before { - display: block; border-top: 1px solid rgba(255,255,255,0.2); - height: 14px; - margin: 0 -13px; - content: ''; +} + +/* WordPress 5.7 fix for left-shadow on hover */ +#adminmenu li.toplevel_page_sugar-calendar ul.wp-submenu-wrap li +{ + clear: both; } /* Hide Parent Arrow */ @@ -32,11 +43,23 @@ ul#adminmenu #toplevel_page_sugar-calendar ul.wp-submenu li.current a:before { right: 0; border: solid 8px transparent; - content: " "; + content: ''; height: 0; width: 0; position: absolute; pointer-events: none; border-right-color: #f1f1f1; margin-top: 2px; -} \ No newline at end of file +} + +@media screen and (max-width: 782px) { + + /* Small Screen Separator */ + #adminmenu ul > li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after, + #adminmenu ul > li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after, + #adminmenu ul > li:last-child a[href^="admin.php?page=sc-addons"]:before + { + margin: 20px -20px 8px -20px; + width: calc(100% + 40px); + } +} diff --git a/sugar-calendar/includes/admin/assets/css/min/ltr/sc-menu.css b/sugar-calendar/includes/admin/assets/css/min/ltr/sc-menu.css index d993b739..36d5ce92 100644 --- a/sugar-calendar/includes/admin/assets/css/min/ltr/sc-menu.css +++ b/sugar-calendar/includes/admin/assets/css/min/ltr/sc-menu.css @@ -1 +1 @@ -#adminmenu ul>li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after,#adminmenu ul>li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after{display:block;border-bottom:1px solid rgba(255,255,255,.2);height:14px;margin:0 -13px;content:''}#adminmenu ul>li:last-child a[href^="admin.php?page=sc-addons"]:before{display:block;border-top:1px solid rgba(255,255,255,.2);height:14px;margin:0 -13px;content:''}ul#adminmenu #toplevel_page_sugar-calendar a.wp-has-current-submenu:after{display:none}ul#adminmenu #toplevel_page_sugar-calendar ul.wp-submenu li.current a:before{right:0;border:solid 8px transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#f1f1f1;margin-top:2px} \ No newline at end of file +#adminmenu ul>li:last-child a[href^="admin.php?page=sc-addons"]:before,#adminmenu ul>li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after,#adminmenu ul>li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after{display:block;margin:13px -15px 8px -15px;content:'';float:left;width:calc(100% + 30px)}#adminmenu ul>li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after,#adminmenu ul>li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after{border-bottom:1px solid rgba(255,255,255,.2)}#adminmenu ul>li:last-child a[href^="admin.php?page=sc-addons"]:before{border-top:1px solid rgba(255,255,255,.2)}#adminmenu li.toplevel_page_sugar-calendar ul.wp-submenu-wrap li{clear:both}ul#adminmenu #toplevel_page_sugar-calendar a.wp-has-current-submenu:after{display:none}ul#adminmenu #toplevel_page_sugar-calendar ul.wp-submenu li.current a:before{right:0;border:solid 8px transparent;content:'';height:0;width:0;position:absolute;pointer-events:none;border-right-color:#f1f1f1;margin-top:2px}@media screen and (max-width:782px){#adminmenu ul>li:last-child a[href^="admin.php?page=sc-addons"]:before,#adminmenu ul>li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after,#adminmenu ul>li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after{margin:20px -20px 8px -20px;width:calc(100% + 40px)}} \ No newline at end of file diff --git a/sugar-calendar/includes/admin/assets/css/min/rtl/sc-menu.css b/sugar-calendar/includes/admin/assets/css/min/rtl/sc-menu.css index 19ece6c2..3a182f77 100644 --- a/sugar-calendar/includes/admin/assets/css/min/rtl/sc-menu.css +++ b/sugar-calendar/includes/admin/assets/css/min/rtl/sc-menu.css @@ -1 +1 @@ -#adminmenu ul>li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after,#adminmenu ul>li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after{display:block;border-bottom:1px solid rgba(255,255,255,.2);height:14px;margin:0 -13px;content:''}#adminmenu ul>li:last-child a[href^="admin.php?page=sc-addons"]:before{display:block;border-top:1px solid rgba(255,255,255,.2);height:14px;margin:0 -13px;content:''}ul#adminmenu #toplevel_page_sugar-calendar a.wp-has-current-submenu:after{display:none}ul#adminmenu #toplevel_page_sugar-calendar ul.wp-submenu li.current a:before{left:0;border:solid 8px transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-left-color:#f1f1f1;margin-top:2px} \ No newline at end of file +#adminmenu ul>li:last-child a[href^="admin.php?page=sc-addons"]:before,#adminmenu ul>li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after,#adminmenu ul>li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after{display:block;margin:13px -15px 8px -15px;content:'';float:right;width:calc(100% + 30px)}#adminmenu ul>li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after,#adminmenu ul>li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after{border-bottom:1px solid rgba(255,255,255,.2)}#adminmenu ul>li:last-child a[href^="admin.php?page=sc-addons"]:before{border-top:1px solid rgba(255,255,255,.2)}#adminmenu li.toplevel_page_sugar-calendar ul.wp-submenu-wrap li{clear:both}ul#adminmenu #toplevel_page_sugar-calendar a.wp-has-current-submenu:after{display:none}ul#adminmenu #toplevel_page_sugar-calendar ul.wp-submenu li.current a:before{left:0;border:solid 8px transparent;content:'';height:0;width:0;position:absolute;pointer-events:none;border-left-color:#f1f1f1;margin-top:2px}@media screen and (max-width:782px){#adminmenu ul>li:last-child a[href^="admin.php?page=sc-addons"]:before,#adminmenu ul>li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after,#adminmenu ul>li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after{margin:20px -20px 8px -20px;width:calc(100% + 40px)}} \ No newline at end of file diff --git a/sugar-calendar/includes/admin/assets/css/rtl/sc-menu.css b/sugar-calendar/includes/admin/assets/css/rtl/sc-menu.css index d7bb883c..c0400ad5 100644 --- a/sugar-calendar/includes/admin/assets/css/rtl/sc-menu.css +++ b/sugar-calendar/includes/admin/assets/css/rtl/sc-menu.css @@ -3,22 +3,33 @@ /* Secondary Separators */ #adminmenu ul > li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after, -#adminmenu ul > li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after +#adminmenu ul > li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after, +#adminmenu ul > li:last-child a[href^="admin.php?page=sc-addons"]:before { display: block; - border-bottom: 1px solid rgba(255,255,255,0.2); - height: 14px; - margin: 0 -13px; + margin: 13px -15px 8px -15px; content: ''; + float: right; + width: calc(100% + 30px); +} + +/* Bottom Separators */ +#adminmenu ul > li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after, +#adminmenu ul > li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after +{ + border-bottom: 1px solid rgba(255,255,255,0.2); } +/* Top Separator */ #adminmenu ul > li:last-child a[href^="admin.php?page=sc-addons"]:before { - display: block; border-top: 1px solid rgba(255,255,255,0.2); - height: 14px; - margin: 0 -13px; - content: ''; +} + +/* WordPress 5.7 fix for left-shadow on hover */ +#adminmenu li.toplevel_page_sugar-calendar ul.wp-submenu-wrap li +{ + clear: both; } /* Hide Parent Arrow */ @@ -32,11 +43,23 @@ ul#adminmenu #toplevel_page_sugar-calendar ul.wp-submenu li.current a:before { left: 0; border: solid 8px transparent; - content: " "; + content: ''; height: 0; width: 0; position: absolute; pointer-events: none; border-left-color: #f1f1f1; margin-top: 2px; -} \ No newline at end of file +} + +@media screen and (max-width: 782px) { + + /* Small Screen Separator */ + #adminmenu ul > li:not(:last-child) a[href^="admin.php?page=sugar-calendar"]:after, + #adminmenu ul > li:not(:last-child) a[href^="post-new.php?post_type=sc_event"]:after, + #adminmenu ul > li:last-child a[href^="admin.php?page=sc-addons"]:before + { + margin: 20px -20px 8px -20px; + width: calc(100% + 40px); + } +} From 95a94d505e279ccb3ee321ac47e9e195f05fba84 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Thu, 11 Feb 2021 12:04:10 -0600 Subject: [PATCH 02/20] Bump to 2.1.7. --- package.json | 2 +- readme.txt | 2 +- sugar-calendar-lite.php | 2 +- sugar-calendar/includes/languages/sugar-calendar.pot | 4 ++-- sugar-calendar/sugar-calendar.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 419368e4..59655c33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sugar-calendar", - "version": "2.1.6", + "version": "2.1.7", "description": "A calendar with a sweet disposition.", "private": true, "license": "GPL-2.0-or-later", diff --git a/readme.txt b/readme.txt index 1a310e21..80485005 100644 --- a/readme.txt +++ b/readme.txt @@ -9,7 +9,7 @@ Tags: simple calendar, event calendar, event management, event list Requires PHP: 5.6.20 Requires at least: 5.1 Tested up to: 5.6 -Stable tag: 2.1.6 +Stable tag: 2.1.7 You can easily manage events with this lightweight calendar. No complicated configuration. Simple to use. Sweeeet! diff --git a/sugar-calendar-lite.php b/sugar-calendar-lite.php index e071991a..fa107243 100755 --- a/sugar-calendar-lite.php +++ b/sugar-calendar-lite.php @@ -11,7 +11,7 @@ * Domain Path: /sugar-calendar/includes/languages/ * Requires PHP: 5.6.20 * Requires at least: 5.1 - * Version: 2.1.6 + * Version: 2.1.7 */ // Exit if accessed directly diff --git a/sugar-calendar/includes/languages/sugar-calendar.pot b/sugar-calendar/includes/languages/sugar-calendar.pot index 02ef4649..b2ed6b5f 100644 --- a/sugar-calendar/includes/languages/sugar-calendar.pot +++ b/sugar-calendar/includes/languages/sugar-calendar.pot @@ -2,9 +2,9 @@ # This file is distributed under the GNU General Public License v2 or later. msgid "" msgstr "" -"Project-Id-Version: Sugar Calendar (Lite) 2.1.6\n" +"Project-Id-Version: Sugar Calendar (Lite) 2.1.7\n" "Report-Msgid-Bugs-To: https://sugarcalendar.com\n" -"POT-Creation-Date: 2021-02-02 02:07:53+00:00\n" +"POT-Creation-Date: 2021-02-11 18:04:06+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/sugar-calendar/sugar-calendar.php b/sugar-calendar/sugar-calendar.php index ef394e00..66a18da1 100644 --- a/sugar-calendar/sugar-calendar.php +++ b/sugar-calendar/sugar-calendar.php @@ -38,7 +38,7 @@ final class Plugin { * @since 2.0.0 * @var string */ - private $version = '2.1.6'; + private $version = '2.1.7'; /** * Prefix. From 700c6746a266279bfb0dab26f5993be2fba04004 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Tue, 23 Feb 2021 12:03:05 -0600 Subject: [PATCH 03/20] Database: update BerlinDB to latest. Includes changes to Table and Query classes to make copying items easier. --- .../classes/database/engine/class-query.php | 32 +++++++++++++++++++ .../classes/database/engine/class-table.php | 9 ++++-- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/sugar-calendar/includes/classes/database/engine/class-query.php b/sugar-calendar/includes/classes/database/engine/class-query.php index 3621a897..4b4414e7 100644 --- a/sugar-calendar/includes/classes/database/engine/class-query.php +++ b/sugar-calendar/includes/classes/database/engine/class-query.php @@ -1808,6 +1808,38 @@ public function add_item( $data = array() ) { return $item_id; } + /** + * Copy an item in the database to a new item. + * + * @since 1.1.0 + * + * @param int $item_id + * @param array $data + * @return bool + */ + public function copy_item( $item_id = 0, $data = array() ) { + + // Get the primary column name + $primary = $this->get_primary_column_name(); + + // Get item by ID (from database, not cache) + $item = $this->get_item_raw( $primary, $item_id ); + + // Bail if item does not exist + if ( empty( $item ) ) { + return false; + } + + // Merge data with original item + $save = array_merge( $item, $data ); + + // Unset the primary key + unset( $save[ $primary ] ); + + // Return result + return $this->add_item( $save ); + } + /** * Update an item in the database. * diff --git a/sugar-calendar/includes/classes/database/engine/class-table.php b/sugar-calendar/includes/classes/database/engine/class-table.php index df2d05d2..70c8f5c9 100644 --- a/sugar-calendar/includes/classes/database/engine/class-table.php +++ b/sugar-calendar/includes/classes/database/engine/class-table.php @@ -591,10 +591,15 @@ public function index_exists( $name = '', $column = 'Key_name' ) { return false; } + // Limit $column to Key or Column name, until we can do better + if ( ! in_array( $column, array( 'Key_name', 'Column_name' ), true ) ) { + $column = 'Key_name'; + } + // Query statement - $query = "SHOW INDEXES FROM {$this->table_name} WHERE %s LIKE %s"; + $query = "SHOW INDEXES FROM {$this->table_name} WHERE {$column} LIKE %s"; $like = $db->esc_like( $name ); - $prepared = $db->prepare( $query, $column, $like ); + $prepared = $db->prepare( $query, $like ); $result = $db->query( $prepared ); // Does the index exist? From f1c1e8979a73c73cc397ffc84b8305f715639716 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Tue, 23 Feb 2021 12:06:26 -0600 Subject: [PATCH 04/20] Events: introduce sugar_calendar_copy_event() This new function calls Sugar_Calendar\Event_Query::copy_item() to make copying items easy. --- sugar-calendar/includes/events/functions.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sugar-calendar/includes/events/functions.php b/sugar-calendar/includes/events/functions.php index 28fd96e4..192f4c10 100644 --- a/sugar-calendar/includes/events/functions.php +++ b/sugar-calendar/includes/events/functions.php @@ -31,6 +31,21 @@ function sugar_calendar_add_event( $data = array() ) { return $events->add_item( $data ); } +/** + * Copy an event. + * + * @since 2.1.7 + * + * @param int $event_id event ID. + * @param array $data event data. + * @return int + */ +function sugar_calendar_copy_event( $event_id = 0, $data = array() ) { + $events = new \Sugar_Calendar\Event_Query(); + + return $events->copy_item( $event_id, $data ); +} + /** * Delete an event. * From b7c8fd71e8bb21ed0e0df8834f9773913bf5d18e Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Tue, 23 Feb 2021 12:07:27 -0600 Subject: [PATCH 05/20] Posts: introduce sugar_calendar_copy_post(). This new function copies a post, its taxonomy terms, and its meta-data. --- sugar-calendar/includes/post/functions.php | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/sugar-calendar/includes/post/functions.php b/sugar-calendar/includes/post/functions.php index ff9190d0..cdbf57de 100644 --- a/sugar-calendar/includes/post/functions.php +++ b/sugar-calendar/includes/post/functions.php @@ -147,3 +147,89 @@ function sugar_calendar_get_event_duration( $post = false ) { // Filter & return return apply_filters( 'sugar_calendar_get_event_duration', $retval, $post, $all_day, $start_date, $end_date ); } + +/** + * Copy a post, its taxonomy terms, and all meta data + * + * @since 2.1.7 + * + * @param int $original_id + * @param array $data + * + * @return int Zero on failure. ID of new post on success. + */ +function sugar_calendar_copy_post( $original_id = 0, $data = array() ) { + + // Get the post + $post = get_post( $original_id, 'ARRAY_A' ); + + // Bail if no original post + if ( empty( $post ) ) { + return 0; + } + + // Set post date timestamp + $post['post_date'] = date( 'Y-m-d H:i:s' ); + + // Unset some keys, to allow them to be set to their defaults + unset( + $post['guid'], + $post['comment_count'], + $post['post_date_gmt'] + ); + + // Allow custom data overrides + $save = array_merge( $post, $data ); + + // Unset the ID column, so an update does not occur + unset( $post['ID'] ); + + // Insert the post into the database + $new_id = wp_insert_post( $save, false, false ); + + // Bail if insert failed + if ( empty( $new_id ) ) { + return 0; + } + + // Get taxonomies for post + $taxonomies = get_object_taxonomies( $post['post_type'] ); + + // Skip if no taxonomies + if ( ! empty( $taxonomies ) ) { + + // Loop through all taxonomies + foreach ( $taxonomies as $taxonomy ) { + + // Get the terms for this taxonomy + $terms = wp_get_post_terms( $original_id, $taxonomy, array( + 'fields' => 'names' + ) ); + + // Maybe set terms for this taxonomy + if ( ! empty( $terms ) ) { + wp_set_object_terms( $new_id, $terms, $taxonomy ); + } + } + } + + // Get meta data for post + $custom_fields = get_post_custom( $original_id ); + + // Skip if no post meta + if ( ! empty( $custom_fields ) ) { + + // Loop through all post meta + foreach ( $custom_fields as $key => $value ) { + + // Unserialize, to be serialized again when added + $value = maybe_unserialize( $value[0] ); + + // Add the meta + add_post_meta( $new_id, $key, $value ); + } + } + + // Return the ID of the new post ID + return $new_id; +} From 9414c7074cc230f9c7c297b59f88814fe9b956ae Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Tue, 23 Feb 2021 12:09:16 -0600 Subject: [PATCH 06/20] List Table: Add "copy" row action. Link URL todo. Also escapes some strings. --- .../list-tables/class-wp-list-table-list.php | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php index f2ef304e..250a7c23 100644 --- a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php +++ b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php @@ -652,7 +652,15 @@ private function get_post_row_actions( $item ) { get_edit_post_link( $post->ID ), /* translators: %s: post title */ esc_attr( sprintf( __( 'Edit “%s”', 'sugar-calendar' ), $title ) ), - __( 'Edit', 'sugar-calendar' ) + esc_html__( 'Edit', 'sugar-calendar' ) + ); + + $actions['copy'] = sprintf( + '%s', + $this->get_event_copy_url( $item ), + /* translators: %s: post title */ + esc_attr( sprintf( __( 'Duplicate “%s”', 'sugar-calendar' ), $title ) ), + esc_html__( 'Duplicate', 'sugar-calendar' ) ); } @@ -663,7 +671,7 @@ private function get_post_row_actions( $item ) { wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $post->ID ) ), 'untrash-post_' . $post->ID ), /* translators: %s: post title */ esc_attr( sprintf( __( 'Restore “%s” from the Trash', 'sugar-calendar' ), $title ) ), - __( 'Restore', 'sugar-calendar' ) + esc_html__( 'Restore', 'sugar-calendar' ) ); } elseif ( EMPTY_TRASH_DAYS ) { $actions['trash'] = sprintf( @@ -671,7 +679,7 @@ private function get_post_row_actions( $item ) { get_delete_post_link( $post->ID ), /* translators: %s: post title */ esc_attr( sprintf( __( 'Move “%s” to the Trash', 'sugar-calendar' ), $title ) ), - _x( 'Trash', 'verb', 'sugar-calendar' ) + esc_html_x( 'Trash', 'verb', 'sugar-calendar' ) ); } if ( 'trash' === $post->post_status || ! EMPTY_TRASH_DAYS ) { @@ -680,7 +688,7 @@ private function get_post_row_actions( $item ) { get_delete_post_link( $post->ID, '', true ), /* translators: %s: post title */ esc_attr( sprintf( __( 'Delete “%s” permanently', 'sugar-calendar' ), $title ) ), - __( 'Delete Permanently', 'sugar-calendar' ) + esc_html__( 'Delete Permanently', 'sugar-calendar' ) ); } } @@ -694,7 +702,7 @@ private function get_post_row_actions( $item ) { esc_url( $preview_link ), /* translators: %s: post title */ esc_attr( sprintf( __( 'Preview “%s”', 'sugar-calendar' ), $title ) ), - __( 'Preview', 'sugar-calendar' ) + esc_html__( 'Preview', 'sugar-calendar' ) ); } } elseif ( 'trash' != $post->post_status ) { @@ -703,7 +711,7 @@ private function get_post_row_actions( $item ) { get_permalink( $post->ID ), /* translators: %s: post title */ esc_attr( sprintf( __( 'View “%s”', 'sugar-calendar' ), $title ) ), - _x( 'View', 'verb', 'sugar-calendar' ) + esc_html_x( 'View', 'verb', 'sugar-calendar' ) ); } } @@ -714,7 +722,7 @@ private function get_post_row_actions( $item ) { $post->ID, /* translators: %s: post title */ esc_attr( sprintf( __( 'Export “%s” as JSON', 'sugar-calendar' ), $title ) ), - __( 'Export as JSON', 'sugar-calendar' ) + esc_html__( 'Export as JSON', 'sugar-calendar' ) ); } From c2eecafcc04dd570a2c3e72e40c425f0670fdcc9 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Tue, 23 Feb 2021 12:12:14 -0600 Subject: [PATCH 07/20] List Table: add methods for "copy" action to Base class. Link URLs todo. --- .../list-tables/class-wp-list-table-base.php | 54 ++++++++++++++++++- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php index 8704a430..a9ccc399 100644 --- a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php +++ b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php @@ -1981,9 +1981,10 @@ protected function get_pointer_links( $event = false ) { // Not trashed, so offer to Edit or View } else { - // Maybe add edit link + // Maybe add edit & copy links if ( $this->current_user_can_edit( $event ) ) { - $links['edit'] = '' . $this->get_event_edit_link( $event, esc_html__( 'Edit', 'sugar-calendar' ) ) . ''; + $links['edit'] = '' . $this->get_event_edit_link( $event, esc_html__( 'Edit', 'sugar-calendar' ) ) . ''; + $links['copy'] = '' . $this->get_event_copy_link( $event, esc_html__( 'Duplicate', 'sugar-calendar' ) ) . ''; } // Add view link @@ -2010,6 +2011,20 @@ protected function get_event_edit_link( $event = false, $link_text = '' ) { return '' . $link_text . ''; } + /** + * Get the link used to copy an event. + * + * @since 2.0.0 + * + * @param object $event + * @param string $link_text + * + * @return string + */ + protected function get_event_copy_link( $event = false, $link_text = '' ) { + return '' . $link_text . ''; + } + /** * Get the link used to delete an event. * @@ -2087,6 +2102,41 @@ protected function get_event_edit_url( $event = false ) { return $retval; } + /** + * Get the URL used to copy an event. + * + * @todo Create a relationship registration API + * + * @since 2.1.7 + * + * @param object $event + * + * @return string + */ + protected function get_event_copy_url( $event = false ) { + + // Default return value + $retval = ''; + + // Type of object + switch ( $event->object_type ) { + case 'post' : + $retval = get_edit_post_link( $event->object_id ); + break; + + case 'user' : + $retval = get_edit_user_link( $event->object_id ); + break; + + case 'comment' : + $retval = get_edit_comment_link( $event->object_id ); + break; + } + + // Return the HTML + return $retval; + } + /** * Get the URL used to restore an event. * From 96395be11e0fbcf418b916693e2023aeb8e99178 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Tue, 23 Feb 2021 12:14:35 -0600 Subject: [PATCH 08/20] Remove Dashicons from pointer links. Bump assets accordingly. --- .../admin/assets/css/ltr/sc-calendar.css | 55 ++++---- .../admin/assets/css/min/ltr/sc-calendar.css | 2 +- .../admin/assets/css/min/rtl/sc-calendar.css | 2 +- .../admin/assets/css/rtl/sc-calendar.css | 55 ++++---- .../includes/languages/sugar-calendar.pot | 128 ++++++++++-------- 5 files changed, 117 insertions(+), 125 deletions(-) diff --git a/sugar-calendar/includes/admin/assets/css/ltr/sc-calendar.css b/sugar-calendar/includes/admin/assets/css/ltr/sc-calendar.css index cfffae2a..e7879727 100644 --- a/sugar-calendar/includes/admin/assets/css/ltr/sc-calendar.css +++ b/sugar-calendar/includes/admin/assets/css/ltr/sc-calendar.css @@ -319,7 +319,7 @@ table.calendar a.post-password-required:before { margin-bottom: 20px; } -.wp-pointer-actions { +.wp-pointer.sugar-calendar .wp-pointer-actions { border-top: 1px solid #ddd; background-color: #f4f4f4; padding: 12px 10px 14px; @@ -327,54 +327,45 @@ table.calendar a.post-password-required:before { min-height: 19px; } -.wp-pointer-actions .action { +.wp-pointer.sugar-calendar .wp-pointer-actions .action { position: relative; - margin-left: 20px; - margin-right: 10px; + margin: 0; + padding: 0 5px; } -.wp-pointer-actions .action a { - text-decoration: none; +.wp-pointer.sugar-calendar .wp-pointer-actions .action:first-child { + margin-left: 10px; + padding-left: 0; } -.wp-pointer-actions .action a:before { - background: none; - color: #72777c; - display: block !important; - font: normal 16px/1 dashicons; - speak: none; - text-align: center; - -webkit-font-smoothing: antialiased !important; - width: 10px; - height: 100%; - position: absolute; - left: -18px; - top: 0px; +.wp-pointer.sugar-calendar .wp-pointer-actions .action:not(:last-child) { + border-right: 1px solid #dcdcde; } -.wp-pointer-actions .event-delete a { - color: #dc3232; +.wp-pointer.sugar-calendar .wp-pointer-actions .action a { + text-decoration: none; } -.wp-pointer-actions .event-delete a:hover, -.wp-pointer-actions .event-delete a:active { - color: #a00; +.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a { + color: #dc3232; } -.wp-pointer-actions .event-edit a:before { - content: "\f464"; +.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:hover, +.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:active { + color: #a00; } -.wp-pointer-actions .event-restore a:before { - content: "\f171"; +.wp-pointer.sugar-calendar .wp-pointer-buttons a.close { + color: #aaa; } -.wp-pointer-actions .event-delete a:before { - content: "\f158"; +.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:hover, +.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:active { + color: #bbb; } -.wp-pointer-actions .event-view a:before { - content: "\f103"; +.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:before { + display: none !important; } table.calendar:not(.draft) a.status-draft, diff --git a/sugar-calendar/includes/admin/assets/css/min/ltr/sc-calendar.css b/sugar-calendar/includes/admin/assets/css/min/ltr/sc-calendar.css index e33749d2..965a0cf8 100644 --- a/sugar-calendar/includes/admin/assets/css/min/ltr/sc-calendar.css +++ b/sugar-calendar/includes/admin/assets/css/min/ltr/sc-calendar.css @@ -1 +1 @@ -body.sugar-calendar #post-body-content{margin-bottom:0}.sugar-calendar-editor #wp-content-editor-tools{background-color:#fff;padding-top:0}#above_event_editor-sortables{margin-top:20px}.event-date,.event-time,.event-time-zone{display:inline-block;padding:4px 0}.sugar_calendar_datepicker{max-width:105px;height:30px;vertical-align:middle}.sugar_calendar_datepicker:after{display:inline-block;font:normal 20px/34px dashicons;color:#000;speak:none;vertical-align:top;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px;content:"\f508"}.event-time input{max-width:50px}body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone div.sc-select-chosen,body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone select:not(.sc-select-chosen){min-width:222px}@media only screen and (max-width:782px){.event-time div.sc-select-chosen,.event-time input,.event-time select:not(.sc-select-chosen){max-width:100px!important;display:inline-block!important}.sugar_calendar_datepicker{height:auto}}.widefat .column-duration,.widefat .column-end,.widefat .column-start{width:15%}.widefat .column-repeat{width:12%}body.sugar-calendar .wp-filter{margin-bottom:5px}.tablenav.top input[type=number]{width:80px;height:30px;vertical-align:middle}body.sugar-calendar .tablenav .tablenav-pages,body.sugar-calendar .tablenav .tablenav-tools{float:right;margin-bottom:5px}body.sugar-calendar .tablenav .tablenav-pages>*,body.sugar-calendar .tablenav .tablenav-tools>*{margin:0;display:inline-block}body.sugar-calendar .tablenav a.screen-options{padding:0;text-decoration:none;text-align:center}body.sugar-calendar .tablenav a.screen-options .dashicons{color:#b4b9be;padding:5px;vertical-align:middle;margin-top:-3px}body.sugar-calendar .tablenav a.screen-options:hover .dashicons{color:#727272}body.sugar-calendar .tablenav .tablenav-tools>span{padding:6px 10px}body.sugar-calendar .view-switch .view-list:before{content:'\f214'}.view-switch .view-month:before{content:'\f508';font-size:23px;margin-top:-3px;font-weight:500;-webkit-font-smoothing:subpixel-antialiased}.view-switch .view-week:before{content:'\f164'}.view-switch .view-day:before{content:'\f163'}.view-switch a.current{background-color:#007cba;border-radius:3px}.view-switch a.current:before{color:#fff}body.admin-color-fresh .view-switch a.current{background-color:#007cba}body.admin-color-blue .view-switch a.current{background-color:#096484}body.admin-color-coffee .view-switch a.current{background-color:#c7a589}body.admin-color-ectoplasm .view-switch a.current{background-color:#a3b745}body.admin-color-midnight .view-switch a.current{background-color:#e14d43}body.admin-color-modern .view-switch a.current{background-color:#3858e9}body.admin-color-ocean .view-switch a.current{background-color:#9ebaa0}body.admin-color-sunrise .view-switch a.current{background-color:#dd823b}body.admin-color-light .view-switch a.current{background-color:#04a4cc}body.admin-color-evergreen .view-switch a.current{background-color:#36533f}body.admin-color-mint .view-switch a.current{background-color:#4f6d59}table.calendar:not(.list){table-layout:fixed;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}table.calendar:not(.list) tfoot th,table.calendar:not(.list) thead th{text-align:center}table.calendar.striped>tbody>:nth-child(even) td{background-color:#fff}table.calendar.striped>tbody>:nth-child(odd) td{background-color:#f9f9f9}table.calendar:not(.list) tbody td{padding:0;position:relative;text-align:left;border-bottom:1px solid #e1e1e1;border-right:1px solid #e1e1e1}table.calendar:not(.day) tbody td.saturday,table.calendar:not(.day) tbody td.sunday{background-color:#f1f1f1}table.calendar:not(.list) tbody td:hover{box-shadow:inset 0 0 0 1px #ccc!important}table.calendar a.sugar-calendar{display:block;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;margin:0;padding:0 5px}table.calendar a.sugar-calendar{position:relative;padding:0 0 0 20px}table.calendar a.sugar-calendar:before{font:normal 15px/18px dashicons;display:inline-block;position:absolute;left:2px;top:.5px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:18px;height:18px;margin:0}table.calendar.list a.sugar-calendar{display:inline;border-radius:3px;padding:5px 5px 5px 22px}table.calendar.list a.sugar-calendar:before{top:4.5px;left:5px}table.calendar.list .row-actions{margin-left:5px;margin-top:2px}.wp-pointer.sugar-calendar .wp-pointer-arrow{left:calc(50% - 15px)}.wp-pointer.sugar-calendar .wp-pointer-arrow-inner{border-top-color:#f4f4f4}.wp-pointer-content h3.type-sc_event:before,table.calendar a.type-sc_event:before{content:'\f145'}.wp-pointer-content h3.type-post:before,table.calendar a.type-post:before{content:'\f109'}.wp-pointer-content h3.type-page:before,table.calendar a.type-page:before{content:'\f105'}.wp-pointer-content h3.has-location:before,table.calendar a.has-location:before{content:"\f230"}.wp-pointer-content h3.all-day:before,table.calendar a.all-day:before{content:'\f469'}.wp-pointer-content h3.status-trash:before,table.calendar a.status-trash:before{content:'\f182'}.wp-pointer-content h3.status-private:before,table.calendar a.status-private:before{content:'\f530'}.wp-pointer-content h3.post-password-required:before,table.calendar a.post-password-required:before{content:'\f315'}.wp-pointer.sugar-calendar .wp-pointer-content p span,.wp-pointer.sugar-calendar .wp-pointer-content p strong{display:block}.wp-pointer.sugar-calendar .wp-pointer-content p span{margin-bottom:20px}.wp-pointer-actions{border-top:1px solid #ddd;background-color:#f4f4f4;padding:12px 10px 14px;margin:0 0 -38px;min-height:19px}.wp-pointer-actions .action{position:relative;margin-left:20px;margin-right:10px}.wp-pointer-actions .action a{text-decoration:none}.wp-pointer-actions .action a:before{background:0 0;color:#72777c;display:block!important;font:normal 16px/1 dashicons;speak:none;text-align:center;-webkit-font-smoothing:antialiased!important;width:10px;height:100%;position:absolute;left:-18px;top:0}.wp-pointer-actions .event-delete a{color:#dc3232}.wp-pointer-actions .event-delete a:active,.wp-pointer-actions .event-delete a:hover{color:#a00}.wp-pointer-actions .event-edit a:before{content:"\f464"}.wp-pointer-actions .event-restore a:before{content:"\f171"}.wp-pointer-actions .event-delete a:before{content:"\f158"}.wp-pointer-actions .event-view a:before{content:"\f103"}table.calendar:not(.draft) a.status-draft,table.calendar:not(.trash) a.status-trash{opacity:.5}@media screen and (max-width:782px){body.sugar-calendar .tablenav-pages{float:right;text-align:right;margin:7px 0 0 0;width:auto}table.calendar:not(.list) #the-list tr:last-child td:not(:last-child){border-bottom:1px solid #e1e1e1!important}table.calendar:not(.list) tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.check-column){display:block}table.calendar.list tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.column-primary)::before{left:32px}}table.month tbody td a.add-event-for-day,table.month tbody td a.day-number{padding:0;margin:0;position:absolute;top:0;height:26px;width:26px;text-align:center;color:#aaa;line-height:1.9em;font-weight:600;background-color:rgba(255,255,255,.8);border:1px solid transparent;border-bottom:1px solid #e1e1e1}table.month tbody td a.day-number{border-right:1px solid #e1e1e1;border-bottom-right-radius:5px}table.month tbody td a.add-event-for-day{border-left:1px solid #e1e1e1;right:0;visibility:hidden}table.month tbody td a.add-event-for-day:hover,table.month tbody td a.day-number:hover{background:rgba(245,245,245,.8)}table.month tbody td:hover a.add-event-for-day{visibility:visible}table.month tbody td:hover a.add-event-for-day,table.month tbody td:hover a.day-number{border-color:#ccc}table.month tbody td{position:relative}table.month tbody th{height:80px;background-color:#fff;border-bottom:1px solid #e1e1e1}table.month tbody tr th:last-of-type{border-right:1px solid #e1e1e1}table.month tbody tr td:nth-child(8){border-right:none}table.calendar.month tbody td.today{background:#ffe}table.month div.events-for-cell{margin:30px 0 5px;min-height:80px}table.month tbody td a i{line-height:1.9em;font-size:15px;overflow:hidden}table.month th.column-week{border-right:1px solid #e1e1e1}table.month tbody th.column-week{border-bottom:none;background-color:#fff;position:relative;text-align:center;z-index:1}table.month tbody th.column-week a{margin:auto auto;padding:10px;border:1px solid transparent;border-radius:5px;font-weight:600;color:#aaa;background-color:rgba(255,255,255,.8);z-index:3}table.month tbody th.column-week a:hover{background-color:#f1f1f1;border:1px solid #e1e1e1}.wp-pointer-content h3 a{color:#fff;text-decoration:none}.wp-pointer-content h3 a:hover{color:#eee}input#year{width:90px}@media screen and (max-width:782px){table.month div.events-for-cell{margin:0;padding-top:30px}table.month tbody th.padding{display:none}table.month tbody td{border-width:0 0 1px 0!important;padding:0;margin:0}}table.day td div.events-for-cell,table.day th,table.week td div.events-for-cell,table.week th{min-height:34px;position:relative}table.day th,table.week th{width:30px;background-color:#fff;color:#333;border-bottom:1px solid #e1e1e1;border-right:1px solid #e1e1e1;text-align:center;cursor:default}table.day tbody tr td:last-of-type,table.day tfoot tr th:last-of-type,table.day thead tr th:last-of-type,table.week tbody tr td:last-of-type,table.week tfoot tr th:last-of-type,table.week thead tr th:last-of-type{border-right:none}table.day tfoot tr th:not(:first-child),table.day thead tr th:not(:first-child),table.week tfoot tr th:not(:first-child),table.week thead tr th:not(:first-child){border-right:none}table.day tfoot tr:last-of-type th,table.week tfoot tr:last-of-type th{border-bottom:none}table.day tbody tr:not(.multi-day) th:first-of-type,table.week tbody tr:not(.multi-day) th:first-of-type{border-bottom:none}table.calendar.day tr.all-day td,table.calendar.day tr.multi-day td,table.calendar.week tr.all-day td,table.calendar.week tr.multi-day td{background-color:#efe}table.calendar.day tbody tr.this-hour td,table.calendar.week tbody tr.this-hour td{background:#ffe}table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:2px solid #e1e1e1}table.day th.column-hour,table.week th.column-hour{width:110px}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{width:100%}table.day th.manage-column,table.week th.manage-column{padding:0;vertical-align:top}table.day th.manage-column a,table.day th.manage-column span,table.week th.manage-column a,table.week th.manage-column span{padding:8px 10px;color:#32373c;display:block;height:calc(100% - 16px);width:calc(100% - 21px);-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}table.day th.manage-column a:active,table.day th.manage-column a:hover,table.week th.manage-column a:active,table.week th.manage-column a:hover{opacity:.5}@media screen and (max-width:782px){table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:1px solid #e1e1e1}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{display:block;width:auto}table.day tfoot th:nth-child(n+3),table.day thead th:nth-child(n+3),table.week tfoot th:nth-child(n+3),table.week thead th:nth-child(n+3){border-top:none}table.day tr:not(.inline-edit-row):not(.no-items) td:not(.check-column),table.week tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){min-height:35px}table.month th.column-week{display:none}}.tablenav-tools span.sc-timezone,.wp-pointer-content span.sc-timezone,table.list span.sc-timechange,table.list span.sc-timezone{font-size:11px;color:rgba(0,0,0,.4)}body.sugar-calendar form#adv-settings .metabox-prefs label{display:block;margin-top:-8px;margin-left:200px}body.sugar-calendar form#adv-settings .metabox-prefs legend+label{margin-top:-30px}body.sugar-calendar form#adv-settings .metabox-prefs{margin-bottom:10px}body.sugar-calendar form#adv-settings table.form-table{margin:0;padding:0}body.sugar-calendar form#adv-settings table.form-table *{font-size:13px;line-height:1.5em}body.sugar-calendar form#adv-settings table.form-table td,body.sugar-calendar form#adv-settings table.form-table th{padding:10px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs td label{padding:2px 0 2px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs span.date-time-text{display:inline-block;min-width:10em}body.sugar-calendar form#adv-settings .sc-date-time-prefs input.small-text{width:75px;margin:-2px 0} \ No newline at end of file +body.sugar-calendar #post-body-content{margin-bottom:0}.sugar-calendar-editor #wp-content-editor-tools{background-color:#fff;padding-top:0}#above_event_editor-sortables{margin-top:20px}.event-date,.event-time,.event-time-zone{display:inline-block;padding:4px 0}.sugar_calendar_datepicker{max-width:105px;height:30px;vertical-align:middle}.sugar_calendar_datepicker:after{display:inline-block;font:normal 20px/34px dashicons;color:#000;speak:none;vertical-align:top;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px;content:"\f508"}.event-time input{max-width:50px}body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone div.sc-select-chosen,body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone select:not(.sc-select-chosen){min-width:222px}@media only screen and (max-width:782px){.event-time div.sc-select-chosen,.event-time input,.event-time select:not(.sc-select-chosen){max-width:100px!important;display:inline-block!important}.sugar_calendar_datepicker{height:auto}}.widefat .column-duration,.widefat .column-end,.widefat .column-start{width:15%}.widefat .column-repeat{width:12%}body.sugar-calendar .wp-filter{margin-bottom:5px}.tablenav.top input[type=number]{width:80px;height:30px;vertical-align:middle}body.sugar-calendar .tablenav .tablenav-pages,body.sugar-calendar .tablenav .tablenav-tools{float:right;margin-bottom:5px}body.sugar-calendar .tablenav .tablenav-pages>*,body.sugar-calendar .tablenav .tablenav-tools>*{margin:0;display:inline-block}body.sugar-calendar .tablenav a.screen-options{padding:0;text-decoration:none;text-align:center}body.sugar-calendar .tablenav a.screen-options .dashicons{color:#b4b9be;padding:5px;vertical-align:middle;margin-top:-3px}body.sugar-calendar .tablenav a.screen-options:hover .dashicons{color:#727272}body.sugar-calendar .tablenav .tablenav-tools>span{padding:6px 10px}body.sugar-calendar .view-switch .view-list:before{content:'\f214'}.view-switch .view-month:before{content:'\f508';font-size:23px;margin-top:-3px;font-weight:500;-webkit-font-smoothing:subpixel-antialiased}.view-switch .view-week:before{content:'\f164'}.view-switch .view-day:before{content:'\f163'}.view-switch a.current{background-color:#007cba;border-radius:3px}.view-switch a.current:before{color:#fff}body.admin-color-fresh .view-switch a.current{background-color:#007cba}body.admin-color-blue .view-switch a.current{background-color:#096484}body.admin-color-coffee .view-switch a.current{background-color:#c7a589}body.admin-color-ectoplasm .view-switch a.current{background-color:#a3b745}body.admin-color-midnight .view-switch a.current{background-color:#e14d43}body.admin-color-modern .view-switch a.current{background-color:#3858e9}body.admin-color-ocean .view-switch a.current{background-color:#9ebaa0}body.admin-color-sunrise .view-switch a.current{background-color:#dd823b}body.admin-color-light .view-switch a.current{background-color:#04a4cc}body.admin-color-evergreen .view-switch a.current{background-color:#36533f}body.admin-color-mint .view-switch a.current{background-color:#4f6d59}table.calendar:not(.list){table-layout:fixed;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}table.calendar:not(.list) tfoot th,table.calendar:not(.list) thead th{text-align:center}table.calendar.striped>tbody>:nth-child(even) td{background-color:#fff}table.calendar.striped>tbody>:nth-child(odd) td{background-color:#f9f9f9}table.calendar:not(.list) tbody td{padding:0;position:relative;text-align:left;border-bottom:1px solid #e1e1e1;border-right:1px solid #e1e1e1}table.calendar:not(.day) tbody td.saturday,table.calendar:not(.day) tbody td.sunday{background-color:#f1f1f1}table.calendar:not(.list) tbody td:hover{box-shadow:inset 0 0 0 1px #ccc!important}table.calendar a.sugar-calendar{display:block;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;margin:0;padding:0 5px}table.calendar a.sugar-calendar{position:relative;padding:0 0 0 20px}table.calendar a.sugar-calendar:before{font:normal 15px/18px dashicons;display:inline-block;position:absolute;left:2px;top:.5px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:18px;height:18px;margin:0}table.calendar.list a.sugar-calendar{display:inline;border-radius:3px;padding:5px 5px 5px 22px}table.calendar.list a.sugar-calendar:before{top:4.5px;left:5px}table.calendar.list .row-actions{margin-left:5px;margin-top:2px}.wp-pointer.sugar-calendar .wp-pointer-arrow{left:calc(50% - 15px)}.wp-pointer.sugar-calendar .wp-pointer-arrow-inner{border-top-color:#f4f4f4}.wp-pointer-content h3.type-sc_event:before,table.calendar a.type-sc_event:before{content:'\f145'}.wp-pointer-content h3.type-post:before,table.calendar a.type-post:before{content:'\f109'}.wp-pointer-content h3.type-page:before,table.calendar a.type-page:before{content:'\f105'}.wp-pointer-content h3.has-location:before,table.calendar a.has-location:before{content:"\f230"}.wp-pointer-content h3.all-day:before,table.calendar a.all-day:before{content:'\f469'}.wp-pointer-content h3.status-trash:before,table.calendar a.status-trash:before{content:'\f182'}.wp-pointer-content h3.status-private:before,table.calendar a.status-private:before{content:'\f530'}.wp-pointer-content h3.post-password-required:before,table.calendar a.post-password-required:before{content:'\f315'}.wp-pointer.sugar-calendar .wp-pointer-content p span,.wp-pointer.sugar-calendar .wp-pointer-content p strong{display:block}.wp-pointer.sugar-calendar .wp-pointer-content p span{margin-bottom:20px}.wp-pointer.sugar-calendar .wp-pointer-actions{border-top:1px solid #ddd;background-color:#f4f4f4;padding:12px 10px 14px;margin:0 0 -38px;min-height:19px}.wp-pointer.sugar-calendar .wp-pointer-actions .action{position:relative;margin:0;padding:0 5px}.wp-pointer.sugar-calendar .wp-pointer-actions .action:first-child{margin-left:10px;padding-left:0}.wp-pointer.sugar-calendar .wp-pointer-actions .action:not(:last-child){border-right:1px solid #dcdcde}.wp-pointer.sugar-calendar .wp-pointer-actions .action a{text-decoration:none}.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a{color:#dc3232}.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:active,.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:hover{color:#a00}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close{color:#aaa}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:active,.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:hover{color:#bbb}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:before{display:none!important}table.calendar:not(.draft) a.status-draft,table.calendar:not(.trash) a.status-trash{opacity:.5}@media screen and (max-width:782px){body.sugar-calendar .tablenav-pages{float:right;text-align:right;margin:7px 0 0 0;width:auto}table.calendar:not(.list) #the-list tr:last-child td:not(:last-child){border-bottom:1px solid #e1e1e1!important}table.calendar:not(.list) tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.check-column){display:block}table.calendar.list tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.column-primary)::before{left:32px}}table.month tbody td a.add-event-for-day,table.month tbody td a.day-number{padding:0;margin:0;position:absolute;top:0;height:26px;width:26px;text-align:center;color:#aaa;line-height:1.9em;font-weight:600;background-color:rgba(255,255,255,.8);border:1px solid transparent;border-bottom:1px solid #e1e1e1}table.month tbody td a.day-number{border-right:1px solid #e1e1e1;border-bottom-right-radius:5px}table.month tbody td a.add-event-for-day{border-left:1px solid #e1e1e1;right:0;visibility:hidden}table.month tbody td a.add-event-for-day:hover,table.month tbody td a.day-number:hover{background:rgba(245,245,245,.8)}table.month tbody td:hover a.add-event-for-day{visibility:visible}table.month tbody td:hover a.add-event-for-day,table.month tbody td:hover a.day-number{border-color:#ccc}table.month tbody td{position:relative}table.month tbody th{height:80px;background-color:#fff;border-bottom:1px solid #e1e1e1}table.month tbody tr th:last-of-type{border-right:1px solid #e1e1e1}table.month tbody tr td:nth-child(8){border-right:none}table.calendar.month tbody td.today{background:#ffe}table.month div.events-for-cell{margin:30px 0 5px;min-height:80px}table.month tbody td a i{line-height:1.9em;font-size:15px;overflow:hidden}table.month th.column-week{border-right:1px solid #e1e1e1}table.month tbody th.column-week{border-bottom:none;background-color:#fff;position:relative;text-align:center;z-index:1}table.month tbody th.column-week a{margin:auto auto;padding:10px;border:1px solid transparent;border-radius:5px;font-weight:600;color:#aaa;background-color:rgba(255,255,255,.8);z-index:3}table.month tbody th.column-week a:hover{background-color:#f1f1f1;border:1px solid #e1e1e1}.wp-pointer-content h3 a{color:#fff;text-decoration:none}.wp-pointer-content h3 a:hover{color:#eee}input#year{width:90px}@media screen and (max-width:782px){table.month div.events-for-cell{margin:0;padding-top:30px}table.month tbody th.padding{display:none}table.month tbody td{border-width:0 0 1px 0!important;padding:0;margin:0}}table.day td div.events-for-cell,table.day th,table.week td div.events-for-cell,table.week th{min-height:34px;position:relative}table.day th,table.week th{width:30px;background-color:#fff;color:#333;border-bottom:1px solid #e1e1e1;border-right:1px solid #e1e1e1;text-align:center;cursor:default}table.day tbody tr td:last-of-type,table.day tfoot tr th:last-of-type,table.day thead tr th:last-of-type,table.week tbody tr td:last-of-type,table.week tfoot tr th:last-of-type,table.week thead tr th:last-of-type{border-right:none}table.day tfoot tr th:not(:first-child),table.day thead tr th:not(:first-child),table.week tfoot tr th:not(:first-child),table.week thead tr th:not(:first-child){border-right:none}table.day tfoot tr:last-of-type th,table.week tfoot tr:last-of-type th{border-bottom:none}table.day tbody tr:not(.multi-day) th:first-of-type,table.week tbody tr:not(.multi-day) th:first-of-type{border-bottom:none}table.calendar.day tr.all-day td,table.calendar.day tr.multi-day td,table.calendar.week tr.all-day td,table.calendar.week tr.multi-day td{background-color:#efe}table.calendar.day tbody tr.this-hour td,table.calendar.week tbody tr.this-hour td{background:#ffe}table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:2px solid #e1e1e1}table.day th.column-hour,table.week th.column-hour{width:110px}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{width:100%}table.day th.manage-column,table.week th.manage-column{padding:0;vertical-align:top}table.day th.manage-column a,table.day th.manage-column span,table.week th.manage-column a,table.week th.manage-column span{padding:8px 10px;color:#32373c;display:block;height:calc(100% - 16px);width:calc(100% - 21px);-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}table.day th.manage-column a:active,table.day th.manage-column a:hover,table.week th.manage-column a:active,table.week th.manage-column a:hover{opacity:.5}@media screen and (max-width:782px){table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:1px solid #e1e1e1}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{display:block;width:auto}table.day tfoot th:nth-child(n+3),table.day thead th:nth-child(n+3),table.week tfoot th:nth-child(n+3),table.week thead th:nth-child(n+3){border-top:none}table.day tr:not(.inline-edit-row):not(.no-items) td:not(.check-column),table.week tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){min-height:35px}table.month th.column-week{display:none}}.tablenav-tools span.sc-timezone,.wp-pointer-content span.sc-timezone,table.list span.sc-timechange,table.list span.sc-timezone{font-size:11px;color:rgba(0,0,0,.4)}body.sugar-calendar form#adv-settings .metabox-prefs label{display:block;margin-top:-8px;margin-left:200px}body.sugar-calendar form#adv-settings .metabox-prefs legend+label{margin-top:-30px}body.sugar-calendar form#adv-settings .metabox-prefs{margin-bottom:10px}body.sugar-calendar form#adv-settings table.form-table{margin:0;padding:0}body.sugar-calendar form#adv-settings table.form-table *{font-size:13px;line-height:1.5em}body.sugar-calendar form#adv-settings table.form-table td,body.sugar-calendar form#adv-settings table.form-table th{padding:10px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs td label{padding:2px 0 2px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs span.date-time-text{display:inline-block;min-width:10em}body.sugar-calendar form#adv-settings .sc-date-time-prefs input.small-text{width:75px;margin:-2px 0} \ No newline at end of file diff --git a/sugar-calendar/includes/admin/assets/css/min/rtl/sc-calendar.css b/sugar-calendar/includes/admin/assets/css/min/rtl/sc-calendar.css index 3db44b4c..04e66d56 100644 --- a/sugar-calendar/includes/admin/assets/css/min/rtl/sc-calendar.css +++ b/sugar-calendar/includes/admin/assets/css/min/rtl/sc-calendar.css @@ -1 +1 @@ -body.sugar-calendar #post-body-content{margin-bottom:0}.sugar-calendar-editor #wp-content-editor-tools{background-color:#fff;padding-top:0}#above_event_editor-sortables{margin-top:20px}.event-date,.event-time,.event-time-zone{display:inline-block;padding:4px 0}.sugar_calendar_datepicker{max-width:105px;height:30px;vertical-align:middle}.sugar_calendar_datepicker:after{display:inline-block;font:normal 20px/34px dashicons;color:#000;speak:none;vertical-align:top;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px;content:"\f508"}.event-time input{max-width:50px}body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone div.sc-select-chosen,body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone select:not(.sc-select-chosen){min-width:222px}@media only screen and (max-width:782px){.event-time div.sc-select-chosen,.event-time input,.event-time select:not(.sc-select-chosen){max-width:100px!important;display:inline-block!important}.sugar_calendar_datepicker{height:auto}}.widefat .column-duration,.widefat .column-end,.widefat .column-start{width:15%}.widefat .column-repeat{width:12%}body.sugar-calendar .wp-filter{margin-bottom:5px}.tablenav.top input[type=number]{width:80px;height:30px;vertical-align:middle}body.sugar-calendar .tablenav .tablenav-pages,body.sugar-calendar .tablenav .tablenav-tools{float:left;margin-bottom:5px}body.sugar-calendar .tablenav .tablenav-pages>*,body.sugar-calendar .tablenav .tablenav-tools>*{margin:0;display:inline-block}body.sugar-calendar .tablenav a.screen-options{padding:0;text-decoration:none;text-align:center}body.sugar-calendar .tablenav a.screen-options .dashicons{color:#b4b9be;padding:5px;vertical-align:middle;margin-top:-3px}body.sugar-calendar .tablenav a.screen-options:hover .dashicons{color:#727272}body.sugar-calendar .tablenav .tablenav-tools>span{padding:6px 10px}body.sugar-calendar .view-switch .view-list:before{content:'\f214'}.view-switch .view-month:before{content:'\f508';font-size:23px;margin-top:-3px;font-weight:500;-webkit-font-smoothing:subpixel-antialiased}.view-switch .view-week:before{content:'\f164'}.view-switch .view-day:before{content:'\f163'}.view-switch a.current{background-color:#007cba;border-radius:3px}.view-switch a.current:before{color:#fff}body.admin-color-fresh .view-switch a.current{background-color:#007cba}body.admin-color-blue .view-switch a.current{background-color:#096484}body.admin-color-coffee .view-switch a.current{background-color:#c7a589}body.admin-color-ectoplasm .view-switch a.current{background-color:#a3b745}body.admin-color-midnight .view-switch a.current{background-color:#e14d43}body.admin-color-modern .view-switch a.current{background-color:#3858e9}body.admin-color-ocean .view-switch a.current{background-color:#9ebaa0}body.admin-color-sunrise .view-switch a.current{background-color:#dd823b}body.admin-color-light .view-switch a.current{background-color:#04a4cc}body.admin-color-evergreen .view-switch a.current{background-color:#36533f}body.admin-color-mint .view-switch a.current{background-color:#4f6d59}table.calendar:not(.list){table-layout:fixed;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}table.calendar:not(.list) tfoot th,table.calendar:not(.list) thead th{text-align:center}table.calendar.striped>tbody>:nth-child(even) td{background-color:#fff}table.calendar.striped>tbody>:nth-child(odd) td{background-color:#f9f9f9}table.calendar:not(.list) tbody td{padding:0;position:relative;text-align:right;border-bottom:1px solid #e1e1e1;border-left:1px solid #e1e1e1}table.calendar:not(.day) tbody td.saturday,table.calendar:not(.day) tbody td.sunday{background-color:#f1f1f1}table.calendar:not(.list) tbody td:hover{box-shadow:inset 0 0 0 1px #ccc!important}table.calendar a.sugar-calendar{display:block;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;margin:0;padding:0 5px}table.calendar a.sugar-calendar{position:relative;padding:0 20px 0 0}table.calendar a.sugar-calendar:before{font:normal 15px/18px dashicons;display:inline-block;position:absolute;right:2px;top:.5px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:18px;height:18px;margin:0}table.calendar.list a.sugar-calendar{display:inline;border-radius:3px;padding:5px 22px 5px 5px}table.calendar.list a.sugar-calendar:before{top:4.5px;right:5px}table.calendar.list .row-actions{margin-right:5px;margin-top:2px}.wp-pointer.sugar-calendar .wp-pointer-arrow{right:calc(50% - 15px)}.wp-pointer.sugar-calendar .wp-pointer-arrow-inner{border-top-color:#f4f4f4}.wp-pointer-content h3.type-sc_event:before,table.calendar a.type-sc_event:before{content:'\f145'}.wp-pointer-content h3.type-post:before,table.calendar a.type-post:before{content:'\f109'}.wp-pointer-content h3.type-page:before,table.calendar a.type-page:before{content:'\f105'}.wp-pointer-content h3.has-location:before,table.calendar a.has-location:before{content:"\f230"}.wp-pointer-content h3.all-day:before,table.calendar a.all-day:before{content:'\f469'}.wp-pointer-content h3.status-trash:before,table.calendar a.status-trash:before{content:'\f182'}.wp-pointer-content h3.status-private:before,table.calendar a.status-private:before{content:'\f530'}.wp-pointer-content h3.post-password-required:before,table.calendar a.post-password-required:before{content:'\f315'}.wp-pointer.sugar-calendar .wp-pointer-content p span,.wp-pointer.sugar-calendar .wp-pointer-content p strong{display:block}.wp-pointer.sugar-calendar .wp-pointer-content p span{margin-bottom:20px}.wp-pointer-actions{border-top:1px solid #ddd;background-color:#f4f4f4;padding:12px 10px 14px;margin:0 0 -38px;min-height:19px}.wp-pointer-actions .action{position:relative;margin-right:20px;margin-left:10px}.wp-pointer-actions .action a{text-decoration:none}.wp-pointer-actions .action a:before{background:0 0;color:#72777c;display:block!important;font:normal 16px/1 dashicons;speak:none;text-align:center;-webkit-font-smoothing:antialiased!important;width:10px;height:100%;position:absolute;right:-18px;top:0}.wp-pointer-actions .event-delete a{color:#dc3232}.wp-pointer-actions .event-delete a:active,.wp-pointer-actions .event-delete a:hover{color:#a00}.wp-pointer-actions .event-edit a:before{content:"\f464"}.wp-pointer-actions .event-restore a:before{content:"\f171"}.wp-pointer-actions .event-delete a:before{content:"\f158"}.wp-pointer-actions .event-view a:before{content:"\f103"}table.calendar:not(.draft) a.status-draft,table.calendar:not(.trash) a.status-trash{opacity:.5}@media screen and (max-width:782px){body.sugar-calendar .tablenav-pages{float:left;text-align:left;margin:7px 0 0 0;width:auto}table.calendar:not(.list) #the-list tr:last-child td:not(:last-child){border-bottom:1px solid #e1e1e1!important}table.calendar:not(.list) tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.check-column){display:block}table.calendar.list tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.column-primary)::before{right:32px}}table.month tbody td a.add-event-for-day,table.month tbody td a.day-number{padding:0;margin:0;position:absolute;top:0;height:26px;width:26px;text-align:center;color:#aaa;line-height:1.9em;font-weight:600;background-color:rgba(255,255,255,.8);border:1px solid transparent;border-bottom:1px solid #e1e1e1}table.month tbody td a.day-number{border-left:1px solid #e1e1e1;border-bottom-left-radius:5px}table.month tbody td a.add-event-for-day{border-right:1px solid #e1e1e1;left:0;visibility:hidden}table.month tbody td a.add-event-for-day:hover,table.month tbody td a.day-number:hover{background:rgba(245,245,245,.8)}table.month tbody td:hover a.add-event-for-day{visibility:visible}table.month tbody td:hover a.add-event-for-day,table.month tbody td:hover a.day-number{border-color:#ccc}table.month tbody td{position:relative}table.month tbody th{height:80px;background-color:#fff;border-bottom:1px solid #e1e1e1}table.month tbody tr th:last-of-type{border-left:1px solid #e1e1e1}table.month tbody tr td:nth-child(8){border-left:none}table.calendar.month tbody td.today{background:#ffe}table.month div.events-for-cell{margin:30px 0 5px;min-height:80px}table.month tbody td a i{line-height:1.9em;font-size:15px;overflow:hidden}table.month th.column-week{border-left:1px solid #e1e1e1}table.month tbody th.column-week{border-bottom:none;background-color:#fff;position:relative;text-align:center;z-index:1}table.month tbody th.column-week a{margin:auto auto;padding:10px;border:1px solid transparent;border-radius:5px;font-weight:600;color:#aaa;background-color:rgba(255,255,255,.8);z-index:3}table.month tbody th.column-week a:hover{background-color:#f1f1f1;border:1px solid #e1e1e1}.wp-pointer-content h3 a{color:#fff;text-decoration:none}.wp-pointer-content h3 a:hover{color:#eee}input#year{width:90px}@media screen and (max-width:782px){table.month div.events-for-cell{margin:0;padding-top:30px}table.month tbody th.padding{display:none}table.month tbody td{border-width:0 0 1px 0!important;padding:0;margin:0}}table.day td div.events-for-cell,table.day th,table.week td div.events-for-cell,table.week th{min-height:34px;position:relative}table.day th,table.week th{width:30px;background-color:#fff;color:#333;border-bottom:1px solid #e1e1e1;border-left:1px solid #e1e1e1;text-align:center;cursor:default}table.day tbody tr td:last-of-type,table.day tfoot tr th:last-of-type,table.day thead tr th:last-of-type,table.week tbody tr td:last-of-type,table.week tfoot tr th:last-of-type,table.week thead tr th:last-of-type{border-left:none}table.day tfoot tr th:not(:first-child),table.day thead tr th:not(:first-child),table.week tfoot tr th:not(:first-child),table.week thead tr th:not(:first-child){border-left:none}table.day tfoot tr:last-of-type th,table.week tfoot tr:last-of-type th{border-bottom:none}table.day tbody tr:not(.multi-day) th:first-of-type,table.week tbody tr:not(.multi-day) th:first-of-type{border-bottom:none}table.calendar.day tr.all-day td,table.calendar.day tr.multi-day td,table.calendar.week tr.all-day td,table.calendar.week tr.multi-day td{background-color:#efe}table.calendar.day tbody tr.this-hour td,table.calendar.week tbody tr.this-hour td{background:#ffe}table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:2px solid #e1e1e1}table.day th.column-hour,table.week th.column-hour{width:110px}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{width:100%}table.day th.manage-column,table.week th.manage-column{padding:0;vertical-align:top}table.day th.manage-column a,table.day th.manage-column span,table.week th.manage-column a,table.week th.manage-column span{padding:8px 10px;color:#32373c;display:block;height:calc(100% - 16px);width:calc(100% - 21px);-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}table.day th.manage-column a:active,table.day th.manage-column a:hover,table.week th.manage-column a:active,table.week th.manage-column a:hover{opacity:.5}@media screen and (max-width:782px){table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:1px solid #e1e1e1}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{display:block;width:auto}table.day tfoot th:nth-child(n+3),table.day thead th:nth-child(n+3),table.week tfoot th:nth-child(n+3),table.week thead th:nth-child(n+3){border-top:none}table.day tr:not(.inline-edit-row):not(.no-items) td:not(.check-column),table.week tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){min-height:35px}table.month th.column-week{display:none}}.tablenav-tools span.sc-timezone,.wp-pointer-content span.sc-timezone,table.list span.sc-timechange,table.list span.sc-timezone{font-size:11px;color:rgba(0,0,0,.4)}body.sugar-calendar form#adv-settings .metabox-prefs label{display:block;margin-top:-8px;margin-right:200px}body.sugar-calendar form#adv-settings .metabox-prefs legend+label{margin-top:-30px}body.sugar-calendar form#adv-settings .metabox-prefs{margin-bottom:10px}body.sugar-calendar form#adv-settings table.form-table{margin:0;padding:0}body.sugar-calendar form#adv-settings table.form-table *{font-size:13px;line-height:1.5em}body.sugar-calendar form#adv-settings table.form-table td,body.sugar-calendar form#adv-settings table.form-table th{padding:10px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs td label{padding:2px 0 2px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs span.date-time-text{display:inline-block;min-width:10em}body.sugar-calendar form#adv-settings .sc-date-time-prefs input.small-text{width:75px;margin:-2px 0} \ No newline at end of file +body.sugar-calendar #post-body-content{margin-bottom:0}.sugar-calendar-editor #wp-content-editor-tools{background-color:#fff;padding-top:0}#above_event_editor-sortables{margin-top:20px}.event-date,.event-time,.event-time-zone{display:inline-block;padding:4px 0}.sugar_calendar_datepicker{max-width:105px;height:30px;vertical-align:middle}.sugar_calendar_datepicker:after{display:inline-block;font:normal 20px/34px dashicons;color:#000;speak:none;vertical-align:top;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px;content:"\f508"}.event-time input{max-width:50px}body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone div.sc-select-chosen,body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone select:not(.sc-select-chosen){min-width:222px}@media only screen and (max-width:782px){.event-time div.sc-select-chosen,.event-time input,.event-time select:not(.sc-select-chosen){max-width:100px!important;display:inline-block!important}.sugar_calendar_datepicker{height:auto}}.widefat .column-duration,.widefat .column-end,.widefat .column-start{width:15%}.widefat .column-repeat{width:12%}body.sugar-calendar .wp-filter{margin-bottom:5px}.tablenav.top input[type=number]{width:80px;height:30px;vertical-align:middle}body.sugar-calendar .tablenav .tablenav-pages,body.sugar-calendar .tablenav .tablenav-tools{float:left;margin-bottom:5px}body.sugar-calendar .tablenav .tablenav-pages>*,body.sugar-calendar .tablenav .tablenav-tools>*{margin:0;display:inline-block}body.sugar-calendar .tablenav a.screen-options{padding:0;text-decoration:none;text-align:center}body.sugar-calendar .tablenav a.screen-options .dashicons{color:#b4b9be;padding:5px;vertical-align:middle;margin-top:-3px}body.sugar-calendar .tablenav a.screen-options:hover .dashicons{color:#727272}body.sugar-calendar .tablenav .tablenav-tools>span{padding:6px 10px}body.sugar-calendar .view-switch .view-list:before{content:'\f214'}.view-switch .view-month:before{content:'\f508';font-size:23px;margin-top:-3px;font-weight:500;-webkit-font-smoothing:subpixel-antialiased}.view-switch .view-week:before{content:'\f164'}.view-switch .view-day:before{content:'\f163'}.view-switch a.current{background-color:#007cba;border-radius:3px}.view-switch a.current:before{color:#fff}body.admin-color-fresh .view-switch a.current{background-color:#007cba}body.admin-color-blue .view-switch a.current{background-color:#096484}body.admin-color-coffee .view-switch a.current{background-color:#c7a589}body.admin-color-ectoplasm .view-switch a.current{background-color:#a3b745}body.admin-color-midnight .view-switch a.current{background-color:#e14d43}body.admin-color-modern .view-switch a.current{background-color:#3858e9}body.admin-color-ocean .view-switch a.current{background-color:#9ebaa0}body.admin-color-sunrise .view-switch a.current{background-color:#dd823b}body.admin-color-light .view-switch a.current{background-color:#04a4cc}body.admin-color-evergreen .view-switch a.current{background-color:#36533f}body.admin-color-mint .view-switch a.current{background-color:#4f6d59}table.calendar:not(.list){table-layout:fixed;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}table.calendar:not(.list) tfoot th,table.calendar:not(.list) thead th{text-align:center}table.calendar.striped>tbody>:nth-child(even) td{background-color:#fff}table.calendar.striped>tbody>:nth-child(odd) td{background-color:#f9f9f9}table.calendar:not(.list) tbody td{padding:0;position:relative;text-align:right;border-bottom:1px solid #e1e1e1;border-left:1px solid #e1e1e1}table.calendar:not(.day) tbody td.saturday,table.calendar:not(.day) tbody td.sunday{background-color:#f1f1f1}table.calendar:not(.list) tbody td:hover{box-shadow:inset 0 0 0 1px #ccc!important}table.calendar a.sugar-calendar{display:block;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;margin:0;padding:0 5px}table.calendar a.sugar-calendar{position:relative;padding:0 20px 0 0}table.calendar a.sugar-calendar:before{font:normal 15px/18px dashicons;display:inline-block;position:absolute;right:2px;top:.5px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:18px;height:18px;margin:0}table.calendar.list a.sugar-calendar{display:inline;border-radius:3px;padding:5px 22px 5px 5px}table.calendar.list a.sugar-calendar:before{top:4.5px;right:5px}table.calendar.list .row-actions{margin-right:5px;margin-top:2px}.wp-pointer.sugar-calendar .wp-pointer-arrow{right:calc(50% - 15px)}.wp-pointer.sugar-calendar .wp-pointer-arrow-inner{border-top-color:#f4f4f4}.wp-pointer-content h3.type-sc_event:before,table.calendar a.type-sc_event:before{content:'\f145'}.wp-pointer-content h3.type-post:before,table.calendar a.type-post:before{content:'\f109'}.wp-pointer-content h3.type-page:before,table.calendar a.type-page:before{content:'\f105'}.wp-pointer-content h3.has-location:before,table.calendar a.has-location:before{content:"\f230"}.wp-pointer-content h3.all-day:before,table.calendar a.all-day:before{content:'\f469'}.wp-pointer-content h3.status-trash:before,table.calendar a.status-trash:before{content:'\f182'}.wp-pointer-content h3.status-private:before,table.calendar a.status-private:before{content:'\f530'}.wp-pointer-content h3.post-password-required:before,table.calendar a.post-password-required:before{content:'\f315'}.wp-pointer.sugar-calendar .wp-pointer-content p span,.wp-pointer.sugar-calendar .wp-pointer-content p strong{display:block}.wp-pointer.sugar-calendar .wp-pointer-content p span{margin-bottom:20px}.wp-pointer.sugar-calendar .wp-pointer-actions{border-top:1px solid #ddd;background-color:#f4f4f4;padding:12px 10px 14px;margin:0 0 -38px;min-height:19px}.wp-pointer.sugar-calendar .wp-pointer-actions .action{position:relative;margin:0;padding:0 5px}.wp-pointer.sugar-calendar .wp-pointer-actions .action:first-child{margin-right:10px;padding-right:0}.wp-pointer.sugar-calendar .wp-pointer-actions .action:not(:last-child){border-left:1px solid #dcdcde}.wp-pointer.sugar-calendar .wp-pointer-actions .action a{text-decoration:none}.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a{color:#dc3232}.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:active,.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:hover{color:#a00}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close{color:#aaa}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:active,.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:hover{color:#bbb}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:before{display:none!important}table.calendar:not(.draft) a.status-draft,table.calendar:not(.trash) a.status-trash{opacity:.5}@media screen and (max-width:782px){body.sugar-calendar .tablenav-pages{float:left;text-align:left;margin:7px 0 0 0;width:auto}table.calendar:not(.list) #the-list tr:last-child td:not(:last-child){border-bottom:1px solid #e1e1e1!important}table.calendar:not(.list) tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.check-column){display:block}table.calendar.list tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.column-primary)::before{right:32px}}table.month tbody td a.add-event-for-day,table.month tbody td a.day-number{padding:0;margin:0;position:absolute;top:0;height:26px;width:26px;text-align:center;color:#aaa;line-height:1.9em;font-weight:600;background-color:rgba(255,255,255,.8);border:1px solid transparent;border-bottom:1px solid #e1e1e1}table.month tbody td a.day-number{border-left:1px solid #e1e1e1;border-bottom-left-radius:5px}table.month tbody td a.add-event-for-day{border-right:1px solid #e1e1e1;left:0;visibility:hidden}table.month tbody td a.add-event-for-day:hover,table.month tbody td a.day-number:hover{background:rgba(245,245,245,.8)}table.month tbody td:hover a.add-event-for-day{visibility:visible}table.month tbody td:hover a.add-event-for-day,table.month tbody td:hover a.day-number{border-color:#ccc}table.month tbody td{position:relative}table.month tbody th{height:80px;background-color:#fff;border-bottom:1px solid #e1e1e1}table.month tbody tr th:last-of-type{border-left:1px solid #e1e1e1}table.month tbody tr td:nth-child(8){border-left:none}table.calendar.month tbody td.today{background:#ffe}table.month div.events-for-cell{margin:30px 0 5px;min-height:80px}table.month tbody td a i{line-height:1.9em;font-size:15px;overflow:hidden}table.month th.column-week{border-left:1px solid #e1e1e1}table.month tbody th.column-week{border-bottom:none;background-color:#fff;position:relative;text-align:center;z-index:1}table.month tbody th.column-week a{margin:auto auto;padding:10px;border:1px solid transparent;border-radius:5px;font-weight:600;color:#aaa;background-color:rgba(255,255,255,.8);z-index:3}table.month tbody th.column-week a:hover{background-color:#f1f1f1;border:1px solid #e1e1e1}.wp-pointer-content h3 a{color:#fff;text-decoration:none}.wp-pointer-content h3 a:hover{color:#eee}input#year{width:90px}@media screen and (max-width:782px){table.month div.events-for-cell{margin:0;padding-top:30px}table.month tbody th.padding{display:none}table.month tbody td{border-width:0 0 1px 0!important;padding:0;margin:0}}table.day td div.events-for-cell,table.day th,table.week td div.events-for-cell,table.week th{min-height:34px;position:relative}table.day th,table.week th{width:30px;background-color:#fff;color:#333;border-bottom:1px solid #e1e1e1;border-left:1px solid #e1e1e1;text-align:center;cursor:default}table.day tbody tr td:last-of-type,table.day tfoot tr th:last-of-type,table.day thead tr th:last-of-type,table.week tbody tr td:last-of-type,table.week tfoot tr th:last-of-type,table.week thead tr th:last-of-type{border-left:none}table.day tfoot tr th:not(:first-child),table.day thead tr th:not(:first-child),table.week tfoot tr th:not(:first-child),table.week thead tr th:not(:first-child){border-left:none}table.day tfoot tr:last-of-type th,table.week tfoot tr:last-of-type th{border-bottom:none}table.day tbody tr:not(.multi-day) th:first-of-type,table.week tbody tr:not(.multi-day) th:first-of-type{border-bottom:none}table.calendar.day tr.all-day td,table.calendar.day tr.multi-day td,table.calendar.week tr.all-day td,table.calendar.week tr.multi-day td{background-color:#efe}table.calendar.day tbody tr.this-hour td,table.calendar.week tbody tr.this-hour td{background:#ffe}table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:2px solid #e1e1e1}table.day th.column-hour,table.week th.column-hour{width:110px}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{width:100%}table.day th.manage-column,table.week th.manage-column{padding:0;vertical-align:top}table.day th.manage-column a,table.day th.manage-column span,table.week th.manage-column a,table.week th.manage-column span{padding:8px 10px;color:#32373c;display:block;height:calc(100% - 16px);width:calc(100% - 21px);-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}table.day th.manage-column a:active,table.day th.manage-column a:hover,table.week th.manage-column a:active,table.week th.manage-column a:hover{opacity:.5}@media screen and (max-width:782px){table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:1px solid #e1e1e1}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{display:block;width:auto}table.day tfoot th:nth-child(n+3),table.day thead th:nth-child(n+3),table.week tfoot th:nth-child(n+3),table.week thead th:nth-child(n+3){border-top:none}table.day tr:not(.inline-edit-row):not(.no-items) td:not(.check-column),table.week tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){min-height:35px}table.month th.column-week{display:none}}.tablenav-tools span.sc-timezone,.wp-pointer-content span.sc-timezone,table.list span.sc-timechange,table.list span.sc-timezone{font-size:11px;color:rgba(0,0,0,.4)}body.sugar-calendar form#adv-settings .metabox-prefs label{display:block;margin-top:-8px;margin-right:200px}body.sugar-calendar form#adv-settings .metabox-prefs legend+label{margin-top:-30px}body.sugar-calendar form#adv-settings .metabox-prefs{margin-bottom:10px}body.sugar-calendar form#adv-settings table.form-table{margin:0;padding:0}body.sugar-calendar form#adv-settings table.form-table *{font-size:13px;line-height:1.5em}body.sugar-calendar form#adv-settings table.form-table td,body.sugar-calendar form#adv-settings table.form-table th{padding:10px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs td label{padding:2px 0 2px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs span.date-time-text{display:inline-block;min-width:10em}body.sugar-calendar form#adv-settings .sc-date-time-prefs input.small-text{width:75px;margin:-2px 0} \ No newline at end of file diff --git a/sugar-calendar/includes/admin/assets/css/rtl/sc-calendar.css b/sugar-calendar/includes/admin/assets/css/rtl/sc-calendar.css index dcbf9e0c..67ce369c 100644 --- a/sugar-calendar/includes/admin/assets/css/rtl/sc-calendar.css +++ b/sugar-calendar/includes/admin/assets/css/rtl/sc-calendar.css @@ -319,7 +319,7 @@ table.calendar a.post-password-required:before { margin-bottom: 20px; } -.wp-pointer-actions { +.wp-pointer.sugar-calendar .wp-pointer-actions { border-top: 1px solid #ddd; background-color: #f4f4f4; padding: 12px 10px 14px; @@ -327,54 +327,45 @@ table.calendar a.post-password-required:before { min-height: 19px; } -.wp-pointer-actions .action { +.wp-pointer.sugar-calendar .wp-pointer-actions .action { position: relative; - margin-right: 20px; - margin-left: 10px; + margin: 0; + padding: 0 5px; } -.wp-pointer-actions .action a { - text-decoration: none; +.wp-pointer.sugar-calendar .wp-pointer-actions .action:first-child { + margin-right: 10px; + padding-right: 0; } -.wp-pointer-actions .action a:before { - background: none; - color: #72777c; - display: block !important; - font: normal 16px/1 dashicons; - speak: none; - text-align: center; - -webkit-font-smoothing: antialiased !important; - width: 10px; - height: 100%; - position: absolute; - right: -18px; - top: 0px; +.wp-pointer.sugar-calendar .wp-pointer-actions .action:not(:last-child) { + border-left: 1px solid #dcdcde; } -.wp-pointer-actions .event-delete a { - color: #dc3232; +.wp-pointer.sugar-calendar .wp-pointer-actions .action a { + text-decoration: none; } -.wp-pointer-actions .event-delete a:hover, -.wp-pointer-actions .event-delete a:active { - color: #a00; +.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a { + color: #dc3232; } -.wp-pointer-actions .event-edit a:before { - content: "\f464"; +.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:hover, +.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:active { + color: #a00; } -.wp-pointer-actions .event-restore a:before { - content: "\f171"; +.wp-pointer.sugar-calendar .wp-pointer-buttons a.close { + color: #aaa; } -.wp-pointer-actions .event-delete a:before { - content: "\f158"; +.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:hover, +.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:active { + color: #bbb; } -.wp-pointer-actions .event-view a:before { - content: "\f103"; +.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:before { + display: none !important; } table.calendar:not(.draft) a.status-draft, diff --git a/sugar-calendar/includes/languages/sugar-calendar.pot b/sugar-calendar/includes/languages/sugar-calendar.pot index b2ed6b5f..3dcd6799 100644 --- a/sugar-calendar/includes/languages/sugar-calendar.pot +++ b/sugar-calendar/includes/languages/sugar-calendar.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Sugar Calendar (Lite) 2.1.7\n" "Report-Msgid-Bugs-To: https://sugarcalendar.com\n" -"POT-Creation-Date: 2021-02-11 18:04:06+00:00\n" +"POT-Creation-Date: 2021-02-23 18:13:14+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -228,7 +228,7 @@ msgstr "" #: sugar-calendar/includes/admin/help.php:112 #: sugar-calendar/includes/admin/help.php:574 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2361 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2411 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:455 #: sugar-calendar/includes/admin/meta-boxes.php:1033 #: sugar-calendar/includes/post/functions.php:132 @@ -735,7 +735,7 @@ msgid "(No title)" msgstr "" #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1973 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:666 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:674 msgid "Restore" msgstr "" @@ -748,87 +748,92 @@ msgstr "" msgid "Edit" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2240 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2250 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1987 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:663 +msgid "Duplicate" +msgstr "" + +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2290 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2300 #: sugar-calendar/includes/admin/meta-boxes.php:112 msgid "Details" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2241 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2291 msgid "Password protected" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2339 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2346 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2353 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2373 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2380 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2387 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2411 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2389 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2396 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2403 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2423 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2430 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2437 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2461 #: sugar-calendar/includes/admin/meta-boxes.php:1046 msgid "Start" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2341 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2348 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2355 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2375 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2382 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2389 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2430 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2391 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2398 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2405 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2425 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2432 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2439 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2480 #: sugar-calendar/includes/admin/meta-boxes.php:1109 msgid "End" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2506 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2556 #: sugar-calendar/includes/admin/meta-boxes/class-wp-meta-box.php:86 #: sugar-calendar/includes/admin/meta-boxes.php:1229 msgid "Location" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2849 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2899 #: sugar-calendar/includes/post/types.php:71 msgid "Search Events" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2850 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2900 msgid "Search events..." msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3238 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3288 msgid "Filter by %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3298 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3348 msgid "Switch to this month" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3314 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3364 msgid "Set the day" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3329 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3379 msgid "Set the first year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3332 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3382 #: sugar-calendar/includes/themes/legacy/event-display.php:221 msgid "to" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3334 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3384 msgid "Set the last year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3342 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3392 msgid "Set the year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3369 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3419 msgid "Empty Trash" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3406 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3456 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-day.php:115 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:540 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-month.php:314 @@ -836,23 +841,23 @@ msgstr "" msgid "Today" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3407 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3457 msgid "Next month" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3408 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3458 msgid "Next year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3409 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3459 msgid "Previous month" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3410 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3460 msgid "Previous year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3476 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3526 #: sugar-calendar/includes/admin/settings.php:537 #: sugar-calendar/includes/admin/settings.php:594 msgid "Options" @@ -921,45 +926,50 @@ msgstr "" msgid "Edit “%s”" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:665 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:662 #. translators: %s: post title -msgid "Restore “%s” from the Trash" +msgid "Duplicate “%s”" msgstr "" #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:673 #. translators: %s: post title +msgid "Restore “%s” from the Trash" +msgstr "" + +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:681 +#. translators: %s: post title msgid "Move “%s” to the Trash" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:682 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:690 #. translators: %s: post title msgid "Delete “%s” permanently" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:683 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:691 msgid "Delete Permanently" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:696 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:704 #. translators: %s: post title msgid "Preview “%s”" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:697 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:705 msgid "Preview" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:705 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:713 #. translators: %s: post title msgid "View “%s”" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:716 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:724 #. translators: %s: post title msgid "Export “%s” as JSON" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:717 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:725 msgid "Export as JSON" msgstr "" @@ -1774,31 +1784,31 @@ msgid_plural "All (%s)" msgstr[0] "" msgstr[1] "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1991 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3365 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:706 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1992 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3415 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:714 msgctxt "verb" msgid "View" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:674 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:682 msgctxt "verb" msgid "Trash" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2289 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2309 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2339 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2359 msgctxt "Time Time Zone" msgid "%s %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2401 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2420 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2451 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2470 msgctxt "20:00 on Friday" msgid "%s on %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2442 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2492 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:233 msgctxt "Noun" msgid "Repeats" @@ -1824,22 +1834,22 @@ msgctxt "Noun" msgid "Duration" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2451 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2501 msgctxt "Weekly from December 1, 2030 until December 31, 2030" msgid "%s from %s until %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2462 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2512 msgctxt "Weekly forever, starting May 15, 1980" msgid "%s starting %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2471 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2521 msgctxt "Weekly forever" msgid "%s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3286 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3336 msgctxt "Verb" msgid "Filter" msgstr "" From 08f4c9696a931883246f5dc7955e19e7b9d95950 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Wed, 24 Feb 2021 17:14:32 -0600 Subject: [PATCH 09/20] Unset the ID key in the correct variable, so that copying posts works. --- sugar-calendar/includes/post/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sugar-calendar/includes/post/functions.php b/sugar-calendar/includes/post/functions.php index cdbf57de..1e3f475a 100644 --- a/sugar-calendar/includes/post/functions.php +++ b/sugar-calendar/includes/post/functions.php @@ -182,7 +182,7 @@ function sugar_calendar_copy_post( $original_id = 0, $data = array() ) { $save = array_merge( $post, $data ); // Unset the ID column, so an update does not occur - unset( $post['ID'] ); + unset( $save['ID'] ); // Insert the post into the database $new_id = wp_insert_post( $save, false, false ); From 00fd30044625e237c7d287ae041cec5c8ce89f02 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Wed, 24 Feb 2021 18:32:43 -0600 Subject: [PATCH 10/20] Strict comparisons in List list-table class row actions. --- .../includes/admin/list-tables/class-wp-list-table-list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php index 250a7c23..b63c2f16 100644 --- a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php +++ b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php @@ -646,7 +646,7 @@ private function get_post_row_actions( $item ) { $actions = array(); $title = _draft_or_post_title(); - if ( $can_edit_post && 'trash' != $post->post_status ) { + if ( $can_edit_post && 'trash' !== $post->post_status ) { $actions['edit'] = sprintf( '%s', get_edit_post_link( $post->ID ), @@ -694,7 +694,7 @@ private function get_post_row_actions( $item ) { } if ( is_post_type_viewable( $post_type_object ) ) { - if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) { + if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ), true ) ) { if ( $can_edit_post ) { $preview_link = get_preview_post_link( $post ); $actions['view'] = sprintf( @@ -705,7 +705,7 @@ private function get_post_row_actions( $item ) { esc_html__( 'Preview', 'sugar-calendar' ) ); } - } elseif ( 'trash' != $post->post_status ) { + } elseif ( 'trash' !== $post->post_status ) { $actions['view'] = sprintf( '%s', get_permalink( $post->ID ), From a7deb4f8a1d4050585bb4ec36958842933f4df20 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Wed, 24 Feb 2021 18:34:34 -0600 Subject: [PATCH 11/20] Clean up delete, restore, and copy URL methods of list table base class. --- .../list-tables/class-wp-list-table-base.php | 93 +++++++++---------- 1 file changed, 45 insertions(+), 48 deletions(-) diff --git a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php index a9ccc399..ea174f2a 100644 --- a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php +++ b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php @@ -1975,7 +1975,7 @@ protected function get_pointer_links( $event = false ) { // Maybe add delete link if ( $this->current_user_can_delete( $event ) ) { - $links['delete'] = '' . $this->get_event_delete_link( $event, esc_html__( 'Delete', 'sugar-calendar' ) ) . ''; + $links['delete'] = '' . $this->get_event_delete_link( $event, esc_html__( 'Delete Permanently', 'sugar-calendar' ) ) . ''; } // Not trashed, so offer to Edit or View @@ -1987,6 +1987,11 @@ protected function get_pointer_links( $event = false ) { $links['copy'] = '' . $this->get_event_copy_link( $event, esc_html__( 'Duplicate', 'sugar-calendar' ) ) . ''; } + // Maybe add delete link + if ( $this->current_user_can_delete( $event ) ) { + $links['delete'] = '' . $this->get_event_delete_link( $event, esc_html__( 'Trash', 'sugar-calendar' ) ) . ''; + } + // Add view link if ( $this->current_user_can_view( $event ) ) { $links['view'] = '' . $this->get_event_view_link( $event, esc_html_x( 'View', 'verb', 'sugar-calendar' ) ) . ''; @@ -2116,25 +2121,21 @@ protected function get_event_edit_url( $event = false ) { protected function get_event_copy_url( $event = false ) { // Default return value - $retval = ''; + $retval = $this->get_event_edit_url( $event ); - // Type of object - switch ( $event->object_type ) { - case 'post' : - $retval = get_edit_post_link( $event->object_id ); - break; - - case 'user' : - $retval = get_edit_user_link( $event->object_id ); - break; + // Arguments + $action = 'copy'; + $args = array( + 'action' => $action, + 'wp_http_referer' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) + ); - case 'comment' : - $retval = get_edit_comment_link( $event->object_id ); - break; - } + // URL + $url = add_query_arg( $args, $retval ); + $nonce = "{$action}-{$event->object_type}_{$event->object_id}"; - // Return the HTML - return $retval; + // Return the URL + return wp_nonce_url( $url, $nonce ); } /** @@ -2151,25 +2152,25 @@ protected function get_event_copy_url( $event = false ) { protected function get_event_delete_url( $event = false ) { // Default return value - $retval = ''; + $retval = $this->get_event_edit_url( $event ); - // Type of object - switch ( $event->object_type ) { - case 'post' : - $retval = wp_nonce_url( add_query_arg( array( 'action' => 'delete' ), get_edit_post_link( $event->object_id ) ), 'delete-post_' . $event->object_id ); - break; + // Action + $action = ( 'trash' !== $event->status ) && EMPTY_TRASH_DAYS + ? 'trash' + : 'delete'; - case 'user' : - $retval = get_edit_user_link( $event->object_id ); - break; + // Arguments + $args = array( + 'action' => $action, + 'wp_http_referer' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) + ); - case 'comment' : - $retval = get_edit_comment_link( $event->object_id ); - break; - } + // URL + $url = add_query_arg( $args, $retval ); + $nonce = "{$action}-{$event->object_type}_{$event->object_id}"; - // Return the HTML - return $retval; + // Return the URL + return wp_nonce_url( $url, $nonce ); } /** @@ -2186,25 +2187,21 @@ protected function get_event_delete_url( $event = false ) { protected function get_event_restore_url( $event = false ) { // Default return value - $retval = ''; - - // Type of object - switch ( $event->object_type ) { - case 'post' : - $retval = wp_nonce_url( add_query_arg( array( 'action' => 'untrash' ), get_edit_post_link( $event->object_id ) ), 'untrash-post_' . $event->object_id ); - break; + $retval = $this->get_event_edit_url( $event ); - case 'user' : - $retval = get_edit_user_link( $event->object_id ); - break; + // Arguments + $action = 'untrash'; + $args = array( + 'action' => $action, + 'wp_http_referer' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) + ); - case 'comment' : - $retval = get_edit_comment_link( $event->object_id ); - break; - } + // URL + $url = add_query_arg( $args, $retval ); + $nonce = "{$action}-{$event->object_type}_{$event->object_id}"; - // Return the HTML - return $retval; + // Return the URL + return wp_nonce_url( $url, $nonce ); } /** From 37e9ba6f5034c2e9e2545aebbfd5f915906c7536 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Wed, 24 Feb 2021 18:46:10 -0600 Subject: [PATCH 12/20] Merge BerlinDB Query fix. --- .../includes/classes/database/engine/class-query.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sugar-calendar/includes/classes/database/engine/class-query.php b/sugar-calendar/includes/classes/database/engine/class-query.php index 4b4414e7..fd7b28af 100644 --- a/sugar-calendar/includes/classes/database/engine/class-query.php +++ b/sugar-calendar/includes/classes/database/engine/class-query.php @@ -1830,8 +1830,13 @@ public function copy_item( $item_id = 0, $data = array() ) { return false; } - // Merge data with original item - $save = array_merge( $item, $data ); + // Cast object to array + $save = (array) $item; + + // Maybe merge data with original item + if ( ! empty( $data ) && is_array( $data ) ) { + $save = array_merge( $save, $data ); + } // Unset the primary key unset( $save[ $primary ] ); From 3504afdc449d9846bde2ce96bc959792456c3bc2 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Wed, 24 Feb 2021 19:11:20 -0600 Subject: [PATCH 13/20] Add styling for unlinked list table titles (in Trash) --- .../admin/assets/css/ltr/sc-calendar.css | 21 ++++++++++++------- .../admin/assets/css/min/ltr/sc-calendar.css | 2 +- .../admin/assets/css/min/rtl/sc-calendar.css | 2 +- .../admin/assets/css/rtl/sc-calendar.css | 21 ++++++++++++------- 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/sugar-calendar/includes/admin/assets/css/ltr/sc-calendar.css b/sugar-calendar/includes/admin/assets/css/ltr/sc-calendar.css index e7879727..605b935a 100644 --- a/sugar-calendar/includes/admin/assets/css/ltr/sc-calendar.css +++ b/sugar-calendar/includes/admin/assets/css/ltr/sc-calendar.css @@ -217,7 +217,8 @@ table.calendar:not(.list) tbody td:hover { box-shadow: inset 0 0 0 1px #ccc !important; } -table.calendar a.sugar-calendar { +table.calendar a.sugar-calendar, +table.calendar.list strong.status-trash { display: block; -o-text-overflow: ellipsis; text-overflow: ellipsis; @@ -227,12 +228,14 @@ table.calendar a.sugar-calendar { padding: 0 5px; } -table.calendar a.sugar-calendar { +table.calendar a.sugar-calendar, +table.calendar.list strong.status-trash { position: relative; padding: 0 0 0 20px; } -table.calendar a.sugar-calendar:before { +table.calendar a.sugar-calendar:before, +table.calendar.list strong.status-trash:before { font: normal 15px/18px 'dashicons'; display: inline-block; position: absolute; @@ -246,13 +249,15 @@ table.calendar a.sugar-calendar:before { margin: 0; } -table.calendar.list a.sugar-calendar { +table.calendar.list a.sugar-calendar, +table.calendar.list strong.status-trash { display: inline; border-radius: 3px; padding: 5px 5px 5px 22px; } -table.calendar.list a.sugar-calendar:before { +table.calendar.list a.sugar-calendar:before, +table.calendar.list strong.status-trash:before { top: 4.5px; left: 5px; } @@ -296,7 +301,8 @@ table.calendar a.all-day:before { } .wp-pointer-content h3.status-trash:before, -table.calendar a.status-trash:before { +table.calendar a.status-trash:before, +table.calendar.list strong.status-trash:before { content: '\f182'; } @@ -369,7 +375,8 @@ table.calendar a.post-password-required:before { } table.calendar:not(.draft) a.status-draft, -table.calendar:not(.trash) a.status-trash { +table.calendar:not(.trash) a.status-trash, +table.calendar:not(.trash) strong.status-trash { opacity: 0.5; } diff --git a/sugar-calendar/includes/admin/assets/css/min/ltr/sc-calendar.css b/sugar-calendar/includes/admin/assets/css/min/ltr/sc-calendar.css index 965a0cf8..196bb566 100644 --- a/sugar-calendar/includes/admin/assets/css/min/ltr/sc-calendar.css +++ b/sugar-calendar/includes/admin/assets/css/min/ltr/sc-calendar.css @@ -1 +1 @@ -body.sugar-calendar #post-body-content{margin-bottom:0}.sugar-calendar-editor #wp-content-editor-tools{background-color:#fff;padding-top:0}#above_event_editor-sortables{margin-top:20px}.event-date,.event-time,.event-time-zone{display:inline-block;padding:4px 0}.sugar_calendar_datepicker{max-width:105px;height:30px;vertical-align:middle}.sugar_calendar_datepicker:after{display:inline-block;font:normal 20px/34px dashicons;color:#000;speak:none;vertical-align:top;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px;content:"\f508"}.event-time input{max-width:50px}body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone div.sc-select-chosen,body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone select:not(.sc-select-chosen){min-width:222px}@media only screen and (max-width:782px){.event-time div.sc-select-chosen,.event-time input,.event-time select:not(.sc-select-chosen){max-width:100px!important;display:inline-block!important}.sugar_calendar_datepicker{height:auto}}.widefat .column-duration,.widefat .column-end,.widefat .column-start{width:15%}.widefat .column-repeat{width:12%}body.sugar-calendar .wp-filter{margin-bottom:5px}.tablenav.top input[type=number]{width:80px;height:30px;vertical-align:middle}body.sugar-calendar .tablenav .tablenav-pages,body.sugar-calendar .tablenav .tablenav-tools{float:right;margin-bottom:5px}body.sugar-calendar .tablenav .tablenav-pages>*,body.sugar-calendar .tablenav .tablenav-tools>*{margin:0;display:inline-block}body.sugar-calendar .tablenav a.screen-options{padding:0;text-decoration:none;text-align:center}body.sugar-calendar .tablenav a.screen-options .dashicons{color:#b4b9be;padding:5px;vertical-align:middle;margin-top:-3px}body.sugar-calendar .tablenav a.screen-options:hover .dashicons{color:#727272}body.sugar-calendar .tablenav .tablenav-tools>span{padding:6px 10px}body.sugar-calendar .view-switch .view-list:before{content:'\f214'}.view-switch .view-month:before{content:'\f508';font-size:23px;margin-top:-3px;font-weight:500;-webkit-font-smoothing:subpixel-antialiased}.view-switch .view-week:before{content:'\f164'}.view-switch .view-day:before{content:'\f163'}.view-switch a.current{background-color:#007cba;border-radius:3px}.view-switch a.current:before{color:#fff}body.admin-color-fresh .view-switch a.current{background-color:#007cba}body.admin-color-blue .view-switch a.current{background-color:#096484}body.admin-color-coffee .view-switch a.current{background-color:#c7a589}body.admin-color-ectoplasm .view-switch a.current{background-color:#a3b745}body.admin-color-midnight .view-switch a.current{background-color:#e14d43}body.admin-color-modern .view-switch a.current{background-color:#3858e9}body.admin-color-ocean .view-switch a.current{background-color:#9ebaa0}body.admin-color-sunrise .view-switch a.current{background-color:#dd823b}body.admin-color-light .view-switch a.current{background-color:#04a4cc}body.admin-color-evergreen .view-switch a.current{background-color:#36533f}body.admin-color-mint .view-switch a.current{background-color:#4f6d59}table.calendar:not(.list){table-layout:fixed;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}table.calendar:not(.list) tfoot th,table.calendar:not(.list) thead th{text-align:center}table.calendar.striped>tbody>:nth-child(even) td{background-color:#fff}table.calendar.striped>tbody>:nth-child(odd) td{background-color:#f9f9f9}table.calendar:not(.list) tbody td{padding:0;position:relative;text-align:left;border-bottom:1px solid #e1e1e1;border-right:1px solid #e1e1e1}table.calendar:not(.day) tbody td.saturday,table.calendar:not(.day) tbody td.sunday{background-color:#f1f1f1}table.calendar:not(.list) tbody td:hover{box-shadow:inset 0 0 0 1px #ccc!important}table.calendar a.sugar-calendar{display:block;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;margin:0;padding:0 5px}table.calendar a.sugar-calendar{position:relative;padding:0 0 0 20px}table.calendar a.sugar-calendar:before{font:normal 15px/18px dashicons;display:inline-block;position:absolute;left:2px;top:.5px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:18px;height:18px;margin:0}table.calendar.list a.sugar-calendar{display:inline;border-radius:3px;padding:5px 5px 5px 22px}table.calendar.list a.sugar-calendar:before{top:4.5px;left:5px}table.calendar.list .row-actions{margin-left:5px;margin-top:2px}.wp-pointer.sugar-calendar .wp-pointer-arrow{left:calc(50% - 15px)}.wp-pointer.sugar-calendar .wp-pointer-arrow-inner{border-top-color:#f4f4f4}.wp-pointer-content h3.type-sc_event:before,table.calendar a.type-sc_event:before{content:'\f145'}.wp-pointer-content h3.type-post:before,table.calendar a.type-post:before{content:'\f109'}.wp-pointer-content h3.type-page:before,table.calendar a.type-page:before{content:'\f105'}.wp-pointer-content h3.has-location:before,table.calendar a.has-location:before{content:"\f230"}.wp-pointer-content h3.all-day:before,table.calendar a.all-day:before{content:'\f469'}.wp-pointer-content h3.status-trash:before,table.calendar a.status-trash:before{content:'\f182'}.wp-pointer-content h3.status-private:before,table.calendar a.status-private:before{content:'\f530'}.wp-pointer-content h3.post-password-required:before,table.calendar a.post-password-required:before{content:'\f315'}.wp-pointer.sugar-calendar .wp-pointer-content p span,.wp-pointer.sugar-calendar .wp-pointer-content p strong{display:block}.wp-pointer.sugar-calendar .wp-pointer-content p span{margin-bottom:20px}.wp-pointer.sugar-calendar .wp-pointer-actions{border-top:1px solid #ddd;background-color:#f4f4f4;padding:12px 10px 14px;margin:0 0 -38px;min-height:19px}.wp-pointer.sugar-calendar .wp-pointer-actions .action{position:relative;margin:0;padding:0 5px}.wp-pointer.sugar-calendar .wp-pointer-actions .action:first-child{margin-left:10px;padding-left:0}.wp-pointer.sugar-calendar .wp-pointer-actions .action:not(:last-child){border-right:1px solid #dcdcde}.wp-pointer.sugar-calendar .wp-pointer-actions .action a{text-decoration:none}.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a{color:#dc3232}.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:active,.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:hover{color:#a00}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close{color:#aaa}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:active,.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:hover{color:#bbb}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:before{display:none!important}table.calendar:not(.draft) a.status-draft,table.calendar:not(.trash) a.status-trash{opacity:.5}@media screen and (max-width:782px){body.sugar-calendar .tablenav-pages{float:right;text-align:right;margin:7px 0 0 0;width:auto}table.calendar:not(.list) #the-list tr:last-child td:not(:last-child){border-bottom:1px solid #e1e1e1!important}table.calendar:not(.list) tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.check-column){display:block}table.calendar.list tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.column-primary)::before{left:32px}}table.month tbody td a.add-event-for-day,table.month tbody td a.day-number{padding:0;margin:0;position:absolute;top:0;height:26px;width:26px;text-align:center;color:#aaa;line-height:1.9em;font-weight:600;background-color:rgba(255,255,255,.8);border:1px solid transparent;border-bottom:1px solid #e1e1e1}table.month tbody td a.day-number{border-right:1px solid #e1e1e1;border-bottom-right-radius:5px}table.month tbody td a.add-event-for-day{border-left:1px solid #e1e1e1;right:0;visibility:hidden}table.month tbody td a.add-event-for-day:hover,table.month tbody td a.day-number:hover{background:rgba(245,245,245,.8)}table.month tbody td:hover a.add-event-for-day{visibility:visible}table.month tbody td:hover a.add-event-for-day,table.month tbody td:hover a.day-number{border-color:#ccc}table.month tbody td{position:relative}table.month tbody th{height:80px;background-color:#fff;border-bottom:1px solid #e1e1e1}table.month tbody tr th:last-of-type{border-right:1px solid #e1e1e1}table.month tbody tr td:nth-child(8){border-right:none}table.calendar.month tbody td.today{background:#ffe}table.month div.events-for-cell{margin:30px 0 5px;min-height:80px}table.month tbody td a i{line-height:1.9em;font-size:15px;overflow:hidden}table.month th.column-week{border-right:1px solid #e1e1e1}table.month tbody th.column-week{border-bottom:none;background-color:#fff;position:relative;text-align:center;z-index:1}table.month tbody th.column-week a{margin:auto auto;padding:10px;border:1px solid transparent;border-radius:5px;font-weight:600;color:#aaa;background-color:rgba(255,255,255,.8);z-index:3}table.month tbody th.column-week a:hover{background-color:#f1f1f1;border:1px solid #e1e1e1}.wp-pointer-content h3 a{color:#fff;text-decoration:none}.wp-pointer-content h3 a:hover{color:#eee}input#year{width:90px}@media screen and (max-width:782px){table.month div.events-for-cell{margin:0;padding-top:30px}table.month tbody th.padding{display:none}table.month tbody td{border-width:0 0 1px 0!important;padding:0;margin:0}}table.day td div.events-for-cell,table.day th,table.week td div.events-for-cell,table.week th{min-height:34px;position:relative}table.day th,table.week th{width:30px;background-color:#fff;color:#333;border-bottom:1px solid #e1e1e1;border-right:1px solid #e1e1e1;text-align:center;cursor:default}table.day tbody tr td:last-of-type,table.day tfoot tr th:last-of-type,table.day thead tr th:last-of-type,table.week tbody tr td:last-of-type,table.week tfoot tr th:last-of-type,table.week thead tr th:last-of-type{border-right:none}table.day tfoot tr th:not(:first-child),table.day thead tr th:not(:first-child),table.week tfoot tr th:not(:first-child),table.week thead tr th:not(:first-child){border-right:none}table.day tfoot tr:last-of-type th,table.week tfoot tr:last-of-type th{border-bottom:none}table.day tbody tr:not(.multi-day) th:first-of-type,table.week tbody tr:not(.multi-day) th:first-of-type{border-bottom:none}table.calendar.day tr.all-day td,table.calendar.day tr.multi-day td,table.calendar.week tr.all-day td,table.calendar.week tr.multi-day td{background-color:#efe}table.calendar.day tbody tr.this-hour td,table.calendar.week tbody tr.this-hour td{background:#ffe}table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:2px solid #e1e1e1}table.day th.column-hour,table.week th.column-hour{width:110px}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{width:100%}table.day th.manage-column,table.week th.manage-column{padding:0;vertical-align:top}table.day th.manage-column a,table.day th.manage-column span,table.week th.manage-column a,table.week th.manage-column span{padding:8px 10px;color:#32373c;display:block;height:calc(100% - 16px);width:calc(100% - 21px);-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}table.day th.manage-column a:active,table.day th.manage-column a:hover,table.week th.manage-column a:active,table.week th.manage-column a:hover{opacity:.5}@media screen and (max-width:782px){table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:1px solid #e1e1e1}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{display:block;width:auto}table.day tfoot th:nth-child(n+3),table.day thead th:nth-child(n+3),table.week tfoot th:nth-child(n+3),table.week thead th:nth-child(n+3){border-top:none}table.day tr:not(.inline-edit-row):not(.no-items) td:not(.check-column),table.week tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){min-height:35px}table.month th.column-week{display:none}}.tablenav-tools span.sc-timezone,.wp-pointer-content span.sc-timezone,table.list span.sc-timechange,table.list span.sc-timezone{font-size:11px;color:rgba(0,0,0,.4)}body.sugar-calendar form#adv-settings .metabox-prefs label{display:block;margin-top:-8px;margin-left:200px}body.sugar-calendar form#adv-settings .metabox-prefs legend+label{margin-top:-30px}body.sugar-calendar form#adv-settings .metabox-prefs{margin-bottom:10px}body.sugar-calendar form#adv-settings table.form-table{margin:0;padding:0}body.sugar-calendar form#adv-settings table.form-table *{font-size:13px;line-height:1.5em}body.sugar-calendar form#adv-settings table.form-table td,body.sugar-calendar form#adv-settings table.form-table th{padding:10px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs td label{padding:2px 0 2px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs span.date-time-text{display:inline-block;min-width:10em}body.sugar-calendar form#adv-settings .sc-date-time-prefs input.small-text{width:75px;margin:-2px 0} \ No newline at end of file +body.sugar-calendar #post-body-content{margin-bottom:0}.sugar-calendar-editor #wp-content-editor-tools{background-color:#fff;padding-top:0}#above_event_editor-sortables{margin-top:20px}.event-date,.event-time,.event-time-zone{display:inline-block;padding:4px 0}.sugar_calendar_datepicker{max-width:105px;height:30px;vertical-align:middle}.sugar_calendar_datepicker:after{display:inline-block;font:normal 20px/34px dashicons;color:#000;speak:none;vertical-align:top;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px;content:"\f508"}.event-time input{max-width:50px}body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone div.sc-select-chosen,body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone select:not(.sc-select-chosen){min-width:222px}@media only screen and (max-width:782px){.event-time div.sc-select-chosen,.event-time input,.event-time select:not(.sc-select-chosen){max-width:100px!important;display:inline-block!important}.sugar_calendar_datepicker{height:auto}}.widefat .column-duration,.widefat .column-end,.widefat .column-start{width:15%}.widefat .column-repeat{width:12%}body.sugar-calendar .wp-filter{margin-bottom:5px}.tablenav.top input[type=number]{width:80px;height:30px;vertical-align:middle}body.sugar-calendar .tablenav .tablenav-pages,body.sugar-calendar .tablenav .tablenav-tools{float:right;margin-bottom:5px}body.sugar-calendar .tablenav .tablenav-pages>*,body.sugar-calendar .tablenav .tablenav-tools>*{margin:0;display:inline-block}body.sugar-calendar .tablenav a.screen-options{padding:0;text-decoration:none;text-align:center}body.sugar-calendar .tablenav a.screen-options .dashicons{color:#b4b9be;padding:5px;vertical-align:middle;margin-top:-3px}body.sugar-calendar .tablenav a.screen-options:hover .dashicons{color:#727272}body.sugar-calendar .tablenav .tablenav-tools>span{padding:6px 10px}body.sugar-calendar .view-switch .view-list:before{content:'\f214'}.view-switch .view-month:before{content:'\f508';font-size:23px;margin-top:-3px;font-weight:500;-webkit-font-smoothing:subpixel-antialiased}.view-switch .view-week:before{content:'\f164'}.view-switch .view-day:before{content:'\f163'}.view-switch a.current{background-color:#007cba;border-radius:3px}.view-switch a.current:before{color:#fff}body.admin-color-fresh .view-switch a.current{background-color:#007cba}body.admin-color-blue .view-switch a.current{background-color:#096484}body.admin-color-coffee .view-switch a.current{background-color:#c7a589}body.admin-color-ectoplasm .view-switch a.current{background-color:#a3b745}body.admin-color-midnight .view-switch a.current{background-color:#e14d43}body.admin-color-modern .view-switch a.current{background-color:#3858e9}body.admin-color-ocean .view-switch a.current{background-color:#9ebaa0}body.admin-color-sunrise .view-switch a.current{background-color:#dd823b}body.admin-color-light .view-switch a.current{background-color:#04a4cc}body.admin-color-evergreen .view-switch a.current{background-color:#36533f}body.admin-color-mint .view-switch a.current{background-color:#4f6d59}table.calendar:not(.list){table-layout:fixed;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}table.calendar:not(.list) tfoot th,table.calendar:not(.list) thead th{text-align:center}table.calendar.striped>tbody>:nth-child(even) td{background-color:#fff}table.calendar.striped>tbody>:nth-child(odd) td{background-color:#f9f9f9}table.calendar:not(.list) tbody td{padding:0;position:relative;text-align:left;border-bottom:1px solid #e1e1e1;border-right:1px solid #e1e1e1}table.calendar:not(.day) tbody td.saturday,table.calendar:not(.day) tbody td.sunday{background-color:#f1f1f1}table.calendar:not(.list) tbody td:hover{box-shadow:inset 0 0 0 1px #ccc!important}table.calendar a.sugar-calendar,table.calendar.list strong.status-trash{display:block;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;margin:0;padding:0 5px}table.calendar a.sugar-calendar,table.calendar.list strong.status-trash{position:relative;padding:0 0 0 20px}table.calendar a.sugar-calendar:before,table.calendar.list strong.status-trash:before{font:normal 15px/18px dashicons;display:inline-block;position:absolute;left:2px;top:.5px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:18px;height:18px;margin:0}table.calendar.list a.sugar-calendar,table.calendar.list strong.status-trash{display:inline;border-radius:3px;padding:5px 5px 5px 22px}table.calendar.list a.sugar-calendar:before,table.calendar.list strong.status-trash:before{top:4.5px;left:5px}table.calendar.list .row-actions{margin-left:5px;margin-top:2px}.wp-pointer.sugar-calendar .wp-pointer-arrow{left:calc(50% - 15px)}.wp-pointer.sugar-calendar .wp-pointer-arrow-inner{border-top-color:#f4f4f4}.wp-pointer-content h3.type-sc_event:before,table.calendar a.type-sc_event:before{content:'\f145'}.wp-pointer-content h3.type-post:before,table.calendar a.type-post:before{content:'\f109'}.wp-pointer-content h3.type-page:before,table.calendar a.type-page:before{content:'\f105'}.wp-pointer-content h3.has-location:before,table.calendar a.has-location:before{content:"\f230"}.wp-pointer-content h3.all-day:before,table.calendar a.all-day:before{content:'\f469'}.wp-pointer-content h3.status-trash:before,table.calendar a.status-trash:before,table.calendar.list strong.status-trash:before{content:'\f182'}.wp-pointer-content h3.status-private:before,table.calendar a.status-private:before{content:'\f530'}.wp-pointer-content h3.post-password-required:before,table.calendar a.post-password-required:before{content:'\f315'}.wp-pointer.sugar-calendar .wp-pointer-content p span,.wp-pointer.sugar-calendar .wp-pointer-content p strong{display:block}.wp-pointer.sugar-calendar .wp-pointer-content p span{margin-bottom:20px}.wp-pointer.sugar-calendar .wp-pointer-actions{border-top:1px solid #ddd;background-color:#f4f4f4;padding:12px 10px 14px;margin:0 0 -38px;min-height:19px}.wp-pointer.sugar-calendar .wp-pointer-actions .action{position:relative;margin:0;padding:0 5px}.wp-pointer.sugar-calendar .wp-pointer-actions .action:first-child{margin-left:10px;padding-left:0}.wp-pointer.sugar-calendar .wp-pointer-actions .action:not(:last-child){border-right:1px solid #dcdcde}.wp-pointer.sugar-calendar .wp-pointer-actions .action a{text-decoration:none}.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a{color:#dc3232}.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:active,.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:hover{color:#a00}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close{color:#aaa}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:active,.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:hover{color:#bbb}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:before{display:none!important}table.calendar:not(.draft) a.status-draft,table.calendar:not(.trash) a.status-trash,table.calendar:not(.trash) strong.status-trash{opacity:.5}@media screen and (max-width:782px){body.sugar-calendar .tablenav-pages{float:right;text-align:right;margin:7px 0 0 0;width:auto}table.calendar:not(.list) #the-list tr:last-child td:not(:last-child){border-bottom:1px solid #e1e1e1!important}table.calendar:not(.list) tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.check-column){display:block}table.calendar.list tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.column-primary)::before{left:32px}}table.month tbody td a.add-event-for-day,table.month tbody td a.day-number{padding:0;margin:0;position:absolute;top:0;height:26px;width:26px;text-align:center;color:#aaa;line-height:1.9em;font-weight:600;background-color:rgba(255,255,255,.8);border:1px solid transparent;border-bottom:1px solid #e1e1e1}table.month tbody td a.day-number{border-right:1px solid #e1e1e1;border-bottom-right-radius:5px}table.month tbody td a.add-event-for-day{border-left:1px solid #e1e1e1;right:0;visibility:hidden}table.month tbody td a.add-event-for-day:hover,table.month tbody td a.day-number:hover{background:rgba(245,245,245,.8)}table.month tbody td:hover a.add-event-for-day{visibility:visible}table.month tbody td:hover a.add-event-for-day,table.month tbody td:hover a.day-number{border-color:#ccc}table.month tbody td{position:relative}table.month tbody th{height:80px;background-color:#fff;border-bottom:1px solid #e1e1e1}table.month tbody tr th:last-of-type{border-right:1px solid #e1e1e1}table.month tbody tr td:nth-child(8){border-right:none}table.calendar.month tbody td.today{background:#ffe}table.month div.events-for-cell{margin:30px 0 5px;min-height:80px}table.month tbody td a i{line-height:1.9em;font-size:15px;overflow:hidden}table.month th.column-week{border-right:1px solid #e1e1e1}table.month tbody th.column-week{border-bottom:none;background-color:#fff;position:relative;text-align:center;z-index:1}table.month tbody th.column-week a{margin:auto auto;padding:10px;border:1px solid transparent;border-radius:5px;font-weight:600;color:#aaa;background-color:rgba(255,255,255,.8);z-index:3}table.month tbody th.column-week a:hover{background-color:#f1f1f1;border:1px solid #e1e1e1}.wp-pointer-content h3 a{color:#fff;text-decoration:none}.wp-pointer-content h3 a:hover{color:#eee}input#year{width:90px}@media screen and (max-width:782px){table.month div.events-for-cell{margin:0;padding-top:30px}table.month tbody th.padding{display:none}table.month tbody td{border-width:0 0 1px 0!important;padding:0;margin:0}}table.day td div.events-for-cell,table.day th,table.week td div.events-for-cell,table.week th{min-height:34px;position:relative}table.day th,table.week th{width:30px;background-color:#fff;color:#333;border-bottom:1px solid #e1e1e1;border-right:1px solid #e1e1e1;text-align:center;cursor:default}table.day tbody tr td:last-of-type,table.day tfoot tr th:last-of-type,table.day thead tr th:last-of-type,table.week tbody tr td:last-of-type,table.week tfoot tr th:last-of-type,table.week thead tr th:last-of-type{border-right:none}table.day tfoot tr th:not(:first-child),table.day thead tr th:not(:first-child),table.week tfoot tr th:not(:first-child),table.week thead tr th:not(:first-child){border-right:none}table.day tfoot tr:last-of-type th,table.week tfoot tr:last-of-type th{border-bottom:none}table.day tbody tr:not(.multi-day) th:first-of-type,table.week tbody tr:not(.multi-day) th:first-of-type{border-bottom:none}table.calendar.day tr.all-day td,table.calendar.day tr.multi-day td,table.calendar.week tr.all-day td,table.calendar.week tr.multi-day td{background-color:#efe}table.calendar.day tbody tr.this-hour td,table.calendar.week tbody tr.this-hour td{background:#ffe}table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:2px solid #e1e1e1}table.day th.column-hour,table.week th.column-hour{width:110px}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{width:100%}table.day th.manage-column,table.week th.manage-column{padding:0;vertical-align:top}table.day th.manage-column a,table.day th.manage-column span,table.week th.manage-column a,table.week th.manage-column span{padding:8px 10px;color:#32373c;display:block;height:calc(100% - 16px);width:calc(100% - 21px);-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}table.day th.manage-column a:active,table.day th.manage-column a:hover,table.week th.manage-column a:active,table.week th.manage-column a:hover{opacity:.5}@media screen and (max-width:782px){table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:1px solid #e1e1e1}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{display:block;width:auto}table.day tfoot th:nth-child(n+3),table.day thead th:nth-child(n+3),table.week tfoot th:nth-child(n+3),table.week thead th:nth-child(n+3){border-top:none}table.day tr:not(.inline-edit-row):not(.no-items) td:not(.check-column),table.week tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){min-height:35px}table.month th.column-week{display:none}}.tablenav-tools span.sc-timezone,.wp-pointer-content span.sc-timezone,table.list span.sc-timechange,table.list span.sc-timezone{font-size:11px;color:rgba(0,0,0,.4)}body.sugar-calendar form#adv-settings .metabox-prefs label{display:block;margin-top:-8px;margin-left:200px}body.sugar-calendar form#adv-settings .metabox-prefs legend+label{margin-top:-30px}body.sugar-calendar form#adv-settings .metabox-prefs{margin-bottom:10px}body.sugar-calendar form#adv-settings table.form-table{margin:0;padding:0}body.sugar-calendar form#adv-settings table.form-table *{font-size:13px;line-height:1.5em}body.sugar-calendar form#adv-settings table.form-table td,body.sugar-calendar form#adv-settings table.form-table th{padding:10px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs td label{padding:2px 0 2px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs span.date-time-text{display:inline-block;min-width:10em}body.sugar-calendar form#adv-settings .sc-date-time-prefs input.small-text{width:75px;margin:-2px 0} \ No newline at end of file diff --git a/sugar-calendar/includes/admin/assets/css/min/rtl/sc-calendar.css b/sugar-calendar/includes/admin/assets/css/min/rtl/sc-calendar.css index 04e66d56..44a44e46 100644 --- a/sugar-calendar/includes/admin/assets/css/min/rtl/sc-calendar.css +++ b/sugar-calendar/includes/admin/assets/css/min/rtl/sc-calendar.css @@ -1 +1 @@ -body.sugar-calendar #post-body-content{margin-bottom:0}.sugar-calendar-editor #wp-content-editor-tools{background-color:#fff;padding-top:0}#above_event_editor-sortables{margin-top:20px}.event-date,.event-time,.event-time-zone{display:inline-block;padding:4px 0}.sugar_calendar_datepicker{max-width:105px;height:30px;vertical-align:middle}.sugar_calendar_datepicker:after{display:inline-block;font:normal 20px/34px dashicons;color:#000;speak:none;vertical-align:top;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px;content:"\f508"}.event-time input{max-width:50px}body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone div.sc-select-chosen,body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone select:not(.sc-select-chosen){min-width:222px}@media only screen and (max-width:782px){.event-time div.sc-select-chosen,.event-time input,.event-time select:not(.sc-select-chosen){max-width:100px!important;display:inline-block!important}.sugar_calendar_datepicker{height:auto}}.widefat .column-duration,.widefat .column-end,.widefat .column-start{width:15%}.widefat .column-repeat{width:12%}body.sugar-calendar .wp-filter{margin-bottom:5px}.tablenav.top input[type=number]{width:80px;height:30px;vertical-align:middle}body.sugar-calendar .tablenav .tablenav-pages,body.sugar-calendar .tablenav .tablenav-tools{float:left;margin-bottom:5px}body.sugar-calendar .tablenav .tablenav-pages>*,body.sugar-calendar .tablenav .tablenav-tools>*{margin:0;display:inline-block}body.sugar-calendar .tablenav a.screen-options{padding:0;text-decoration:none;text-align:center}body.sugar-calendar .tablenav a.screen-options .dashicons{color:#b4b9be;padding:5px;vertical-align:middle;margin-top:-3px}body.sugar-calendar .tablenav a.screen-options:hover .dashicons{color:#727272}body.sugar-calendar .tablenav .tablenav-tools>span{padding:6px 10px}body.sugar-calendar .view-switch .view-list:before{content:'\f214'}.view-switch .view-month:before{content:'\f508';font-size:23px;margin-top:-3px;font-weight:500;-webkit-font-smoothing:subpixel-antialiased}.view-switch .view-week:before{content:'\f164'}.view-switch .view-day:before{content:'\f163'}.view-switch a.current{background-color:#007cba;border-radius:3px}.view-switch a.current:before{color:#fff}body.admin-color-fresh .view-switch a.current{background-color:#007cba}body.admin-color-blue .view-switch a.current{background-color:#096484}body.admin-color-coffee .view-switch a.current{background-color:#c7a589}body.admin-color-ectoplasm .view-switch a.current{background-color:#a3b745}body.admin-color-midnight .view-switch a.current{background-color:#e14d43}body.admin-color-modern .view-switch a.current{background-color:#3858e9}body.admin-color-ocean .view-switch a.current{background-color:#9ebaa0}body.admin-color-sunrise .view-switch a.current{background-color:#dd823b}body.admin-color-light .view-switch a.current{background-color:#04a4cc}body.admin-color-evergreen .view-switch a.current{background-color:#36533f}body.admin-color-mint .view-switch a.current{background-color:#4f6d59}table.calendar:not(.list){table-layout:fixed;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}table.calendar:not(.list) tfoot th,table.calendar:not(.list) thead th{text-align:center}table.calendar.striped>tbody>:nth-child(even) td{background-color:#fff}table.calendar.striped>tbody>:nth-child(odd) td{background-color:#f9f9f9}table.calendar:not(.list) tbody td{padding:0;position:relative;text-align:right;border-bottom:1px solid #e1e1e1;border-left:1px solid #e1e1e1}table.calendar:not(.day) tbody td.saturday,table.calendar:not(.day) tbody td.sunday{background-color:#f1f1f1}table.calendar:not(.list) tbody td:hover{box-shadow:inset 0 0 0 1px #ccc!important}table.calendar a.sugar-calendar{display:block;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;margin:0;padding:0 5px}table.calendar a.sugar-calendar{position:relative;padding:0 20px 0 0}table.calendar a.sugar-calendar:before{font:normal 15px/18px dashicons;display:inline-block;position:absolute;right:2px;top:.5px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:18px;height:18px;margin:0}table.calendar.list a.sugar-calendar{display:inline;border-radius:3px;padding:5px 22px 5px 5px}table.calendar.list a.sugar-calendar:before{top:4.5px;right:5px}table.calendar.list .row-actions{margin-right:5px;margin-top:2px}.wp-pointer.sugar-calendar .wp-pointer-arrow{right:calc(50% - 15px)}.wp-pointer.sugar-calendar .wp-pointer-arrow-inner{border-top-color:#f4f4f4}.wp-pointer-content h3.type-sc_event:before,table.calendar a.type-sc_event:before{content:'\f145'}.wp-pointer-content h3.type-post:before,table.calendar a.type-post:before{content:'\f109'}.wp-pointer-content h3.type-page:before,table.calendar a.type-page:before{content:'\f105'}.wp-pointer-content h3.has-location:before,table.calendar a.has-location:before{content:"\f230"}.wp-pointer-content h3.all-day:before,table.calendar a.all-day:before{content:'\f469'}.wp-pointer-content h3.status-trash:before,table.calendar a.status-trash:before{content:'\f182'}.wp-pointer-content h3.status-private:before,table.calendar a.status-private:before{content:'\f530'}.wp-pointer-content h3.post-password-required:before,table.calendar a.post-password-required:before{content:'\f315'}.wp-pointer.sugar-calendar .wp-pointer-content p span,.wp-pointer.sugar-calendar .wp-pointer-content p strong{display:block}.wp-pointer.sugar-calendar .wp-pointer-content p span{margin-bottom:20px}.wp-pointer.sugar-calendar .wp-pointer-actions{border-top:1px solid #ddd;background-color:#f4f4f4;padding:12px 10px 14px;margin:0 0 -38px;min-height:19px}.wp-pointer.sugar-calendar .wp-pointer-actions .action{position:relative;margin:0;padding:0 5px}.wp-pointer.sugar-calendar .wp-pointer-actions .action:first-child{margin-right:10px;padding-right:0}.wp-pointer.sugar-calendar .wp-pointer-actions .action:not(:last-child){border-left:1px solid #dcdcde}.wp-pointer.sugar-calendar .wp-pointer-actions .action a{text-decoration:none}.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a{color:#dc3232}.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:active,.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:hover{color:#a00}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close{color:#aaa}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:active,.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:hover{color:#bbb}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:before{display:none!important}table.calendar:not(.draft) a.status-draft,table.calendar:not(.trash) a.status-trash{opacity:.5}@media screen and (max-width:782px){body.sugar-calendar .tablenav-pages{float:left;text-align:left;margin:7px 0 0 0;width:auto}table.calendar:not(.list) #the-list tr:last-child td:not(:last-child){border-bottom:1px solid #e1e1e1!important}table.calendar:not(.list) tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.check-column){display:block}table.calendar.list tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.column-primary)::before{right:32px}}table.month tbody td a.add-event-for-day,table.month tbody td a.day-number{padding:0;margin:0;position:absolute;top:0;height:26px;width:26px;text-align:center;color:#aaa;line-height:1.9em;font-weight:600;background-color:rgba(255,255,255,.8);border:1px solid transparent;border-bottom:1px solid #e1e1e1}table.month tbody td a.day-number{border-left:1px solid #e1e1e1;border-bottom-left-radius:5px}table.month tbody td a.add-event-for-day{border-right:1px solid #e1e1e1;left:0;visibility:hidden}table.month tbody td a.add-event-for-day:hover,table.month tbody td a.day-number:hover{background:rgba(245,245,245,.8)}table.month tbody td:hover a.add-event-for-day{visibility:visible}table.month tbody td:hover a.add-event-for-day,table.month tbody td:hover a.day-number{border-color:#ccc}table.month tbody td{position:relative}table.month tbody th{height:80px;background-color:#fff;border-bottom:1px solid #e1e1e1}table.month tbody tr th:last-of-type{border-left:1px solid #e1e1e1}table.month tbody tr td:nth-child(8){border-left:none}table.calendar.month tbody td.today{background:#ffe}table.month div.events-for-cell{margin:30px 0 5px;min-height:80px}table.month tbody td a i{line-height:1.9em;font-size:15px;overflow:hidden}table.month th.column-week{border-left:1px solid #e1e1e1}table.month tbody th.column-week{border-bottom:none;background-color:#fff;position:relative;text-align:center;z-index:1}table.month tbody th.column-week a{margin:auto auto;padding:10px;border:1px solid transparent;border-radius:5px;font-weight:600;color:#aaa;background-color:rgba(255,255,255,.8);z-index:3}table.month tbody th.column-week a:hover{background-color:#f1f1f1;border:1px solid #e1e1e1}.wp-pointer-content h3 a{color:#fff;text-decoration:none}.wp-pointer-content h3 a:hover{color:#eee}input#year{width:90px}@media screen and (max-width:782px){table.month div.events-for-cell{margin:0;padding-top:30px}table.month tbody th.padding{display:none}table.month tbody td{border-width:0 0 1px 0!important;padding:0;margin:0}}table.day td div.events-for-cell,table.day th,table.week td div.events-for-cell,table.week th{min-height:34px;position:relative}table.day th,table.week th{width:30px;background-color:#fff;color:#333;border-bottom:1px solid #e1e1e1;border-left:1px solid #e1e1e1;text-align:center;cursor:default}table.day tbody tr td:last-of-type,table.day tfoot tr th:last-of-type,table.day thead tr th:last-of-type,table.week tbody tr td:last-of-type,table.week tfoot tr th:last-of-type,table.week thead tr th:last-of-type{border-left:none}table.day tfoot tr th:not(:first-child),table.day thead tr th:not(:first-child),table.week tfoot tr th:not(:first-child),table.week thead tr th:not(:first-child){border-left:none}table.day tfoot tr:last-of-type th,table.week tfoot tr:last-of-type th{border-bottom:none}table.day tbody tr:not(.multi-day) th:first-of-type,table.week tbody tr:not(.multi-day) th:first-of-type{border-bottom:none}table.calendar.day tr.all-day td,table.calendar.day tr.multi-day td,table.calendar.week tr.all-day td,table.calendar.week tr.multi-day td{background-color:#efe}table.calendar.day tbody tr.this-hour td,table.calendar.week tbody tr.this-hour td{background:#ffe}table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:2px solid #e1e1e1}table.day th.column-hour,table.week th.column-hour{width:110px}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{width:100%}table.day th.manage-column,table.week th.manage-column{padding:0;vertical-align:top}table.day th.manage-column a,table.day th.manage-column span,table.week th.manage-column a,table.week th.manage-column span{padding:8px 10px;color:#32373c;display:block;height:calc(100% - 16px);width:calc(100% - 21px);-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}table.day th.manage-column a:active,table.day th.manage-column a:hover,table.week th.manage-column a:active,table.week th.manage-column a:hover{opacity:.5}@media screen and (max-width:782px){table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:1px solid #e1e1e1}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{display:block;width:auto}table.day tfoot th:nth-child(n+3),table.day thead th:nth-child(n+3),table.week tfoot th:nth-child(n+3),table.week thead th:nth-child(n+3){border-top:none}table.day tr:not(.inline-edit-row):not(.no-items) td:not(.check-column),table.week tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){min-height:35px}table.month th.column-week{display:none}}.tablenav-tools span.sc-timezone,.wp-pointer-content span.sc-timezone,table.list span.sc-timechange,table.list span.sc-timezone{font-size:11px;color:rgba(0,0,0,.4)}body.sugar-calendar form#adv-settings .metabox-prefs label{display:block;margin-top:-8px;margin-right:200px}body.sugar-calendar form#adv-settings .metabox-prefs legend+label{margin-top:-30px}body.sugar-calendar form#adv-settings .metabox-prefs{margin-bottom:10px}body.sugar-calendar form#adv-settings table.form-table{margin:0;padding:0}body.sugar-calendar form#adv-settings table.form-table *{font-size:13px;line-height:1.5em}body.sugar-calendar form#adv-settings table.form-table td,body.sugar-calendar form#adv-settings table.form-table th{padding:10px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs td label{padding:2px 0 2px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs span.date-time-text{display:inline-block;min-width:10em}body.sugar-calendar form#adv-settings .sc-date-time-prefs input.small-text{width:75px;margin:-2px 0} \ No newline at end of file +body.sugar-calendar #post-body-content{margin-bottom:0}.sugar-calendar-editor #wp-content-editor-tools{background-color:#fff;padding-top:0}#above_event_editor-sortables{margin-top:20px}.event-date,.event-time,.event-time-zone{display:inline-block;padding:4px 0}.sugar_calendar_datepicker{max-width:105px;height:30px;vertical-align:middle}.sugar_calendar_datepicker:after{display:inline-block;font:normal 20px/34px dashicons;color:#000;speak:none;vertical-align:top;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px;content:"\f508"}.event-time input{max-width:50px}body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone div.sc-select-chosen,body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone select:not(.sc-select-chosen){min-width:222px}@media only screen and (max-width:782px){.event-time div.sc-select-chosen,.event-time input,.event-time select:not(.sc-select-chosen){max-width:100px!important;display:inline-block!important}.sugar_calendar_datepicker{height:auto}}.widefat .column-duration,.widefat .column-end,.widefat .column-start{width:15%}.widefat .column-repeat{width:12%}body.sugar-calendar .wp-filter{margin-bottom:5px}.tablenav.top input[type=number]{width:80px;height:30px;vertical-align:middle}body.sugar-calendar .tablenav .tablenav-pages,body.sugar-calendar .tablenav .tablenav-tools{float:left;margin-bottom:5px}body.sugar-calendar .tablenav .tablenav-pages>*,body.sugar-calendar .tablenav .tablenav-tools>*{margin:0;display:inline-block}body.sugar-calendar .tablenav a.screen-options{padding:0;text-decoration:none;text-align:center}body.sugar-calendar .tablenav a.screen-options .dashicons{color:#b4b9be;padding:5px;vertical-align:middle;margin-top:-3px}body.sugar-calendar .tablenav a.screen-options:hover .dashicons{color:#727272}body.sugar-calendar .tablenav .tablenav-tools>span{padding:6px 10px}body.sugar-calendar .view-switch .view-list:before{content:'\f214'}.view-switch .view-month:before{content:'\f508';font-size:23px;margin-top:-3px;font-weight:500;-webkit-font-smoothing:subpixel-antialiased}.view-switch .view-week:before{content:'\f164'}.view-switch .view-day:before{content:'\f163'}.view-switch a.current{background-color:#007cba;border-radius:3px}.view-switch a.current:before{color:#fff}body.admin-color-fresh .view-switch a.current{background-color:#007cba}body.admin-color-blue .view-switch a.current{background-color:#096484}body.admin-color-coffee .view-switch a.current{background-color:#c7a589}body.admin-color-ectoplasm .view-switch a.current{background-color:#a3b745}body.admin-color-midnight .view-switch a.current{background-color:#e14d43}body.admin-color-modern .view-switch a.current{background-color:#3858e9}body.admin-color-ocean .view-switch a.current{background-color:#9ebaa0}body.admin-color-sunrise .view-switch a.current{background-color:#dd823b}body.admin-color-light .view-switch a.current{background-color:#04a4cc}body.admin-color-evergreen .view-switch a.current{background-color:#36533f}body.admin-color-mint .view-switch a.current{background-color:#4f6d59}table.calendar:not(.list){table-layout:fixed;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}table.calendar:not(.list) tfoot th,table.calendar:not(.list) thead th{text-align:center}table.calendar.striped>tbody>:nth-child(even) td{background-color:#fff}table.calendar.striped>tbody>:nth-child(odd) td{background-color:#f9f9f9}table.calendar:not(.list) tbody td{padding:0;position:relative;text-align:right;border-bottom:1px solid #e1e1e1;border-left:1px solid #e1e1e1}table.calendar:not(.day) tbody td.saturday,table.calendar:not(.day) tbody td.sunday{background-color:#f1f1f1}table.calendar:not(.list) tbody td:hover{box-shadow:inset 0 0 0 1px #ccc!important}table.calendar a.sugar-calendar,table.calendar.list strong.status-trash{display:block;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;margin:0;padding:0 5px}table.calendar a.sugar-calendar,table.calendar.list strong.status-trash{position:relative;padding:0 20px 0 0}table.calendar a.sugar-calendar:before,table.calendar.list strong.status-trash:before{font:normal 15px/18px dashicons;display:inline-block;position:absolute;right:2px;top:.5px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:18px;height:18px;margin:0}table.calendar.list a.sugar-calendar,table.calendar.list strong.status-trash{display:inline;border-radius:3px;padding:5px 22px 5px 5px}table.calendar.list a.sugar-calendar:before,table.calendar.list strong.status-trash:before{top:4.5px;right:5px}table.calendar.list .row-actions{margin-right:5px;margin-top:2px}.wp-pointer.sugar-calendar .wp-pointer-arrow{right:calc(50% - 15px)}.wp-pointer.sugar-calendar .wp-pointer-arrow-inner{border-top-color:#f4f4f4}.wp-pointer-content h3.type-sc_event:before,table.calendar a.type-sc_event:before{content:'\f145'}.wp-pointer-content h3.type-post:before,table.calendar a.type-post:before{content:'\f109'}.wp-pointer-content h3.type-page:before,table.calendar a.type-page:before{content:'\f105'}.wp-pointer-content h3.has-location:before,table.calendar a.has-location:before{content:"\f230"}.wp-pointer-content h3.all-day:before,table.calendar a.all-day:before{content:'\f469'}.wp-pointer-content h3.status-trash:before,table.calendar a.status-trash:before,table.calendar.list strong.status-trash:before{content:'\f182'}.wp-pointer-content h3.status-private:before,table.calendar a.status-private:before{content:'\f530'}.wp-pointer-content h3.post-password-required:before,table.calendar a.post-password-required:before{content:'\f315'}.wp-pointer.sugar-calendar .wp-pointer-content p span,.wp-pointer.sugar-calendar .wp-pointer-content p strong{display:block}.wp-pointer.sugar-calendar .wp-pointer-content p span{margin-bottom:20px}.wp-pointer.sugar-calendar .wp-pointer-actions{border-top:1px solid #ddd;background-color:#f4f4f4;padding:12px 10px 14px;margin:0 0 -38px;min-height:19px}.wp-pointer.sugar-calendar .wp-pointer-actions .action{position:relative;margin:0;padding:0 5px}.wp-pointer.sugar-calendar .wp-pointer-actions .action:first-child{margin-right:10px;padding-right:0}.wp-pointer.sugar-calendar .wp-pointer-actions .action:not(:last-child){border-left:1px solid #dcdcde}.wp-pointer.sugar-calendar .wp-pointer-actions .action a{text-decoration:none}.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a{color:#dc3232}.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:active,.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:hover{color:#a00}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close{color:#aaa}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:active,.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:hover{color:#bbb}.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:before{display:none!important}table.calendar:not(.draft) a.status-draft,table.calendar:not(.trash) a.status-trash,table.calendar:not(.trash) strong.status-trash{opacity:.5}@media screen and (max-width:782px){body.sugar-calendar .tablenav-pages{float:left;text-align:left;margin:7px 0 0 0;width:auto}table.calendar:not(.list) #the-list tr:last-child td:not(:last-child){border-bottom:1px solid #e1e1e1!important}table.calendar:not(.list) tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.check-column){display:block}table.calendar.list tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.column-primary)::before{right:32px}}table.month tbody td a.add-event-for-day,table.month tbody td a.day-number{padding:0;margin:0;position:absolute;top:0;height:26px;width:26px;text-align:center;color:#aaa;line-height:1.9em;font-weight:600;background-color:rgba(255,255,255,.8);border:1px solid transparent;border-bottom:1px solid #e1e1e1}table.month tbody td a.day-number{border-left:1px solid #e1e1e1;border-bottom-left-radius:5px}table.month tbody td a.add-event-for-day{border-right:1px solid #e1e1e1;left:0;visibility:hidden}table.month tbody td a.add-event-for-day:hover,table.month tbody td a.day-number:hover{background:rgba(245,245,245,.8)}table.month tbody td:hover a.add-event-for-day{visibility:visible}table.month tbody td:hover a.add-event-for-day,table.month tbody td:hover a.day-number{border-color:#ccc}table.month tbody td{position:relative}table.month tbody th{height:80px;background-color:#fff;border-bottom:1px solid #e1e1e1}table.month tbody tr th:last-of-type{border-left:1px solid #e1e1e1}table.month tbody tr td:nth-child(8){border-left:none}table.calendar.month tbody td.today{background:#ffe}table.month div.events-for-cell{margin:30px 0 5px;min-height:80px}table.month tbody td a i{line-height:1.9em;font-size:15px;overflow:hidden}table.month th.column-week{border-left:1px solid #e1e1e1}table.month tbody th.column-week{border-bottom:none;background-color:#fff;position:relative;text-align:center;z-index:1}table.month tbody th.column-week a{margin:auto auto;padding:10px;border:1px solid transparent;border-radius:5px;font-weight:600;color:#aaa;background-color:rgba(255,255,255,.8);z-index:3}table.month tbody th.column-week a:hover{background-color:#f1f1f1;border:1px solid #e1e1e1}.wp-pointer-content h3 a{color:#fff;text-decoration:none}.wp-pointer-content h3 a:hover{color:#eee}input#year{width:90px}@media screen and (max-width:782px){table.month div.events-for-cell{margin:0;padding-top:30px}table.month tbody th.padding{display:none}table.month tbody td{border-width:0 0 1px 0!important;padding:0;margin:0}}table.day td div.events-for-cell,table.day th,table.week td div.events-for-cell,table.week th{min-height:34px;position:relative}table.day th,table.week th{width:30px;background-color:#fff;color:#333;border-bottom:1px solid #e1e1e1;border-left:1px solid #e1e1e1;text-align:center;cursor:default}table.day tbody tr td:last-of-type,table.day tfoot tr th:last-of-type,table.day thead tr th:last-of-type,table.week tbody tr td:last-of-type,table.week tfoot tr th:last-of-type,table.week thead tr th:last-of-type{border-left:none}table.day tfoot tr th:not(:first-child),table.day thead tr th:not(:first-child),table.week tfoot tr th:not(:first-child),table.week thead tr th:not(:first-child){border-left:none}table.day tfoot tr:last-of-type th,table.week tfoot tr:last-of-type th{border-bottom:none}table.day tbody tr:not(.multi-day) th:first-of-type,table.week tbody tr:not(.multi-day) th:first-of-type{border-bottom:none}table.calendar.day tr.all-day td,table.calendar.day tr.multi-day td,table.calendar.week tr.all-day td,table.calendar.week tr.multi-day td{background-color:#efe}table.calendar.day tbody tr.this-hour td,table.calendar.week tbody tr.this-hour td{background:#ffe}table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:2px solid #e1e1e1}table.day th.column-hour,table.week th.column-hour{width:110px}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{width:100%}table.day th.manage-column,table.week th.manage-column{padding:0;vertical-align:top}table.day th.manage-column a,table.day th.manage-column span,table.week th.manage-column a,table.week th.manage-column span{padding:8px 10px;color:#32373c;display:block;height:calc(100% - 16px);width:calc(100% - 21px);-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}table.day th.manage-column a:active,table.day th.manage-column a:hover,table.week th.manage-column a:active,table.week th.manage-column a:hover{opacity:.5}@media screen and (max-width:782px){table.day tr.multi-day td,table.day tr.multi-day th,table.week tr.multi-day td,table.week tr.multi-day th{border-bottom:1px solid #e1e1e1}table.day th.column-friday,table.day th.column-monday,table.day th.column-saturday,table.day th.column-sunday,table.day th.column-thursday,table.day th.column-tuesday,table.day th.column-wednesday,table.week th.column-friday,table.week th.column-monday,table.week th.column-saturday,table.week th.column-sunday,table.week th.column-thursday,table.week th.column-tuesday,table.week th.column-wednesday{display:block;width:auto}table.day tfoot th:nth-child(n+3),table.day thead th:nth-child(n+3),table.week tfoot th:nth-child(n+3),table.week thead th:nth-child(n+3){border-top:none}table.day tr:not(.inline-edit-row):not(.no-items) td:not(.check-column),table.week tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){min-height:35px}table.month th.column-week{display:none}}.tablenav-tools span.sc-timezone,.wp-pointer-content span.sc-timezone,table.list span.sc-timechange,table.list span.sc-timezone{font-size:11px;color:rgba(0,0,0,.4)}body.sugar-calendar form#adv-settings .metabox-prefs label{display:block;margin-top:-8px;margin-right:200px}body.sugar-calendar form#adv-settings .metabox-prefs legend+label{margin-top:-30px}body.sugar-calendar form#adv-settings .metabox-prefs{margin-bottom:10px}body.sugar-calendar form#adv-settings table.form-table{margin:0;padding:0}body.sugar-calendar form#adv-settings table.form-table *{font-size:13px;line-height:1.5em}body.sugar-calendar form#adv-settings table.form-table td,body.sugar-calendar form#adv-settings table.form-table th{padding:10px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs td label{padding:2px 0 2px 0}body.sugar-calendar form#adv-settings .sc-date-time-prefs span.date-time-text{display:inline-block;min-width:10em}body.sugar-calendar form#adv-settings .sc-date-time-prefs input.small-text{width:75px;margin:-2px 0} \ No newline at end of file diff --git a/sugar-calendar/includes/admin/assets/css/rtl/sc-calendar.css b/sugar-calendar/includes/admin/assets/css/rtl/sc-calendar.css index 67ce369c..3d77d2f9 100644 --- a/sugar-calendar/includes/admin/assets/css/rtl/sc-calendar.css +++ b/sugar-calendar/includes/admin/assets/css/rtl/sc-calendar.css @@ -217,7 +217,8 @@ table.calendar:not(.list) tbody td:hover { box-shadow: inset 0 0 0 1px #ccc !important; } -table.calendar a.sugar-calendar { +table.calendar a.sugar-calendar, +table.calendar.list strong.status-trash { display: block; -o-text-overflow: ellipsis; text-overflow: ellipsis; @@ -227,12 +228,14 @@ table.calendar a.sugar-calendar { padding: 0 5px; } -table.calendar a.sugar-calendar { +table.calendar a.sugar-calendar, +table.calendar.list strong.status-trash { position: relative; padding: 0 20px 0 0; } -table.calendar a.sugar-calendar:before { +table.calendar a.sugar-calendar:before, +table.calendar.list strong.status-trash:before { font: normal 15px/18px 'dashicons'; display: inline-block; position: absolute; @@ -246,13 +249,15 @@ table.calendar a.sugar-calendar:before { margin: 0; } -table.calendar.list a.sugar-calendar { +table.calendar.list a.sugar-calendar, +table.calendar.list strong.status-trash { display: inline; border-radius: 3px; padding: 5px 22px 5px 5px; } -table.calendar.list a.sugar-calendar:before { +table.calendar.list a.sugar-calendar:before, +table.calendar.list strong.status-trash:before { top: 4.5px; right: 5px; } @@ -296,7 +301,8 @@ table.calendar a.all-day:before { } .wp-pointer-content h3.status-trash:before, -table.calendar a.status-trash:before { +table.calendar a.status-trash:before, +table.calendar.list strong.status-trash:before { content: '\f182'; } @@ -369,7 +375,8 @@ table.calendar a.post-password-required:before { } table.calendar:not(.draft) a.status-draft, -table.calendar:not(.trash) a.status-trash { +table.calendar:not(.trash) a.status-trash, +table.calendar:not(.trash) strong.status-trash { opacity: 0.5; } From 55605b8a0257b2d2173a4de2864054e78d9fc127 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Wed, 24 Feb 2021 19:11:52 -0600 Subject: [PATCH 14/20] Add get_event_title() method to Base list table class. This centralizes the (No title) string and 'the_title' filter usage. --- .../list-tables/class-wp-list-table-base.php | 44 ++++++++++++------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php index ea174f2a..4ae0a640 100644 --- a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php +++ b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php @@ -1561,6 +1561,20 @@ protected function get_event( $event = false ) { return $event; } + /** + * Return the string for the event title. + * + * @since 2.1.7 + * + * @param object $event + * @return string + */ + protected function get_event_title( $event = false ) { + return ! empty( $event->title ) + ? apply_filters( 'the_title', $event->title ) + : esc_html__( '(No title)', 'sugar-calendar' ); + } + /** * Return the HTML for linking to an event. * @@ -1582,10 +1596,8 @@ protected function get_event_link( $event = false ) { // Get the edit url $event_edit_url = $this->get_event_edit_url( $event ); - // Handle empty titles - $event_title = ! empty( $event->title ) - ? apply_filters( 'the_title', $event->title ) - : esc_html__( '(No title)', 'sugar-calendar' ); + // Get the event title + $event_title = $this->get_event_title( $event ); // Filter all event attributes $attributes = array( @@ -1931,21 +1943,23 @@ protected function setup_pointer( $event = false, $cell = false ) { */ protected function get_pointer_title( $event = false ) { - // Handle empty titles - $title = ! empty( $event->title ) - ? $event->title - : esc_html__( '(No title)', 'sugar-calendar' ); + // Get the event title + $title = $this->get_event_title( $event ); - // Default return value (no edit link; text only) + // Default return value (text only) $retval = esc_js( $title ); - // If user can edit, link to "edit object" page - if ( $this->current_user_can_edit( $event ) ) { - $retval = $this->get_event_edit_link( $event, $retval ); + // Only link if not trashed + if ( 'trash' !== $event->status ) { + + // If user can edit, link to "edit object" page + if ( $this->current_user_can_edit( $event ) ) { + $retval = $this->get_event_edit_link( $event, $retval ); - // If user can view, link to permalink - } elseif ( $this->current_user_can_view( $event ) ) { - $retval = $this->get_event_view_link( $event, $retval ); + // If user can view, link to permalink + } elseif ( $this->current_user_can_view( $event ) ) { + $retval = $this->get_event_view_link( $event, $retval ); + } } // Return From 250d11a90efc3476b9473315677b6b39c3deea57 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Wed, 24 Feb 2021 19:12:58 -0600 Subject: [PATCH 15/20] Do not link to edit Events in the Trash. WordPress does not allow editing trashed items, so these were links to invalid pages. --- .../list-tables/class-wp-list-table-list.php | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php index b63c2f16..9ae0a049 100644 --- a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php +++ b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php @@ -273,18 +273,31 @@ protected function get_primary_column_name() { */ public function column_title( $item = null ) { - // Get the for event color - $color = $this->get_item_color( $item ); - // Start an output buffer to make syntax easier to read ob_start(); - // Wrap output in a helper div - ?>
+ // Items in trash are not editable + if ( 'trash' === $item->status ) { + + ?>get_event_title( $item ); - get_event_link( $item ); ?> + ?>get_item_color( $item ); + + // Wrap output in a helper div + ?>
get_event_link( $item ); + + ?>
row_actions( From 30fd2e7b2fc13ca7de1f8a8db1bf4add566e8bf2 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Wed, 24 Feb 2021 19:16:57 -0600 Subject: [PATCH 16/20] Add context to row action strings. Words like "Duplicate" and "Edit" could be nouns, so be clear about what they are in their usages. --- .../includes/admin/list-tables/class-wp-list-table-base.php | 6 +++--- .../includes/admin/list-tables/class-wp-list-table-list.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php index 4ae0a640..b40e356b 100644 --- a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php +++ b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php @@ -1997,13 +1997,13 @@ protected function get_pointer_links( $event = false ) { // Maybe add edit & copy links if ( $this->current_user_can_edit( $event ) ) { - $links['edit'] = '' . $this->get_event_edit_link( $event, esc_html__( 'Edit', 'sugar-calendar' ) ) . ''; - $links['copy'] = '' . $this->get_event_copy_link( $event, esc_html__( 'Duplicate', 'sugar-calendar' ) ) . ''; + $links['edit'] = '' . $this->get_event_edit_link( $event, esc_html_x( 'Edit', 'verb', 'sugar-calendar' ) ) . ''; + $links['copy'] = '' . $this->get_event_copy_link( $event, esc_html_x( 'Duplicate', 'verb', 'sugar-calendar' ) ) . ''; } // Maybe add delete link if ( $this->current_user_can_delete( $event ) ) { - $links['delete'] = '' . $this->get_event_delete_link( $event, esc_html__( 'Trash', 'sugar-calendar' ) ) . ''; + $links['delete'] = '' . $this->get_event_delete_link( $event, esc_html_x( 'Trash', 'verb', 'sugar-calendar' ) ) . ''; } // Add view link diff --git a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php index 9ae0a049..2a71e5ad 100644 --- a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php +++ b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php @@ -665,7 +665,7 @@ private function get_post_row_actions( $item ) { get_edit_post_link( $post->ID ), /* translators: %s: post title */ esc_attr( sprintf( __( 'Edit “%s”', 'sugar-calendar' ), $title ) ), - esc_html__( 'Edit', 'sugar-calendar' ) + esc_html_x( 'Edit', 'verb', 'sugar-calendar' ) ); $actions['copy'] = sprintf( @@ -673,7 +673,7 @@ private function get_post_row_actions( $item ) { $this->get_event_copy_url( $item ), /* translators: %s: post title */ esc_attr( sprintf( __( 'Duplicate “%s”', 'sugar-calendar' ), $title ) ), - esc_html__( 'Duplicate', 'sugar-calendar' ) + esc_html_x( 'Duplicate', 'verb', 'sugar-calendar' ) ); } @@ -715,7 +715,7 @@ private function get_post_row_actions( $item ) { esc_url( $preview_link ), /* translators: %s: post title */ esc_attr( sprintf( __( 'Preview “%s”', 'sugar-calendar' ), $title ) ), - esc_html__( 'Preview', 'sugar-calendar' ) + esc_html_x( 'Preview', 'verb', 'sugar-calendar' ) ); } } elseif ( 'trash' !== $post->post_status ) { From 72f6a067a66f6ca8854e69eac445cdfca41d1a16 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Wed, 24 Feb 2021 20:04:48 -0600 Subject: [PATCH 17/20] Update "copy" action to "sc_copy" to avoid collisions with third party plugins. --- .../includes/admin/list-tables/class-wp-list-table-base.php | 6 +++--- .../includes/admin/list-tables/class-wp-list-table-list.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php index b40e356b..e1b465d6 100644 --- a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php +++ b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php @@ -1997,8 +1997,8 @@ protected function get_pointer_links( $event = false ) { // Maybe add edit & copy links if ( $this->current_user_can_edit( $event ) ) { - $links['edit'] = '' . $this->get_event_edit_link( $event, esc_html_x( 'Edit', 'verb', 'sugar-calendar' ) ) . ''; - $links['copy'] = '' . $this->get_event_copy_link( $event, esc_html_x( 'Duplicate', 'verb', 'sugar-calendar' ) ) . ''; + $links['edit'] = '' . $this->get_event_edit_link( $event, esc_html_x( 'Edit', 'verb', 'sugar-calendar' ) ) . ''; + $links['sc_copy'] = '' . $this->get_event_copy_link( $event, esc_html_x( 'Duplicate', 'verb', 'sugar-calendar' ) ) . ''; } // Maybe add delete link @@ -2138,7 +2138,7 @@ protected function get_event_copy_url( $event = false ) { $retval = $this->get_event_edit_url( $event ); // Arguments - $action = 'copy'; + $action = 'sc_copy'; $args = array( 'action' => $action, 'wp_http_referer' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) diff --git a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php index 2a71e5ad..4b5fd3d7 100644 --- a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php +++ b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php @@ -668,7 +668,7 @@ private function get_post_row_actions( $item ) { esc_html_x( 'Edit', 'verb', 'sugar-calendar' ) ); - $actions['copy'] = sprintf( + $actions['sc_copy'] = sprintf( '%s', $this->get_event_copy_url( $item ), /* translators: %s: post title */ From 3f9e1f070e35eda9cf17b62811ee01347a33e9a5 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Wed, 24 Feb 2021 20:05:43 -0600 Subject: [PATCH 18/20] Add "Posts\copy" and hook it in. This new function is hooked to 'post_action_sc_copy' and is responsible for copying all Event related database stuff; it mirrors the behavior of WordPress core post actions. --- sugar-calendar/includes/admin/hooks.php | 12 +++- sugar-calendar/includes/admin/posts.php | 93 +++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 3 deletions(-) diff --git a/sugar-calendar/includes/admin/hooks.php b/sugar-calendar/includes/admin/hooks.php index b874a8ae..14eca3e4 100644 --- a/sugar-calendar/includes/admin/hooks.php +++ b/sugar-calendar/includes/admin/hooks.php @@ -49,6 +49,9 @@ // Admin Messages add_filter( 'post_updated_messages', __NAMESPACE__ . '\\Posts\\updated_messages' ); +// Post copy +add_action( 'post_action_sc_copy', __NAMESPACE__ . '\\Posts\copy' ); + // Admin title add_filter( 'admin_title', 'sugar_calendar_admin_title' ); @@ -89,8 +92,11 @@ add_action( 'wp_ajax_sc_time_format', __NAMESPACE__ . '\\Settings\\ajax_time_format' ); // Get the page ID -$page = sugar_calendar_get_admin_page_id(); +$sc_admin_page = sugar_calendar_get_admin_page_id(); // Page ID specific actions -add_action( "load-{$page}", __NAMESPACE__ . '\\Menu\\maybe_empty_trash' ); -add_action( "load-{$page}", __NAMESPACE__ . '\\Menu\\preload_list_table' ); +add_action( "load-{$sc_admin_page}", __NAMESPACE__ . '\\Menu\\maybe_empty_trash' ); +add_action( "load-{$sc_admin_page}", __NAMESPACE__ . '\\Menu\\preload_list_table' ); + +// Global cleanup +unset( $sc_admin_page ); diff --git a/sugar-calendar/includes/admin/posts.php b/sugar-calendar/includes/admin/posts.php index cb865f5e..094a1165 100644 --- a/sugar-calendar/includes/admin/posts.php +++ b/sugar-calendar/includes/admin/posts.php @@ -30,6 +30,99 @@ function title( $title, \WP_Post $post ) { return $title; } +/** + * Copy an Event, from within any admin area List Table row action. + * + * @since 2.1.7 + * + * @param int $post_id + */ +function copy( $post_id = 0 ) { + + // Error if no post ID + if ( empty( $post_id ) ) { + wp_die( esc_html__( 'Invalid item ID.', 'sugar-calendar' ) ); + } + + // Action ID + $action = 'sc_copy'; + + // Check the nonce + check_admin_referer( "{$action}-post_{$post_id}" ); + + // Get the Post + $post = get_post( $post_id ); + + // Error if Post does not exist + if ( empty( $post ) ) { + wp_die( esc_html__( 'The item you are trying to copy no longer exists.', 'sugar-calendar' ) ); + } + + // Check Post-Type + $post_type = get_post_type( $post ); + $post_type_object = get_post_type_object( $post_type ); + + // Error if Post-Type is invalid + if ( empty( $post_type_object ) || ! post_type_supports( $post_type, 'events' ) ) { + wp_die( esc_html__( 'Sorry, this item cannot be copied.', 'sugar-calendar' ) ); + } + + // Error if current user cannot edit the original post + if ( ! current_user_can( 'edit_post', $post_id ) ) { + wp_die( esc_html__( 'Sorry, you are not allowed to copy this item.', 'sugar-calendar' ) ); + } + + // Get the Event for the Post + $event = sugar_calendar_get_event_by_object( $post_id, 'post' ); + + // Error if missing Event data + if ( empty( $event ) ) { + wp_die( esc_html__( 'This post does not have event data.', 'sugar-calendar' ) ); + } + + // New status is always draft + $new_status = 'draft'; + + // New title always has suffix + $new_title = $post->post_title . ' - ' . esc_html_x( 'Copy', 'noun', 'sugar-calendar' ); + + // Copy the Post + $new_post_id = sugar_calendar_copy_post( $post_id, array( + 'post_title' => $new_title, + 'post_status' => $new_status + ) ); + + // Error if Post was not copied + if ( empty( $new_post_id ) ) { + wp_die( esc_html__( 'Error copying the item.', 'sugar-calendar' ) ); + } + + // Copy the Event + $new_event_id = sugar_calendar_copy_event( $event->id, array( + 'title' => $new_title, + 'status' => $new_status, + 'object_id' => $new_post_id + ) ); + + // Error if Event was not copied + if ( empty( $new_event_id ) ) { + wp_die( esc_html__( 'Error copying the item.', 'sugar-calendar' ) ); + } + + // Sendback an indication that copy succeeded + $sendback = add_query_arg( + array( + 'copied' => 1, + 'ids' => $post_id, + ), + wp_get_referer() + ); + + // Redirect + wp_safe_redirect( $sendback ); + exit; +} + /** * Filter the messages array and add custom messages for the built-in Post Type. * From 5a9b647447d20ba516fc869c545e16a7813136f2 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Wed, 24 Feb 2021 20:08:00 -0600 Subject: [PATCH 19/20] Update string dictionary. --- .../includes/languages/sugar-calendar.pot | 232 ++++++++++-------- 1 file changed, 131 insertions(+), 101 deletions(-) diff --git a/sugar-calendar/includes/languages/sugar-calendar.pot b/sugar-calendar/includes/languages/sugar-calendar.pot index 3dcd6799..4f4f7b75 100644 --- a/sugar-calendar/includes/languages/sugar-calendar.pot +++ b/sugar-calendar/includes/languages/sugar-calendar.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Sugar Calendar (Lite) 2.1.7\n" "Report-Msgid-Bugs-To: https://sugarcalendar.com\n" -"POT-Creation-Date: 2021-02-23 18:13:14+00:00\n" +"POT-Creation-Date: 2021-02-25 02:07:56+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -228,8 +228,8 @@ msgstr "" #: sugar-calendar/includes/admin/help.php:112 #: sugar-calendar/includes/admin/help.php:574 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2411 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:455 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2422 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:468 #: sugar-calendar/includes/admin/meta-boxes.php:1033 #: sugar-calendar/includes/post/functions.php:132 msgid "All Day" @@ -729,135 +729,125 @@ msgstr "" msgid "List" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1588 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1937 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1575 msgid "(No title)" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1973 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:674 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1987 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:687 msgid "Restore" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1978 -msgid "Delete" -msgstr "" - -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1986 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:655 -msgid "Edit" -msgstr "" - -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1987 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:663 -msgid "Duplicate" +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1992 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:704 +msgid "Delete Permanently" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2290 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2300 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2301 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2311 #: sugar-calendar/includes/admin/meta-boxes.php:112 msgid "Details" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2291 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2302 msgid "Password protected" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2389 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2396 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2403 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2423 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2430 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2437 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2461 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2400 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2407 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2414 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2434 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2441 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2448 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2472 #: sugar-calendar/includes/admin/meta-boxes.php:1046 msgid "Start" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2391 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2398 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2405 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2425 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2432 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2439 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2480 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2402 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2409 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2416 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2436 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2443 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2450 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2491 #: sugar-calendar/includes/admin/meta-boxes.php:1109 msgid "End" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2556 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2567 #: sugar-calendar/includes/admin/meta-boxes/class-wp-meta-box.php:86 #: sugar-calendar/includes/admin/meta-boxes.php:1229 msgid "Location" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2899 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2910 #: sugar-calendar/includes/post/types.php:71 msgid "Search Events" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2900 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2911 msgid "Search events..." msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3288 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3299 msgid "Filter by %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3348 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3359 msgid "Switch to this month" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3364 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3375 msgid "Set the day" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3379 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3390 msgid "Set the first year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3382 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3393 #: sugar-calendar/includes/themes/legacy/event-display.php:221 msgid "to" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3384 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3395 msgid "Set the last year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3392 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3403 msgid "Set the year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3419 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3430 msgid "Empty Trash" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3456 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3467 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-day.php:115 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:540 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:553 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-month.php:314 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-week.php:145 msgid "Today" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3457 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3468 msgid "Next month" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3458 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3469 msgid "Next year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3459 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3470 msgid "Previous month" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3460 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3471 msgid "Previous year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3526 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3537 #: sugar-calendar/includes/admin/settings.php:537 #: sugar-calendar/includes/admin/settings.php:594 msgid "Options" @@ -894,82 +884,74 @@ msgstr "" msgid "Multi-day" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:541 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:554 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-month.php:315 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-week.php:147 msgid "Next Month" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:542 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:555 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-month.php:316 msgid "Next Year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:543 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:556 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-month.php:317 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-week.php:149 msgid "Previous Month" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:544 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:557 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-month.php:318 msgid "Previous Year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:584 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:597 #: sugar-calendar/includes/post/types.php:72 msgid "No events found." msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:654 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:667 #. translators: %s: post title msgid "Edit “%s”" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:662 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:675 #. translators: %s: post title msgid "Duplicate “%s”" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:673 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:686 #. translators: %s: post title msgid "Restore “%s” from the Trash" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:681 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:694 #. translators: %s: post title msgid "Move “%s” to the Trash" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:690 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:703 #. translators: %s: post title msgid "Delete “%s” permanently" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:691 -msgid "Delete Permanently" -msgstr "" - -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:704 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:717 #. translators: %s: post title msgid "Preview “%s”" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:705 -msgid "Preview" -msgstr "" - -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:713 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:726 #. translators: %s: post title msgid "View “%s”" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:724 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:737 #. translators: %s: post title msgid "Export “%s” as JSON" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:725 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:738 msgid "Export as JSON" msgstr "" @@ -1038,42 +1020,67 @@ msgstr "" msgid "Name this event" msgstr "" +#: sugar-calendar/includes/admin/posts.php:44 +msgid "Invalid item ID." +msgstr "" + #: sugar-calendar/includes/admin/posts.php:58 -#: sugar-calendar/includes/admin/posts.php:64 +msgid "The item you are trying to copy no longer exists." +msgstr "" + +#: sugar-calendar/includes/admin/posts.php:67 +msgid "Sorry, this item cannot be copied." +msgstr "" + +#: sugar-calendar/includes/admin/posts.php:72 +msgid "Sorry, you are not allowed to copy this item." +msgstr "" + +#: sugar-calendar/includes/admin/posts.php:80 +msgid "This post does not have event data." +msgstr "" + +#: sugar-calendar/includes/admin/posts.php:97 +#: sugar-calendar/includes/admin/posts.php:109 +msgid "Error copying the item." +msgstr "" + +#: sugar-calendar/includes/admin/posts.php:151 +#: sugar-calendar/includes/admin/posts.php:157 msgid "Preview event" msgstr "" -#: sugar-calendar/includes/admin/posts.php:70 +#: sugar-calendar/includes/admin/posts.php:163 msgid "View event" msgstr "" -#: sugar-calendar/includes/admin/posts.php:81 -#: sugar-calendar/includes/admin/posts.php:82 +#: sugar-calendar/includes/admin/posts.php:174 +#: sugar-calendar/includes/admin/posts.php:175 #: sugar-calendar/includes/post/types.php:91 msgid "Event updated." msgstr "" -#: sugar-calendar/includes/admin/posts.php:84 +#: sugar-calendar/includes/admin/posts.php:177 msgid "Event restored to revision from %s." msgstr "" -#: sugar-calendar/includes/admin/posts.php:86 +#: sugar-calendar/includes/admin/posts.php:179 msgid "Event created." msgstr "" -#: sugar-calendar/includes/admin/posts.php:87 +#: sugar-calendar/includes/admin/posts.php:180 msgid "Event saved." msgstr "" -#: sugar-calendar/includes/admin/posts.php:88 +#: sugar-calendar/includes/admin/posts.php:181 msgid "Event submitted." msgstr "" -#: sugar-calendar/includes/admin/posts.php:89 +#: sugar-calendar/includes/admin/posts.php:182 msgid "Event scheduled for: %s." msgstr "" -#: sugar-calendar/includes/admin/posts.php:90 +#: sugar-calendar/includes/admin/posts.php:183 msgid "Event draft updated." msgstr "" @@ -1784,31 +1791,49 @@ msgid_plural "All (%s)" msgstr[0] "" msgstr[1] "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1992 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3415 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:714 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2000 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:668 msgctxt "verb" -msgid "View" +msgid "Edit" +msgstr "" + +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2001 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:676 +msgctxt "verb" +msgid "Duplicate" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:682 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2006 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:695 msgctxt "verb" msgid "Trash" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2339 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2359 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2011 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3426 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:727 +msgctxt "verb" +msgid "View" +msgstr "" + +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:718 +msgctxt "verb" +msgid "Preview" +msgstr "" + +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2350 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2370 msgctxt "Time Time Zone" msgid "%s %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2451 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2470 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2462 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2481 msgctxt "20:00 on Friday" msgid "%s on %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2492 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2503 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:233 msgctxt "Noun" msgid "Repeats" @@ -1834,22 +1859,22 @@ msgctxt "Noun" msgid "Duration" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2501 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2512 msgctxt "Weekly from December 1, 2030 until December 31, 2030" msgid "%s from %s until %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2512 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2523 msgctxt "Weekly forever, starting May 15, 1980" msgid "%s starting %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2521 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2532 msgctxt "Weekly forever" msgid "%s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3336 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3347 msgctxt "Verb" msgid "Filter" msgstr "" @@ -1860,7 +1885,12 @@ msgctxt "Week number" msgid "Week %s" msgstr "" -#: sugar-calendar/includes/admin/posts.php:74 +#: sugar-calendar/includes/admin/posts.php:87 +msgctxt "noun" +msgid "Copy" +msgstr "" + +#: sugar-calendar/includes/admin/posts.php:167 msgctxt "Date formatting" msgid "M j, Y @ H:i" msgstr "" From 2776be0ee63ace9663f6128f5f497b897aee65d8 Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Fri, 26 Feb 2021 14:13:58 -0600 Subject: [PATCH 20/20] Unhook Duplication feature. Also introduce some method modifications to allow for Duplication to be made into a Standard feature. --- sugar-calendar/includes/admin/hooks.php | 3 - .../list-tables/class-wp-list-table-base.php | 71 ++-- .../list-tables/class-wp-list-table-list.php | 158 +------ sugar-calendar/includes/admin/posts.php | 93 ---- .../includes/languages/sugar-calendar.pot | 398 +++++++++++------- 5 files changed, 302 insertions(+), 421 deletions(-) diff --git a/sugar-calendar/includes/admin/hooks.php b/sugar-calendar/includes/admin/hooks.php index 14eca3e4..29e9ae98 100644 --- a/sugar-calendar/includes/admin/hooks.php +++ b/sugar-calendar/includes/admin/hooks.php @@ -49,9 +49,6 @@ // Admin Messages add_filter( 'post_updated_messages', __NAMESPACE__ . '\\Posts\\updated_messages' ); -// Post copy -add_action( 'post_action_sc_copy', __NAMESPACE__ . '\\Posts\copy' ); - // Admin title add_filter( 'admin_title', 'sugar_calendar_admin_title' ); diff --git a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php index e1b465d6..e19001a1 100644 --- a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php +++ b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php @@ -1564,6 +1564,8 @@ protected function get_event( $event = false ) { /** * Return the string for the event title. * + * Based on _draft_or_post_title() but is filtered, and not escaped. + * * @since 2.1.7 * * @param object $event @@ -1619,7 +1621,7 @@ protected function get_event_link( $event = false ) { // Prepare the link HTML $html = '%s'; - $link = sprintf( $html, $attr, $event_title ); + $link = sprintf( $html, $attr, esc_html( $event_title ) ); // Return the event link return $link; @@ -1914,11 +1916,17 @@ protected function setup_pointer( $event = false, $cell = false ) { return; } - // Get all pointer contents + // Get pointer content HTML + $classes = $this->get_event_classes( $event ); + $title = $this->get_pointer_title( $event ); + $text = $this->get_pointer_text( $event ); + $links = $this->get_pointer_links( $event ); + + // Get all pointer contents (do not escape) $pointer_content = array( - 'title' => '

' . $this->get_pointer_title( $event ) . '

', - 'text' => '

' . $this->get_pointer_text( $event ) . '

', - 'links' => '
' . $this->get_pointer_links( $event ) . '
' + 'title' => '

' . $title . '

', + 'text' => '

' . $text . '

', + 'links' => '
' . implode( '', $links ) . '
' ); // Filter @@ -1998,7 +2006,6 @@ protected function get_pointer_links( $event = false ) { // Maybe add edit & copy links if ( $this->current_user_can_edit( $event ) ) { $links['edit'] = '' . $this->get_event_edit_link( $event, esc_html_x( 'Edit', 'verb', 'sugar-calendar' ) ) . ''; - $links['sc_copy'] = '' . $this->get_event_copy_link( $event, esc_html_x( 'Duplicate', 'verb', 'sugar-calendar' ) ) . ''; } // Maybe add delete link @@ -2012,8 +2019,8 @@ protected function get_pointer_links( $event = false ) { } } - // Return - return implode( '', $links ); + // Filter & return + return (array) apply_filters( 'sugar_calendar_admin_get_pointer_links', $links, $event, $this ); } /** @@ -2026,7 +2033,7 @@ protected function get_pointer_links( $event = false ) { * * @return string */ - protected function get_event_edit_link( $event = false, $link_text = '' ) { + public function get_event_edit_link( $event = false, $link_text = '' ) { return '' . $link_text . ''; } @@ -2040,7 +2047,7 @@ protected function get_event_edit_link( $event = false, $link_text = '' ) { * * @return string */ - protected function get_event_copy_link( $event = false, $link_text = '' ) { + public function get_event_copy_link( $event = false, $link_text = '' ) { return '' . $link_text . ''; } @@ -2054,7 +2061,7 @@ protected function get_event_copy_link( $event = false, $link_text = '' ) { * * @return string */ - protected function get_event_delete_link( $event = false, $link_text = '' ) { + public function get_event_delete_link( $event = false, $link_text = '' ) { return '' . $link_text . ''; } @@ -2068,7 +2075,7 @@ protected function get_event_delete_link( $event = false, $link_text = '' ) { * * @return string */ - protected function get_event_restore_link( $event = false, $link_text = '' ) { + public function get_event_restore_link( $event = false, $link_text = '' ) { return '' . $link_text . ''; } @@ -2082,7 +2089,7 @@ protected function get_event_restore_link( $event = false, $link_text = '' ) { * * @return string */ - protected function get_event_view_link( $event = false, $link_text = '' ) { + public function get_event_view_link( $event = false, $link_text = '' ) { return '' . $link_text . ''; } @@ -2692,11 +2699,12 @@ protected function user_can_delete( $user_id = 0, $event = false ) { case 'post' : $type = get_post_type( $event->object_id ); $obj = get_post_type_object( $type ); + $cap = 'do_not_allow'; - // Map to `edit_post` if exists, or `do_not_allow` if not - $cap = ! empty( $obj ) - ? $obj->cap->delete_post - : 'do_not_allow'; + // Map to delete_post if exists + if ( ! empty( $obj ) ) { + $cap = $obj->cap->delete_post; + } break; @@ -2726,7 +2734,7 @@ protected function user_can_delete( $user_id = 0, $event = false ) { * * @return boolean */ - protected function current_user_can_edit( $event = false ) { + public function current_user_can_edit( $event = false ) { return $this->user_can_edit( get_current_user_id(), $event ); } @@ -2752,11 +2760,12 @@ protected function user_can_edit( $user_id = 0, $event = false ) { case 'post' : $type = get_post_type( $event->object_id ); $obj = get_post_type_object( $type ); + $cap = 'do_not_allow'; - // Map to `edit_post` if exists, or `do_not_allow` if not - $cap = ! empty( $obj ) - ? $obj->cap->edit_post - : 'do_not_allow'; + // Map to edit_post if exists + if ( ! empty( $obj ) ) { + $cap = $obj->cap->edit_post; + } break; @@ -2810,13 +2819,23 @@ protected function user_can_view( $user_id = 0, $event = false ) { // Get the cap, based on the object_type switch ( $event->object_type ) { case 'post' : + $post = get_post( $event->object_id ); $type = get_post_type( $event->object_id ); $obj = get_post_type_object( $type ); + $cap = 'do_not_allow'; - // Map to `view_post` if exists, or `do_not_allow` if not - $cap = ! empty( $obj ) - ? $obj->cap->read_post - : 'do_not_allow'; + // Must be viewable by WordPress standards + if ( is_post_type_viewable( $obj ) ) { + + // Some statuses require ability to edit + if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ), true ) ) { + $cap = 'edit_post'; + + // Map to view_post if exists + } elseif ( ! empty( $obj ) ) { + $cap = $obj->cap->read_post; + } + } break; diff --git a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php index 4b5fd3d7..1ef7751b 100644 --- a/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php +++ b/sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php @@ -301,7 +301,7 @@ public function column_title( $item = null ) { // Output the row actions echo $this->row_actions( - $this->get_row_actions( $item ) + $this->get_pointer_links( $item ) ); // Return the buffer @@ -618,160 +618,4 @@ public function single_row( $item ) { object_type ) { - case 'post' : - return $this->get_post_row_actions( $item ); - case 'user' : - //return $this->get_user_row_actions( $item ); - case 'term' : - //return $this->get_term_row_actions( $item ); - } - } - - /** - * Private method copied from WP_Posts_List_Table::handle_row_actions() - * - * @since 2.0.0 - * @param object $item - * @return array - */ - private function get_post_row_actions( $item ) { - - // Attempt to get the post - $post = get_post( $item->object_id ); - - // Bail if no post was found - if ( empty( $post ) ) { - return array(); - } - - $post_type_object = get_post_type_object( $post->post_type ); - $can_edit_post = current_user_can( 'edit_post', $post->ID ); - $actions = array(); - $title = _draft_or_post_title(); - - if ( $can_edit_post && 'trash' !== $post->post_status ) { - $actions['edit'] = sprintf( - '%s', - get_edit_post_link( $post->ID ), - /* translators: %s: post title */ - esc_attr( sprintf( __( 'Edit “%s”', 'sugar-calendar' ), $title ) ), - esc_html_x( 'Edit', 'verb', 'sugar-calendar' ) - ); - - $actions['sc_copy'] = sprintf( - '%s', - $this->get_event_copy_url( $item ), - /* translators: %s: post title */ - esc_attr( sprintf( __( 'Duplicate “%s”', 'sugar-calendar' ), $title ) ), - esc_html_x( 'Duplicate', 'verb', 'sugar-calendar' ) - ); - } - - if ( current_user_can( 'delete_post', $post->ID ) ) { - if ( 'trash' === $post->post_status ) { - $actions['untrash'] = sprintf( - '%s', - wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $post->ID ) ), 'untrash-post_' . $post->ID ), - /* translators: %s: post title */ - esc_attr( sprintf( __( 'Restore “%s” from the Trash', 'sugar-calendar' ), $title ) ), - esc_html__( 'Restore', 'sugar-calendar' ) - ); - } elseif ( EMPTY_TRASH_DAYS ) { - $actions['trash'] = sprintf( - '%s', - get_delete_post_link( $post->ID ), - /* translators: %s: post title */ - esc_attr( sprintf( __( 'Move “%s” to the Trash', 'sugar-calendar' ), $title ) ), - esc_html_x( 'Trash', 'verb', 'sugar-calendar' ) - ); - } - if ( 'trash' === $post->post_status || ! EMPTY_TRASH_DAYS ) { - $actions['delete'] = sprintf( - '%s', - get_delete_post_link( $post->ID, '', true ), - /* translators: %s: post title */ - esc_attr( sprintf( __( 'Delete “%s” permanently', 'sugar-calendar' ), $title ) ), - esc_html__( 'Delete Permanently', 'sugar-calendar' ) - ); - } - } - - if ( is_post_type_viewable( $post_type_object ) ) { - if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ), true ) ) { - if ( $can_edit_post ) { - $preview_link = get_preview_post_link( $post ); - $actions['view'] = sprintf( - '%s', - esc_url( $preview_link ), - /* translators: %s: post title */ - esc_attr( sprintf( __( 'Preview “%s”', 'sugar-calendar' ), $title ) ), - esc_html_x( 'Preview', 'verb', 'sugar-calendar' ) - ); - } - } elseif ( 'trash' !== $post->post_status ) { - $actions['view'] = sprintf( - '%s', - get_permalink( $post->ID ), - /* translators: %s: post title */ - esc_attr( sprintf( __( 'View “%s”', 'sugar-calendar' ), $title ) ), - esc_html_x( 'View', 'verb', 'sugar-calendar' ) - ); - } - } - - if ( 'wp_block' === $post->post_type ) { - $actions['export'] = sprintf( - '', - $post->ID, - /* translators: %s: post title */ - esc_attr( sprintf( __( 'Export “%s” as JSON', 'sugar-calendar' ), $title ) ), - esc_html__( 'Export as JSON', 'sugar-calendar' ) - ); - } - - if ( is_post_type_hierarchical( $post->post_type ) ) { - - /** - * Filters the array of row action links on the Pages list table. - * - * The filter is evaluated only for hierarchical post types. - * - * @since 2.8.0 - * - * @param array $actions An array of row action links. Defaults are - * 'Edit', 'Quick Edit', 'Restore', 'Trash', - * 'Delete Permanently', 'Preview', and 'View'. - * @param WP_Post $post The post object. - */ - $actions = apply_filters( 'page_row_actions', $actions, $post ); - } else { - - /** - * Filters the array of row action links on the Posts list table. - * - * The filter is evaluated only for non-hierarchical post types. - * - * @since 2.8.0 - * - * @param array $actions An array of row action links. Defaults are - * 'Edit', 'Quick Edit', 'Restore', 'Trash', - * 'Delete Permanently', 'Preview', and 'View'. - * @param WP_Post $post The post object. - */ - $actions = apply_filters( 'post_row_actions', $actions, $post ); - } - - // Return actions - return $actions; - } } diff --git a/sugar-calendar/includes/admin/posts.php b/sugar-calendar/includes/admin/posts.php index 094a1165..cb865f5e 100644 --- a/sugar-calendar/includes/admin/posts.php +++ b/sugar-calendar/includes/admin/posts.php @@ -30,99 +30,6 @@ function title( $title, \WP_Post $post ) { return $title; } -/** - * Copy an Event, from within any admin area List Table row action. - * - * @since 2.1.7 - * - * @param int $post_id - */ -function copy( $post_id = 0 ) { - - // Error if no post ID - if ( empty( $post_id ) ) { - wp_die( esc_html__( 'Invalid item ID.', 'sugar-calendar' ) ); - } - - // Action ID - $action = 'sc_copy'; - - // Check the nonce - check_admin_referer( "{$action}-post_{$post_id}" ); - - // Get the Post - $post = get_post( $post_id ); - - // Error if Post does not exist - if ( empty( $post ) ) { - wp_die( esc_html__( 'The item you are trying to copy no longer exists.', 'sugar-calendar' ) ); - } - - // Check Post-Type - $post_type = get_post_type( $post ); - $post_type_object = get_post_type_object( $post_type ); - - // Error if Post-Type is invalid - if ( empty( $post_type_object ) || ! post_type_supports( $post_type, 'events' ) ) { - wp_die( esc_html__( 'Sorry, this item cannot be copied.', 'sugar-calendar' ) ); - } - - // Error if current user cannot edit the original post - if ( ! current_user_can( 'edit_post', $post_id ) ) { - wp_die( esc_html__( 'Sorry, you are not allowed to copy this item.', 'sugar-calendar' ) ); - } - - // Get the Event for the Post - $event = sugar_calendar_get_event_by_object( $post_id, 'post' ); - - // Error if missing Event data - if ( empty( $event ) ) { - wp_die( esc_html__( 'This post does not have event data.', 'sugar-calendar' ) ); - } - - // New status is always draft - $new_status = 'draft'; - - // New title always has suffix - $new_title = $post->post_title . ' - ' . esc_html_x( 'Copy', 'noun', 'sugar-calendar' ); - - // Copy the Post - $new_post_id = sugar_calendar_copy_post( $post_id, array( - 'post_title' => $new_title, - 'post_status' => $new_status - ) ); - - // Error if Post was not copied - if ( empty( $new_post_id ) ) { - wp_die( esc_html__( 'Error copying the item.', 'sugar-calendar' ) ); - } - - // Copy the Event - $new_event_id = sugar_calendar_copy_event( $event->id, array( - 'title' => $new_title, - 'status' => $new_status, - 'object_id' => $new_post_id - ) ); - - // Error if Event was not copied - if ( empty( $new_event_id ) ) { - wp_die( esc_html__( 'Error copying the item.', 'sugar-calendar' ) ); - } - - // Sendback an indication that copy succeeded - $sendback = add_query_arg( - array( - 'copied' => 1, - 'ids' => $post_id, - ), - wp_get_referer() - ); - - // Redirect - wp_safe_redirect( $sendback ); - exit; -} - /** * Filter the messages array and add custom messages for the built-in Post Type. * diff --git a/sugar-calendar/includes/languages/sugar-calendar.pot b/sugar-calendar/includes/languages/sugar-calendar.pot index 4f4f7b75..2593c8ad 100644 --- a/sugar-calendar/includes/languages/sugar-calendar.pot +++ b/sugar-calendar/includes/languages/sugar-calendar.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Sugar Calendar (Lite) 2.1.7\n" "Report-Msgid-Bugs-To: https://sugarcalendar.com\n" -"POT-Creation-Date: 2021-02-25 02:07:56+00:00\n" +"POT-Creation-Date: 2021-02-26 20:12:19+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -29,6 +29,7 @@ msgid "Verifying" msgstr "" #: sugar-calendar/includes/admin/assets.php:154 +#: sugar-calendar/includes/standard/license.php:742 msgid "Verify" msgstr "" @@ -37,6 +38,7 @@ msgid "Verifying..." msgstr "" #: sugar-calendar/includes/admin/assets.php:156 +#: sugar-calendar/includes/standard/license.php:571 msgid "Please enter a valid license key." msgstr "" @@ -228,7 +230,7 @@ msgstr "" #: sugar-calendar/includes/admin/help.php:112 #: sugar-calendar/includes/admin/help.php:574 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2422 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2429 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:468 #: sugar-calendar/includes/admin/meta-boxes.php:1033 #: sugar-calendar/includes/post/functions.php:132 @@ -729,101 +731,99 @@ msgstr "" msgid "List" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1575 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1577 msgid "(No title)" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1987 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:687 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1995 msgid "Restore" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1992 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:704 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2000 msgid "Delete Permanently" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2301 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2311 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2308 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2318 #: sugar-calendar/includes/admin/meta-boxes.php:112 msgid "Details" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2302 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2309 msgid "Password protected" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2400 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2407 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2414 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2434 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2421 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2441 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2448 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2472 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2455 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2479 #: sugar-calendar/includes/admin/meta-boxes.php:1046 msgid "Start" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2402 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2409 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2416 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2436 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2423 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2443 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2450 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2491 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2457 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2498 #: sugar-calendar/includes/admin/meta-boxes.php:1109 msgid "End" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2567 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2574 #: sugar-calendar/includes/admin/meta-boxes/class-wp-meta-box.php:86 #: sugar-calendar/includes/admin/meta-boxes.php:1229 msgid "Location" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2910 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2929 #: sugar-calendar/includes/post/types.php:71 msgid "Search Events" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2911 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2930 msgid "Search events..." msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3299 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3318 msgid "Filter by %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3359 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3378 msgid "Switch to this month" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3375 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3394 msgid "Set the day" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3390 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3409 msgid "Set the first year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3393 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3412 #: sugar-calendar/includes/themes/legacy/event-display.php:221 msgid "to" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3395 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3414 msgid "Set the last year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3403 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3422 msgid "Set the year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3430 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3449 msgid "Empty Trash" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3467 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3486 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-day.php:115 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:553 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-month.php:314 @@ -831,23 +831,23 @@ msgstr "" msgid "Today" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3468 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3487 msgid "Next month" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3469 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3488 msgid "Next year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3470 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3489 msgid "Previous month" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3471 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3490 msgid "Previous year" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3537 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3556 #: sugar-calendar/includes/admin/settings.php:537 #: sugar-calendar/includes/admin/settings.php:594 msgid "Options" @@ -911,50 +911,6 @@ msgstr "" msgid "No events found." msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:667 -#. translators: %s: post title -msgid "Edit “%s”" -msgstr "" - -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:675 -#. translators: %s: post title -msgid "Duplicate “%s”" -msgstr "" - -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:686 -#. translators: %s: post title -msgid "Restore “%s” from the Trash" -msgstr "" - -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:694 -#. translators: %s: post title -msgid "Move “%s” to the Trash" -msgstr "" - -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:703 -#. translators: %s: post title -msgid "Delete “%s” permanently" -msgstr "" - -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:717 -#. translators: %s: post title -msgid "Preview “%s”" -msgstr "" - -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:726 -#. translators: %s: post title -msgid "View “%s”" -msgstr "" - -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:737 -#. translators: %s: post title -msgid "Export “%s” as JSON" -msgstr "" - -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:738 -msgid "Export as JSON" -msgstr "" - #: sugar-calendar/includes/admin/menu.php:22 #: sugar-calendar/includes/admin/menu.php:23 msgid "Sugar Calendar Upgrade" @@ -1020,67 +976,42 @@ msgstr "" msgid "Name this event" msgstr "" -#: sugar-calendar/includes/admin/posts.php:44 -msgid "Invalid item ID." -msgstr "" - #: sugar-calendar/includes/admin/posts.php:58 -msgid "The item you are trying to copy no longer exists." -msgstr "" - -#: sugar-calendar/includes/admin/posts.php:67 -msgid "Sorry, this item cannot be copied." -msgstr "" - -#: sugar-calendar/includes/admin/posts.php:72 -msgid "Sorry, you are not allowed to copy this item." -msgstr "" - -#: sugar-calendar/includes/admin/posts.php:80 -msgid "This post does not have event data." -msgstr "" - -#: sugar-calendar/includes/admin/posts.php:97 -#: sugar-calendar/includes/admin/posts.php:109 -msgid "Error copying the item." -msgstr "" - -#: sugar-calendar/includes/admin/posts.php:151 -#: sugar-calendar/includes/admin/posts.php:157 +#: sugar-calendar/includes/admin/posts.php:64 msgid "Preview event" msgstr "" -#: sugar-calendar/includes/admin/posts.php:163 +#: sugar-calendar/includes/admin/posts.php:70 msgid "View event" msgstr "" -#: sugar-calendar/includes/admin/posts.php:174 -#: sugar-calendar/includes/admin/posts.php:175 +#: sugar-calendar/includes/admin/posts.php:81 +#: sugar-calendar/includes/admin/posts.php:82 #: sugar-calendar/includes/post/types.php:91 msgid "Event updated." msgstr "" -#: sugar-calendar/includes/admin/posts.php:177 +#: sugar-calendar/includes/admin/posts.php:84 msgid "Event restored to revision from %s." msgstr "" -#: sugar-calendar/includes/admin/posts.php:179 +#: sugar-calendar/includes/admin/posts.php:86 msgid "Event created." msgstr "" -#: sugar-calendar/includes/admin/posts.php:180 +#: sugar-calendar/includes/admin/posts.php:87 msgid "Event saved." msgstr "" -#: sugar-calendar/includes/admin/posts.php:181 +#: sugar-calendar/includes/admin/posts.php:88 msgid "Event submitted." msgstr "" -#: sugar-calendar/includes/admin/posts.php:182 +#: sugar-calendar/includes/admin/posts.php:89 msgid "Event scheduled for: %s." msgstr "" -#: sugar-calendar/includes/admin/posts.php:183 +#: sugar-calendar/includes/admin/posts.php:90 msgid "Event draft updated." msgstr "" @@ -1578,6 +1509,198 @@ msgstr "" msgid "Event scheduled." msgstr "" +#: sugar-calendar/includes/standard/beta-updates.php:40 +msgid "Updates" +msgstr "" + +#: sugar-calendar/includes/standard/beta-updates.php:74 +msgid "Software Updates" +msgstr "" + +#: sugar-calendar/includes/standard/beta-updates.php:79 +msgid "Get Beta Versions" +msgstr "" + +#: sugar-calendar/includes/standard/beta-updates.php:82 +msgid "Receive update notifications about beta versions instead." +msgstr "" + +#: sugar-calendar/includes/standard/duplicate.php:29 +msgid "Invalid item ID." +msgstr "" + +#: sugar-calendar/includes/standard/duplicate.php:34 +#: sugar-calendar/includes/standard/duplicate.php:57 +msgid "Sorry, this item cannot be copied." +msgstr "" + +#: sugar-calendar/includes/standard/duplicate.php:48 +msgid "The item you are trying to copy no longer exists." +msgstr "" + +#: sugar-calendar/includes/standard/duplicate.php:62 +msgid "Sorry, you are not allowed to copy this item." +msgstr "" + +#: sugar-calendar/includes/standard/duplicate.php:70 +msgid "This post does not have event data." +msgstr "" + +#: sugar-calendar/includes/standard/duplicate.php:87 +#: sugar-calendar/includes/standard/duplicate.php:99 +msgid "Error copying the item." +msgstr "" + +#: sugar-calendar/includes/standard/license.php:262 +msgid "License" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:537 +msgid "This is a lifetime license. That is amazing!" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:543 +msgid " until: " +msgstr "" + +#: sugar-calendar/includes/standard/license.php:572 +msgid "Empty" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:579 +msgid "This license key is valid%s." +msgstr "" + +#: sugar-calendar/includes/standard/license.php:580 +msgid "Valid" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:587 +msgid "This license key is expired" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:588 +msgid "Expired" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:595 +#: sugar-calendar/includes/standard/license.php:603 +msgid "This license key is disabled." +msgstr "" + +#: sugar-calendar/includes/standard/license.php:596 +msgid "Disabled" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:604 +msgid "Revoked" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:611 +msgid "This license key is not valid." +msgstr "" + +#: sugar-calendar/includes/standard/license.php:612 +#: sugar-calendar/includes/standard/license.php:660 +msgid "Invalid" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:619 +#: sugar-calendar/includes/standard/license.php:627 +#: sugar-calendar/includes/standard/license.php:643 +msgid "This license key is saved but has not been verified." +msgstr "" + +#: sugar-calendar/includes/standard/license.php:620 +#: sugar-calendar/includes/standard/license.php:628 +#: sugar-calendar/includes/standard/license.php:644 +msgid "Site Inactive" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:635 +msgid "This license key could not be deactivated." +msgstr "" + +#: sugar-calendar/includes/standard/license.php:636 +msgid "Failed" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:651 +#: sugar-calendar/includes/standard/license.php:659 +msgid "This license key appears to be for another product." +msgstr "" + +#: sugar-calendar/includes/standard/license.php:652 +msgid "Mismatch" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:667 +msgid "This license key has reached its activation limit." +msgstr "" + +#: sugar-calendar/includes/standard/license.php:668 +msgid "Out of Activations" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:728 +msgid "License Key" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:729 +msgid "Enter a valid license key to enable automatic updates" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:732 +msgid "" +"Look for your license key in your SugarCalendar.com account. " +"Don't have one? Purchase one " +"today!" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:743 +msgid "Deactivate" +msgstr "" + +#: sugar-calendar/includes/standard/license.php:748 +msgid "Refresh Status" +msgstr "" + +#: sugar-calendar/includes/standard/recurring.php:672 +msgid "Recurrence" +msgstr "" + +#: sugar-calendar/includes/standard/recurring.php:708 +msgid "Repeat" +msgstr "" + +#: sugar-calendar/includes/standard/recurring.php:713 +#: sugar-calendar/includes/standard/recurring.php:735 +msgid "Never" +msgstr "" + +#: sugar-calendar/includes/standard/recurring.php:731 +msgid "End Repeat" +msgstr "" + +#: sugar-calendar/includes/standard/updater.php:238 +msgid "There is a new version of %1$s available. %2$sView version %3$s details%4$s." +msgstr "" + +#: sugar-calendar/includes/standard/updater.php:246 +msgid "" +"There is a new version of %1$s available. %2$sView version %3$s details%4$s " +"or %5$supdate now%6$s." +msgstr "" + +#: sugar-calendar/includes/standard/updater.php:489 +msgid "You do not have permission to install plugin updates" +msgstr "" + +#: sugar-calendar/includes/standard/updater.php:489 +msgid "Error" +msgstr "" + #: sugar-calendar/includes/themes/legacy/calendar.php:166 msgid "Go" msgstr "" @@ -1791,49 +1914,40 @@ msgid_plural "All (%s)" msgstr[0] "" msgstr[1] "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2000 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:668 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2008 msgctxt "verb" msgid "Edit" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2001 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:676 -msgctxt "verb" -msgid "Duplicate" -msgstr "" - -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2006 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:695 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2013 msgctxt "verb" msgid "Trash" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2011 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3426 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:727 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2018 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3445 msgctxt "verb" msgid "View" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:718 +#: sugar-calendar/includes/standard/duplicate.php:136 msgctxt "verb" -msgid "Preview" +msgid "Duplicate" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2350 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2370 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2357 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2377 msgctxt "Time Time Zone" msgid "%s %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2462 -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2481 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2469 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2488 msgctxt "20:00 on Friday" msgid "%s on %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2503 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2510 #: sugar-calendar/includes/admin/list-tables/class-wp-list-table-list.php:233 msgctxt "Noun" msgid "Repeats" @@ -1859,22 +1973,22 @@ msgctxt "Noun" msgid "Duration" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2512 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2519 msgctxt "Weekly from December 1, 2030 until December 31, 2030" msgid "%s from %s until %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2523 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2530 msgctxt "Weekly forever, starting May 15, 1980" msgid "%s starting %s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2532 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2539 msgctxt "Weekly forever" msgid "%s" msgstr "" -#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3347 +#: sugar-calendar/includes/admin/list-tables/class-wp-list-table-base.php:3366 msgctxt "Verb" msgid "Filter" msgstr "" @@ -1885,12 +1999,7 @@ msgctxt "Week number" msgid "Week %s" msgstr "" -#: sugar-calendar/includes/admin/posts.php:87 -msgctxt "noun" -msgid "Copy" -msgstr "" - -#: sugar-calendar/includes/admin/posts.php:167 +#: sugar-calendar/includes/admin/posts.php:74 msgctxt "Date formatting" msgid "M j, Y @ H:i" msgstr "" @@ -1935,6 +2044,11 @@ msgctxt "event" msgid "Add New" msgstr "" +#: sugar-calendar/includes/standard/duplicate.php:77 +msgctxt "noun" +msgid "Copy" +msgstr "" + #: sugar-calendar/includes/themes/legacy/calendar.php:241 msgctxt "Previous month" msgid "Previous"