Wordpress++
This commit is contained in:
1 parent
c57294ffe6
commit
790f1487a2
99 files changed
+10942
-6060
No files matched your search
+1
-1
@@ -9,7 +9,7 @@
|
||||
<body>
|
||||
<h1 id="logo">
|
||||
<a href="https://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
|
||||
<br /> Version 4.2.3
|
||||
<br /> Version 4.2.4
|
||||
</h1>
|
||||
<p style="text-align: center">Semantic Personal Publishing Platform</p>
|
||||
|
||||
|
||||
+5
-1
@@ -41,7 +41,11 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
</h2>
|
||||
|
||||
<div class="changelog point-releases">
|
||||
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 3 ); ?></h3>
|
||||
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 4 ); ?></h3>
|
||||
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
|
||||
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 4 ), '4.2.4', number_format_i18n( 4 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_4.2.4' ); ?>
|
||||
</p>
|
||||
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
|
||||
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 20 ), '4.2.3', number_format_i18n( 20 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_4.2.3' ); ?>
|
||||
|
||||
@@ -972,11 +972,14 @@ class Plugin_Upgrader extends WP_Upgrader {
|
||||
|
||||
// Check the folder contains at least 1 valid plugin.
|
||||
$plugins_found = false;
|
||||
foreach ( glob( $working_directory . '*.php' ) as $file ) {
|
||||
$info = get_plugin_data($file, false, false);
|
||||
if ( !empty( $info['Name'] ) ) {
|
||||
$plugins_found = true;
|
||||
break;
|
||||
$files = glob( $working_directory . '*.php' );
|
||||
if ( $files ) {
|
||||
foreach ( $files as $file ) {
|
||||
$info = get_plugin_data( $file, false, false );
|
||||
if ( ! empty( $info['Name'] ) ) {
|
||||
$plugins_found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1542,7 +1542,7 @@ function _admin_notice_post_locked() {
|
||||
// Allow plugins to prevent some users overriding the post lock
|
||||
if ( $override ) {
|
||||
?>
|
||||
<a class="button button-primary wp-tab-last" href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', get_edit_post_link( $post->ID, 'url' ) ) ); ?>"><?php _e('Take over'); ?></a>
|
||||
<a class="button button-primary wp-tab-last" href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', wp_nonce_url( get_edit_post_link( $post->ID, 'url' ), 'lock-post_' . $post->ID ) ) ); ?>"><?php _e('Take over'); ?></a>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
@@ -1249,8 +1249,11 @@ function _upgrade_422_find_genericons_files_in_folder( $directory ) {
|
||||
$files[] = "{$directory}example.html";
|
||||
}
|
||||
|
||||
foreach ( glob( $directory . '*', GLOB_ONLYDIR ) as $dir ) {
|
||||
$files = array_merge( $files, _upgrade_422_find_genericons_files_in_folder( $dir ) );
|
||||
$dirs = glob( $directory . '*', GLOB_ONLYDIR );
|
||||
if ( $dirs ) {
|
||||
foreach ( $dirs as $dir ) {
|
||||
$files = array_merge( $files, _upgrade_422_find_genericons_files_in_folder( $dir ) );
|
||||
}
|
||||
}
|
||||
|
||||
return $files;
|
||||
|
||||
@@ -492,7 +492,7 @@ var wpNavMenu;
|
||||
title = menus.subMenuFocus.replace( '%1$s', itemName ).replace( '%2$d', itemPosition ).replace( '%3$s', parentItemName );
|
||||
}
|
||||
|
||||
$this.prop('title', title).html( title );
|
||||
$this.prop('title', title).text( title );
|
||||
|
||||
// Mark this item's accessibility as refreshed
|
||||
$this.data( 'needs_accessibility_refresh', false );
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
var wpNavMenu;!function(a){var b;b=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:void 0,targetList:void 0,menusChanged:!1,isRTL:!("undefined"==typeof isRtl||!isRtl),negateIfRTL:"undefined"!=typeof isRtl&&isRtl?-1:1,init:function(){b.menuList=a("#menu-to-edit"),b.targetList=b.menuList,this.jQueryExtensions(),this.attachMenuEditListeners(),this.setupInputWithDefaultTitle(),this.attachQuickSearchListeners(),this.attachThemeLocationsListeners(),this.attachTabsPanelListeners(),this.attachUnsavedChangesListener(),b.menuList.length&&this.initSortables(),menus.oneThemeLocationNoMenus&&a("#posttype-page").addSelectedToMenu(b.addMenuItemToBottom),this.initManageLocations(),this.initAccessibility(),this.initToggles(),this.initPreviewing()},jQueryExtensions:function(){a.fn.extend({menuItemDepth:function(){var a=this.eq(0).css(b.isRTL?"margin-right":"margin-left");return b.pxToDepth(a&&-1!=a.indexOf("px")?a.slice(0,-2):0)},updateDepthClass:function(b,c){return this.each(function(){var d=a(this);c=c||d.menuItemDepth(),a(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+b)})},shiftDepthClass:function(b){return this.each(function(){var c=a(this),d=c.menuItemDepth();a(this).removeClass("menu-item-depth-"+d).addClass("menu-item-depth-"+(d+b))})},childMenuItems:function(){var b=a();return this.each(function(){for(var c=a(this),d=c.menuItemDepth(),e=c.next();e.length&&e.menuItemDepth()>d;)b=b.add(e),e=e.next()}),b},shiftHorizontally:function(b){return this.each(function(){var c=a(this),d=c.menuItemDepth(),e=d+b;c.moveHorizontally(e,d)})},moveHorizontally:function(b,c){return this.each(function(){var d=a(this),e=d.childMenuItems(),f=b-c,g=d.find(".is-submenu");d.updateDepthClass(b,c).updateParentMenuItemDBId(),e&&e.each(function(){var b=a(this),c=b.menuItemDepth(),d=c+f;b.updateDepthClass(d,c).updateParentMenuItemDBId()}),0===b?g.hide():g.show()})},updateParentMenuItemDBId:function(){return this.each(function(){var b=a(this),c=b.find(".menu-item-data-parent-id"),d=parseInt(b.menuItemDepth(),10),e=d-1,f=b.prevAll(".menu-item-depth-"+e).first();c.val(0===d?0:f.find(".menu-item-data-db-id").val())})},hideAdvancedMenuItemFields:function(){return this.each(function(){var b=a(this);a(".hide-column-tog").not(":checked").each(function(){b.find(".field-"+a(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return 0===a("#menu-to-edit").length?!1:this.each(function(){var d=a(this),e={},f=d.find(menus.oneThemeLocationNoMenus&&0===d.find(".tabs-panel-active .categorychecklist li input:checked").length?'#page-all li input[type="checkbox"]':".tabs-panel-active .categorychecklist li input:checked"),g=/menu-item\[([^\]]*)/;return c=c||b.addMenuItemToBottom,f.length?(d.find(".spinner").addClass("is-active"),a(f).each(function(){var d=a(this),f=g.exec(d.attr("name")),h="undefined"==typeof f[1]?0:parseInt(f[1],10);this.className&&-1!=this.className.indexOf("add-to-top")&&(c=b.addMenuItemToTop),e[h]=d.closest("li").getItemData("add-menu-item",h)}),void b.addItemToMenu(e,c,function(){f.removeAttr("checked"),d.find(".spinner").removeClass("is-active")})):!1})},getItemData:function(a,b){a=a||"menu-item";var c,d={},e=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];return b||"menu-item"!=a||(b=this.find(".menu-item-data-db-id").val()),b?(this.find("input").each(function(){var f;for(c=e.length;c--;)"menu-item"==a?f=e[c]+"["+b+"]":"add-menu-item"==a&&(f="menu-item["+b+"]["+e[c]+"]"),this.name&&f==this.name&&(d[e[c]]=this.value)}),d):d},setItemData:function(b,c,d){return c=c||"menu-item",d||"menu-item"!=c||(d=a(".menu-item-data-db-id",this).val()),d?(this.find("input").each(function(){var e,f=a(this);a.each(b,function(a,b){"menu-item"==c?e=a+"["+d+"]":"add-menu-item"==c&&(e="menu-item["+d+"]["+a+"]"),e==f.attr("name")&&f.val(b)})}),this):this}})},countMenuItems:function(b){return a(".menu-item-depth-"+b).length},moveMenuItem:function(c,d){var e,f,g,h=a("#menu-to-edit li"),i=h.length,j=c.parents("li.menu-item"),k=j.childMenuItems(),l=j.getItemData(),m=parseInt(j.menuItemDepth(),10),n=parseInt(j.index(),10),o=j.next(),p=o.childMenuItems(),q=parseInt(o.menuItemDepth(),10)+1,r=j.prev(),s=parseInt(r.menuItemDepth(),10),t=r.getItemData()["menu-item-db-id"];switch(d){case"up":if(f=n-1,0===n)break;0===f&&0!==m&&j.moveHorizontally(0,m),0!==s&&j.moveHorizontally(s,m),k?(e=j.add(k),e.detach().insertBefore(h.eq(f)).updateParentMenuItemDBId()):j.detach().insertBefore(h.eq(f)).updateParentMenuItemDBId();break;case"down":if(k){if(e=j.add(k),o=h.eq(e.length+n),p=0!==o.childMenuItems().length,p&&(g=parseInt(o.menuItemDepth(),10)+1,j.moveHorizontally(g,m)),i===n+e.length)break;e.detach().insertAfter(h.eq(n+e.length)).updateParentMenuItemDBId()}else{if(0!==p.length&&j.moveHorizontally(q,m),i===n+1)breaLine truncated
|
||||
var wpNavMenu;!function(a){var b;b=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:void 0,targetList:void 0,menusChanged:!1,isRTL:!("undefined"==typeof isRtl||!isRtl),negateIfRTL:"undefined"!=typeof isRtl&&isRtl?-1:1,init:function(){b.menuList=a("#menu-to-edit"),b.targetList=b.menuList,this.jQueryExtensions(),this.attachMenuEditListeners(),this.setupInputWithDefaultTitle(),this.attachQuickSearchListeners(),this.attachThemeLocationsListeners(),this.attachTabsPanelListeners(),this.attachUnsavedChangesListener(),b.menuList.length&&this.initSortables(),menus.oneThemeLocationNoMenus&&a("#posttype-page").addSelectedToMenu(b.addMenuItemToBottom),this.initManageLocations(),this.initAccessibility(),this.initToggles(),this.initPreviewing()},jQueryExtensions:function(){a.fn.extend({menuItemDepth:function(){var a=this.eq(0).css(b.isRTL?"margin-right":"margin-left");return b.pxToDepth(a&&-1!=a.indexOf("px")?a.slice(0,-2):0)},updateDepthClass:function(b,c){return this.each(function(){var d=a(this);c=c||d.menuItemDepth(),a(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+b)})},shiftDepthClass:function(b){return this.each(function(){var c=a(this),d=c.menuItemDepth();a(this).removeClass("menu-item-depth-"+d).addClass("menu-item-depth-"+(d+b))})},childMenuItems:function(){var b=a();return this.each(function(){for(var c=a(this),d=c.menuItemDepth(),e=c.next();e.length&&e.menuItemDepth()>d;)b=b.add(e),e=e.next()}),b},shiftHorizontally:function(b){return this.each(function(){var c=a(this),d=c.menuItemDepth(),e=d+b;c.moveHorizontally(e,d)})},moveHorizontally:function(b,c){return this.each(function(){var d=a(this),e=d.childMenuItems(),f=b-c,g=d.find(".is-submenu");d.updateDepthClass(b,c).updateParentMenuItemDBId(),e&&e.each(function(){var b=a(this),c=b.menuItemDepth(),d=c+f;b.updateDepthClass(d,c).updateParentMenuItemDBId()}),0===b?g.hide():g.show()})},updateParentMenuItemDBId:function(){return this.each(function(){var b=a(this),c=b.find(".menu-item-data-parent-id"),d=parseInt(b.menuItemDepth(),10),e=d-1,f=b.prevAll(".menu-item-depth-"+e).first();c.val(0===d?0:f.find(".menu-item-data-db-id").val())})},hideAdvancedMenuItemFields:function(){return this.each(function(){var b=a(this);a(".hide-column-tog").not(":checked").each(function(){b.find(".field-"+a(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return 0===a("#menu-to-edit").length?!1:this.each(function(){var d=a(this),e={},f=d.find(menus.oneThemeLocationNoMenus&&0===d.find(".tabs-panel-active .categorychecklist li input:checked").length?'#page-all li input[type="checkbox"]':".tabs-panel-active .categorychecklist li input:checked"),g=/menu-item\[([^\]]*)/;return c=c||b.addMenuItemToBottom,f.length?(d.find(".spinner").addClass("is-active"),a(f).each(function(){var d=a(this),f=g.exec(d.attr("name")),h="undefined"==typeof f[1]?0:parseInt(f[1],10);this.className&&-1!=this.className.indexOf("add-to-top")&&(c=b.addMenuItemToTop),e[h]=d.closest("li").getItemData("add-menu-item",h)}),void b.addItemToMenu(e,c,function(){f.removeAttr("checked"),d.find(".spinner").removeClass("is-active")})):!1})},getItemData:function(a,b){a=a||"menu-item";var c,d={},e=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];return b||"menu-item"!=a||(b=this.find(".menu-item-data-db-id").val()),b?(this.find("input").each(function(){var f;for(c=e.length;c--;)"menu-item"==a?f=e[c]+"["+b+"]":"add-menu-item"==a&&(f="menu-item["+b+"]["+e[c]+"]"),this.name&&f==this.name&&(d[e[c]]=this.value)}),d):d},setItemData:function(b,c,d){return c=c||"menu-item",d||"menu-item"!=c||(d=a(".menu-item-data-db-id",this).val()),d?(this.find("input").each(function(){var e,f=a(this);a.each(b,function(a,b){"menu-item"==c?e=a+"["+d+"]":"add-menu-item"==c&&(e="menu-item["+d+"]["+a+"]"),e==f.attr("name")&&f.val(b)})}),this):this}})},countMenuItems:function(b){return a(".menu-item-depth-"+b).length},moveMenuItem:function(c,d){var e,f,g,h=a("#menu-to-edit li"),i=h.length,j=c.parents("li.menu-item"),k=j.childMenuItems(),l=j.getItemData(),m=parseInt(j.menuItemDepth(),10),n=parseInt(j.index(),10),o=j.next(),p=o.childMenuItems(),q=parseInt(o.menuItemDepth(),10)+1,r=j.prev(),s=parseInt(r.menuItemDepth(),10),t=r.getItemData()["menu-item-db-id"];switch(d){case"up":if(f=n-1,0===n)break;0===f&&0!==m&&j.moveHorizontally(0,m),0!==s&&j.moveHorizontally(s,m),k?(e=j.add(k),e.detach().insertBefore(h.eq(f)).updateParentMenuItemDBId()):j.detach().insertBefore(h.eq(f)).updateParentMenuItemDBId();break;case"down":if(k){if(e=j.add(k),o=h.eq(e.length+n),p=0!==o.childMenuItems().length,p&&(g=parseInt(o.menuItemDepth(),10)+1,j.moveHorizontally(g,m)),i===n+e.length)break;e.detach().insertAfter(h.eq(n+e.length)).updateParentMenuItemDBId()}else{if(0!==p.length&&j.moveHorizontally(q,m),i===n+1)breaLine truncated
|
||||
@@ -160,6 +160,7 @@ case 'edit':
|
||||
wp_die( __( 'You can’t edit this item because it is in the Trash. Please restore it and try again.' ) );
|
||||
|
||||
if ( ! empty( $_GET['get-post-lock'] ) ) {
|
||||
check_admin_referer( 'lock-post_' . $post_id );
|
||||
wp_set_post_lock( $post_id );
|
||||
wp_redirect( get_edit_post_link( $post_id, 'url' ) );
|
||||
exit();
|
||||
|
||||
Binary file not shown.
+146
-144
@@ -7,7 +7,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: Administration\n"
|
||||
|
||||
#. Author URI of the plugin/theme
|
||||
@@ -1657,23 +1657,23 @@ msgstr "← Tilbake til redigering av innlegget"
|
||||
msgid "Compare Revisions of “%1$s”"
|
||||
msgstr "Sammenlign revisjoner av «%1$s»"
|
||||
|
||||
#: wp-admin/post.php:288
|
||||
#: wp-admin/post.php:289
|
||||
msgid "This item has already been deleted."
|
||||
msgstr "Elementet har allerede blitt slettet."
|
||||
|
||||
#: wp-admin/post.php:276
|
||||
#: wp-admin/post.php:277
|
||||
msgid "You are not allowed to move this item out of the Trash."
|
||||
msgstr "Du har ikke lov til å flytte dette ut av papirkurven."
|
||||
|
||||
#: wp-admin/post.php:270
|
||||
#: wp-admin/post.php:271
|
||||
msgid "The item you are trying to restore from the Trash no longer exists."
|
||||
msgstr "Elementet du prøvde å gjenopprette fra papirkurven finnes ikke lengre."
|
||||
|
||||
#: wp-admin/post.php:257
|
||||
#: wp-admin/post.php:258
|
||||
msgid "You cannot move this item to the Trash. %s is currently editing."
|
||||
msgstr "Du kan ikke flytte dette elementet til Papirkurven. %s arbeider med det nå."
|
||||
|
||||
#: wp-admin/post.php:247
|
||||
#: wp-admin/post.php:248
|
||||
msgid "The item you are trying to move to the Trash no longer exists."
|
||||
msgstr "Elementet du prøvde å flytte til papirkurven finnes ikke lengre."
|
||||
|
||||
@@ -6605,16 +6605,16 @@ msgid "%1$s <span class=\"count\">(%2$s)</span>"
|
||||
msgstr "%1$s <span class=\"count\">(%2$s)</span>"
|
||||
|
||||
#. translators: 1: Error code, 2: Error message.
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3214
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3217
|
||||
msgid "Error: [%1$s] %2$s"
|
||||
msgstr "Feil: [%1$s] %2$s"
|
||||
|
||||
#. translators: 1: Error code, 2: Error message.
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3211
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3214
|
||||
msgid "Rollback Error: [%1$s] %2$s"
|
||||
msgstr "Rollback-feil: [%1$s] %2$s"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3187
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3190
|
||||
msgid ""
|
||||
"UPDATE LOG\n"
|
||||
"=========="
|
||||
@@ -6622,15 +6622,15 @@ msgstr ""
|
||||
"OPPDATERINGSLOGG\n"
|
||||
"================"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3184
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3187
|
||||
msgid "[%s] Background updates have finished"
|
||||
msgstr "[%s] Bakgrunnsoppdateringene er klare"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3182
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3185
|
||||
msgid "[%s] There were failures during background updates"
|
||||
msgstr "[%s] Det skjedde feil i løpet av bakgrunnsoppdateringene"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3169
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3172
|
||||
msgid ""
|
||||
"BETA TESTING?\n"
|
||||
"=============\n"
|
||||
@@ -6656,312 +6656,312 @@ msgstr ""
|
||||
"\n"
|
||||
"-- WordPress-teamet"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3159
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3162
|
||||
msgid "FAILED: %s"
|
||||
msgstr "FEILET: %s"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3153
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3156
|
||||
msgid "The following translations failed to update:"
|
||||
msgstr "Følgende oversettelser kunne ikke oppdateres:"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3152
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3155
|
||||
msgid "The following themes failed to update:"
|
||||
msgstr "Følgende temaer kunne ikke oppdateres:"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3151
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3154
|
||||
msgid "The following plugins failed to update:"
|
||||
msgstr "Følgende utvidelser kunne ikke oppdateres:"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3145
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3148
|
||||
msgid "SUCCESS: %s"
|
||||
msgstr "VELLYKKET: %s"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3140
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3143
|
||||
msgid "The following translations were successfully updated:"
|
||||
msgstr "Følgende oversettelser ble korrekt oppdaterte:"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3139
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3142
|
||||
msgid "The following themes were successfully updated:"
|
||||
msgstr "Følgende temaer ble korrekt oppdaterte:"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3138
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3141
|
||||
msgid "The following plugins were successfully updated:"
|
||||
msgstr "Følgende utvidelser ble korrekt oppdaterte:"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3125
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3128
|
||||
msgid "FAILED: WordPress failed to update to %s"
|
||||
msgstr "FEILET: Wordpress ble ikke oppdatert til %s"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3123
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3126
|
||||
msgid "SUCCESS: WordPress was successfully updated to %s"
|
||||
msgstr "VELLYKKET: WordPress ble oppdatert til %s"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3117
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3120
|
||||
msgid "WordPress site: %s"
|
||||
msgstr "WordPress-nettsted: %s"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3063
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3066
|
||||
msgid "Error code: %s"
|
||||
msgstr "Feilkode: %s"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3050
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3053
|
||||
msgid "Your hosting company, support forum volunteers, or a friendly developer may be able to use this information to help you:"
|
||||
msgstr "Din webhost, frivillige i supportforumet eller vennligsinnede utviklere kan kanskje bruke denne informasjonen for å hjelpe deg:"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3049
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3052
|
||||
msgid "We have some data that describes the error your site encountered."
|
||||
msgstr "Vi har noe data som beskriver feilen som ditt nettsted opplevde."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3048
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3051
|
||||
msgid "Your site was running version %s."
|
||||
msgstr "Ditt nettsted kjørte versjon %s."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3044
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3047
|
||||
msgid "The WordPress Team"
|
||||
msgstr "WordPress-teamet"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3040
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3043
|
||||
msgid "You also have some plugins or themes with updates available. Update them now:"
|
||||
msgstr "Du har også noen utvidelser eller temaer som har tilgjengelige oppdateringer. Oppdater dem nå:"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3035
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3038
|
||||
msgid "If you reach out to us, we'll also ensure you'll never have this problem again."
|
||||
msgstr "Hvis du når ut til oss, vil vi også gjøre vårt ytterste for at du aldri skal måtte ha dette problemet igjen."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3031 wp-admin/update-core.php:478
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3034 wp-admin/update-core.php:478
|
||||
msgid "Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers."
|
||||
msgstr "Å holde nettstedet oppdatert er viktig for sikkerheten. Det gjør også Internett til et tryggere sted for deg og dine lesere."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3025
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3028
|
||||
msgid "If you experience any issues or need support, the volunteers in the WordPress.org support forums may be able to help."
|
||||
msgstr "Hvis du opplever noen problemer eller trenger støtte, kan kanskje de frivillige i WordPress.org supportforum hjelpe deg."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3022
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3025
|
||||
msgid "The WordPress team is willing to help you. Forward this email to %s and the team will work with you to make sure your site is working."
|
||||
msgstr "Wordpress-teamet er klare for å hjelpe deg. Send denne e-posten videre til %s, og teamet vil jobbe for å få ditt nettsted til å fungere."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3014
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3017
|
||||
msgid "Please check out your site now. It's possible that everything is working. If it says you need to update, you should do so:"
|
||||
msgstr "Vennligst sjekk ditt nettsted nå. Det er mulig at alt fungerer. Hvis det sier at du må oppdatere, bør du gjøre dette:"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3012
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3015
|
||||
msgid "This means your site may be offline or broken. Don't panic; this can be fixed."
|
||||
msgstr "Dette betyr at ditt nettsted kan være utilgjengelig eller ødelagt. Men, foreløpig ingen grunn til panikk; dette kan vi fikse."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3010
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3013
|
||||
msgid "Your site at %1$s experienced a critical failure while trying to update to the latest version of WordPress, %2$s."
|
||||
msgstr "Ditt nettsted på %1$s fikk en kritisk feil mens det prøvde å oppdatere seg selv til siste versjon av WordPress, %2$s."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3008
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3011
|
||||
msgid "Your site at %1$s experienced a critical failure while trying to update WordPress to version %2$s."
|
||||
msgstr "Det skjedde en kritisk feil når ditt nettsted på %1$s skulle oppdatere WordPress til versjon %2$s."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3000
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3003
|
||||
msgid "We tried but were unable to update your site automatically."
|
||||
msgstr "Vi forsøkte, men klarte ikke å oppdatere ditt nettsted automatisk."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2993
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2996
|
||||
msgid "Please update your site at %1$s to WordPress %2$s."
|
||||
msgstr "Vennligst oppdater ditt nettsted på %1$s til WordPress %2$s."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2985
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3002
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2988
|
||||
#: wp-admin/includes/class-wp-upgrader.php:3005
|
||||
msgid "Updating is easy and only takes a few moments:"
|
||||
msgstr "Å oppdatere er lett, og tar kun få minutter:"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2984
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2987
|
||||
msgid "WordPress %s is also now available."
|
||||
msgstr "WordPress %s er nå også tilgjengelig."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2980
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2983
|
||||
msgid "For more on version %s, see the About WordPress screen:"
|
||||
msgstr "For mer om versjon %s, se Om WordPress-skjermen:"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2976
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2979
|
||||
msgid "No further action is needed on your part."
|
||||
msgstr "Du trenger ikke å gjøre noe mer!"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2973
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2976
|
||||
msgid "Howdy! Your site at %1$s has been updated automatically to WordPress %2$s."
|
||||
msgstr "Hei! Ditt nettsted på %1$s har blitt oppdatert automatisk til WordPress %2$s."
|
||||
|
||||
#. translators: 1: Site name.
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2958
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2961
|
||||
msgid "[%1$s] URGENT: Your site may be down due to a failed update"
|
||||
msgstr "[%1$s] HASTER: Ditt nettsted kan være nede på grunn av en mislykket oppdatering"
|
||||
|
||||
#. translators: 1: Site name, 2: WordPress version number.
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2953
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2956
|
||||
msgid "[%1$s] WordPress %2$s is available. Please update!"
|
||||
msgstr "[%1$s] WordPress %2$s er tilgjengelig. Vennligst oppdater!"
|
||||
|
||||
#. translators: 1: Site name, 2: WordPress version number.
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2947
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2950
|
||||
msgid "[%1$s] Your site has updated to WordPress %2$s"
|
||||
msgstr "[%1$s] Ditt nettsted har blitt oppdatert til WordPress %2$s"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2672
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2675
|
||||
#: wp-admin/includes/update-core.php:1177 wp-admin/update-core.php:432
|
||||
msgid "WordPress updated successfully"
|
||||
msgstr "Oppdateringen av WordPress var vellykket"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2670 wp-admin/update-core.php:427
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2673 wp-admin/update-core.php:427
|
||||
msgid "Installation Failed"
|
||||
msgstr "Installasjon feilet"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2641
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2644
|
||||
msgid "Translations for %s"
|
||||
msgstr "Oversettelser for %s"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2637
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2640
|
||||
msgid "Updating plugin: %s"
|
||||
msgstr "Oppdaterer utvidelse: %s"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2631
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2634
|
||||
msgid "Updating theme: %s"
|
||||
msgstr "Oppdaterer tema: %s"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2625
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2628
|
||||
msgid "WordPress %s"
|
||||
msgstr "WordPress %s"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2624
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2627
|
||||
msgid "Updating to WordPress %s"
|
||||
msgstr "Oppdaterer til WordPress %s"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2287
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2321
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2290
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2324
|
||||
msgid "Please select a file"
|
||||
msgstr "Vennligst velg en fil"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2025
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2028
|
||||
#: wp-admin/includes/update-core.php:820 wp-admin/includes/update-core.php:895
|
||||
#: wp-admin/includes/update-core.php:918
|
||||
msgid "The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions."
|
||||
msgstr "Oppdateringen kan ikke installeres fordi at noen av filene ikke vil kunne kopieres. Dette er som regel på grunn av inkonsekvente filrettigheter."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1940
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1943
|
||||
msgid "Due to an error during updating, WordPress has rolled back to your previous version."
|
||||
msgstr "På grunn av en feil under oppdatering, har WordPress blitt rullet tilbake til den forrige versjonen."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1939
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1942
|
||||
msgid "Attempting to roll back to previous version."
|
||||
msgstr "Prøver å rulle tilbake til den forrige versjonen."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1938 wp-admin/includes/file.php:621
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1941 wp-admin/includes/file.php:621
|
||||
#: wp-admin/includes/file.php:725
|
||||
msgid "Could not copy files. You may have run out of disk space."
|
||||
msgstr "Kunne ikke kopiere filer. Du kan ha gått tom for lagringsplass."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1937
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1940
|
||||
msgid "Could not copy files."
|
||||
msgstr "Kunne ikke kopiere filer."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1933
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1936
|
||||
msgid "WordPress is at the latest version."
|
||||
msgstr "WordPress er nyeste versjon."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1883
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1886
|
||||
msgid "The language pack is missing either the <code>.po</code> or <code>.mo</code> files."
|
||||
msgstr "Språkpakken mangler enten <code>.po</code>- eller <code>.mo</code>-filene."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1706
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1709
|
||||
msgid "Translation updated successfully."
|
||||
msgstr "Oppdateringen av oversettelser var vellykket."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1705
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1708
|
||||
msgid "Translation update failed."
|
||||
msgstr "Oppdatering av oversettelser mislyktes."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1703
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1706
|
||||
msgid "Downloading translation from <span class=\"code\">%s</span>…"
|
||||
msgstr "Laster ned oversettelser fra <span class=\"code\">%s</span>…"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1701
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1704
|
||||
msgid "The translation is up to date."
|
||||
msgstr "Oversettelsene er oppdaterte."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1700
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1703
|
||||
msgid "Some of your translations need updating. Sit tight for a few more seconds while we update them as well."
|
||||
msgstr "Noen av dine oversettelser må oppdateres. Sitt i ro noen sekunder mens vi oppdaterer dem også."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1500
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1503
|
||||
msgid "The theme is missing the <code>index.php</code> file."
|
||||
msgstr "Temaet mangler filen <code>index.php</code>."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1496
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1499
|
||||
msgid "The <code>style.css</code> stylesheet doesn't contain a valid theme header."
|
||||
msgstr "Stilsettet <code>style.css</code> inneholder et gyldig hode for et tema."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1491
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1494
|
||||
msgid "The theme is missing the <code>style.css</code> stylesheet."
|
||||
msgstr "Temaet mangler stilsettet <code>style.css</code>."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1147
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1150
|
||||
msgid "<strong>The parent theme could not be found.</strong> You will need to install the parent theme, <strong>%s</strong>, before you can use this child theme."
|
||||
msgstr "<strong>Foreldretemaet ble ikke funnet.</strong> Du må installere foreldretemaet, <strong>%s</strong>, før du kan bruke dette dattertemaet."
|
||||
|
||||
#. translators: 1: theme name, 2: version
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1146
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1149
|
||||
msgid "Successfully installed the parent theme, <strong>%1$s %2$s</strong>."
|
||||
msgstr "Vellykket installasjon av foreldretema, <strong>%1$s %2$s</strong>."
|
||||
|
||||
#. translators: 1: theme name, 2: version
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1144
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1147
|
||||
msgid "The parent theme, <strong>%1$s %2$s</strong>, is currently installed."
|
||||
msgstr "Foreldretemaet, <strong>%1$s %2$s</strong>, er installert."
|
||||
|
||||
#. translators: 1: theme name, 2: version
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1142
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1145
|
||||
msgid "Preparing to install <strong>%1$s %2$s</strong>…"
|
||||
msgstr "Forbereder installasjon av <strong>%1$s %2$s</strong>…"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1140
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1143
|
||||
msgid "This theme requires a parent theme. Checking if it is installed…"
|
||||
msgstr "Temaet forutsetter et foreldretema. Sjekker om det er installert…"
|
||||
|
||||
#. translators: 1: theme name, 2: version
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1139
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1142
|
||||
msgid "Successfully installed the theme <strong>%1$s %2$s</strong>."
|
||||
msgstr "Suksess: <strong>%1$s %2$s</strong> temaet er installert."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1137
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1140
|
||||
msgid "Theme installed successfully."
|
||||
msgstr "Tema installert med suksess."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1136
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1139
|
||||
msgid "Theme install failed."
|
||||
msgstr "Installer tema feilet."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1135
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1138
|
||||
msgid "The theme contains no files."
|
||||
msgstr "Temaet inneholder ingen filer."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1134
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1137
|
||||
msgid "Installing the theme…"
|
||||
msgstr "Installerer temaet…"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1122
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1125
|
||||
msgid "Theme updated successfully."
|
||||
msgstr "Tema oppdatert."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1121
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1124
|
||||
msgid "Theme update failed."
|
||||
msgstr "Temaoppdateringen mislyktes."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1120
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1123
|
||||
msgid "Could not remove the old theme."
|
||||
msgstr "Kunne ikke fjerne det gamle temaet."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1119
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1122
|
||||
msgid "Removing the old version of the theme…"
|
||||
msgstr "Fjerner den gamle versjonen av temaet…"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1115
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1118
|
||||
msgid "The theme is at the latest version."
|
||||
msgstr "Dette temaet er nyeste versjon."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:984
|
||||
#: wp-admin/includes/class-wp-upgrader.php:987
|
||||
msgid "No valid plugins were found."
|
||||
msgstr "Ingen gyldige utvidelser ble funnet."
|
||||
|
||||
@@ -6982,17 +6982,17 @@ msgid "Installing the plugin…"
|
||||
msgstr "Installerer utvidelsen…"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:699
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1133
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1136
|
||||
msgid "Unpacking the package…"
|
||||
msgstr "Pakker ut pakken…"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:698
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1132
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1135
|
||||
msgid "Downloading install package from <span class=\"code\">%s</span>…"
|
||||
msgstr "Laster ned installasjonspakke fra <span class=\"count\">(%s)</span>…"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:697
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1131
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1134
|
||||
msgid "Install package not available."
|
||||
msgstr "Installeringspakke ikke tilgjengelig."
|
||||
|
||||
@@ -7017,22 +7017,22 @@ msgid "Removing the old version of the plugin…"
|
||||
msgstr "Fjerner den gamle versjonen av utvidelsen…"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:683
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1118
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1704
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1936
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1121
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1707
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1939
|
||||
msgid "Unpacking the update…"
|
||||
msgstr "Pakker ut oppdateringen…"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:682
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1117
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1935
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1120
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1938
|
||||
msgid "Downloading update from <span class=\"code\">%s</span>…"
|
||||
msgstr "Laster ned oppdatering fra <span class=\"code\">%s</span>…"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:681
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1116
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1702
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1934
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1119
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1705
|
||||
#: wp-admin/includes/class-wp-upgrader.php:1937
|
||||
msgid "Update package not available."
|
||||
msgstr "Oppdateringspakken ikke tilgjengelig."
|
||||
|
||||
@@ -7103,7 +7103,7 @@ msgid "Filesystem error."
|
||||
msgstr "Filsystem-feil."
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader.php:120
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2664 wp-admin/includes/file.php:527
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2667 wp-admin/includes/file.php:527
|
||||
#: wp-admin/includes/plugin.php:795 wp-admin/includes/theme.php:53
|
||||
msgid "Could not access filesystem."
|
||||
msgstr "Kunne ikke lese filsystemet."
|
||||
@@ -7113,7 +7113,7 @@ msgid "Invalid Data provided."
|
||||
msgstr "Ugyldig data angitt"
|
||||
|
||||
#: wp-admin/includes/class-wp-upgrader-skins.php:668
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2642
|
||||
#: wp-admin/includes/class-wp-upgrader.php:2645
|
||||
msgid "Updating translations for %1$s (%2$s)…"
|
||||
msgstr "Oppdaterer oversettelser for %1$s (%2$s)…"
|
||||
|
||||
@@ -9042,16 +9042,16 @@ msgstr "Skjerminnhold"
|
||||
msgid "This screen provides access to all of your posts. You can customize the display of this screen to suit your workflow."
|
||||
msgstr "Dette skjermbildet gir deg tilgang til alle dine innlegg. Du kan tilpasse visningen av skjermbildet slik at det passer til din måte å jobbe."
|
||||
|
||||
#: wp-admin/edit.php:131 wp-admin/edit.php:134 wp-admin/post.php:300
|
||||
#: wp-admin/post.php:303 wp-admin/upload.php:156
|
||||
#: wp-admin/edit.php:131 wp-admin/edit.php:134 wp-admin/post.php:301
|
||||
#: wp-admin/post.php:304 wp-admin/upload.php:156
|
||||
msgid "Error in deleting."
|
||||
msgstr "Feil under sletting."
|
||||
|
||||
#: wp-admin/edit.php:127 wp-admin/post.php:294
|
||||
#: wp-admin/edit.php:127 wp-admin/post.php:295
|
||||
msgid "You are not allowed to delete this item."
|
||||
msgstr "Du har ikke lov til å slettet denne."
|
||||
|
||||
#: wp-admin/edit.php:115 wp-admin/post.php:279
|
||||
#: wp-admin/edit.php:115 wp-admin/post.php:280
|
||||
msgid "Error in restoring from Trash."
|
||||
msgstr "Feil under gjenoppretting fra papirkurven."
|
||||
|
||||
@@ -9059,11 +9059,11 @@ msgstr "Feil under gjenoppretting fra papirkurven."
|
||||
msgid "You are not allowed to restore this item from the Trash."
|
||||
msgstr "Du har ikke lov til å gjenopprette dette fra papirkurven."
|
||||
|
||||
#: wp-admin/edit.php:101 wp-admin/post.php:261
|
||||
#: wp-admin/edit.php:101 wp-admin/post.php:262
|
||||
msgid "Error in moving to Trash."
|
||||
msgstr "Feil under flytting til papirkurven."
|
||||
|
||||
#: wp-admin/edit.php:93 wp-admin/post.php:253
|
||||
#: wp-admin/edit.php:93 wp-admin/post.php:254
|
||||
msgid "You are not allowed to move this item to the Trash."
|
||||
msgstr "Du har ikke lov til å flytte dette til papirkurven."
|
||||
|
||||
@@ -10405,8 +10405,8 @@ msgstr "Rediger"
|
||||
msgid "You are not allowed to edit this item."
|
||||
msgstr "Du har ikke lov til å redigere dette."
|
||||
|
||||
#: wp-admin/async-upload.php:55 wp-admin/post.php:154 wp-admin/post.php:250
|
||||
#: wp-admin/post.php:273 wp-admin/post.php:291
|
||||
#: wp-admin/async-upload.php:55 wp-admin/post.php:154 wp-admin/post.php:251
|
||||
#: wp-admin/post.php:274 wp-admin/post.php:292
|
||||
msgid "Unknown post type."
|
||||
msgstr "Ukjent innleggstype."
|
||||
|
||||
@@ -10444,165 +10444,167 @@ msgstr "Takk for at du skaper med <a href=\"%s\">WordPress</a>."
|
||||
|
||||
#. translators: 1: WordPress version number, 2: plural number of bugs. Singular
|
||||
#. security issue.
|
||||
#: wp-admin/about.php:171
|
||||
#: wp-admin/about.php:179
|
||||
msgid "<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bug."
|
||||
msgid_plural "<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs."
|
||||
msgstr[0] "<strong>Versjon %1$s</strong> tettet et sikkerhetshull og rettet %2$s programfeil."
|
||||
msgstr[1] "<strong>Versjon %1$s</strong> tettet et sikkerhetshull og rettet %2$s programfeil."
|
||||
|
||||
#. translators: 1: WordPress version number, 2: plural number of bugs.
|
||||
#: wp-admin/about.php:167
|
||||
#: wp-admin/about.php:175
|
||||
msgid "<strong>Version %1$s</strong> addressed %2$s bug."
|
||||
msgid_plural "<strong>Version %1$s</strong> addressed %2$s bugs."
|
||||
msgstr[0] "<strong>Versjon %1$s</strong> rettet %2$s programfeil."
|
||||
msgstr[1] "<strong>Versjon %1$s</strong> rettet %2$s programfeil."
|
||||
|
||||
#: wp-admin/about.php:159
|
||||
#: wp-admin/about.php:167
|
||||
msgid "Security Release"
|
||||
msgid_plural "Security Releases"
|
||||
msgstr[0] "Sikkerhetsoppdatering"
|
||||
msgstr[1] "Sikkerhetsoppdateringer"
|
||||
|
||||
#: wp-admin/about.php:158
|
||||
#: wp-admin/about.php:166
|
||||
msgid "Maintenance Release"
|
||||
msgid_plural "Maintenance Releases"
|
||||
msgstr[0] "Vedlikeholdsoppdatering"
|
||||
msgstr[1] "Vedlikeholdsoppdateringer"
|
||||
|
||||
#: wp-admin/about.php:146
|
||||
#: wp-admin/about.php:154
|
||||
msgid "Go to Dashboard"
|
||||
msgstr "Gå til kontrollpanel"
|
||||
|
||||
#: wp-admin/about.php:146
|
||||
#: wp-admin/about.php:154
|
||||
msgid "Go to Dashboard → Home"
|
||||
msgstr "Gå til Kontrollpanel → Hjem"
|
||||
|
||||
#: wp-admin/about.php:142
|
||||
#: wp-admin/about.php:150
|
||||
msgid "Return to Dashboard → Updates"
|
||||
msgstr "Tilbake til Kontrollpanel → Oppdateringer"
|
||||
|
||||
#: wp-admin/about.php:142
|
||||
#: wp-admin/about.php:150
|
||||
msgid "Return to Updates"
|
||||
msgstr "Tilbake til oppdateringer"
|
||||
|
||||
#. translators: 1: WP_Query, 2: WP_Comment_Query, 3: WP_User_Query
|
||||
#: wp-admin/about.php:133
|
||||
#: wp-admin/about.php:141
|
||||
msgid "%1$s, %2$s, and %3$s now support complex ordering with named meta query clauses."
|
||||
msgstr "%1$s, %2$s og %3$s støtter nå kompleks rekkefølge med navngitte metaspørringsklausuler."
|
||||
|
||||
#: wp-admin/about.php:130
|
||||
#: wp-admin/about.php:138
|
||||
msgid "Complex query ordering"
|
||||
msgstr "Kompleks rekkefølge på spørringer"
|
||||
|
||||
#. translators: 1: Term splitting guide link
|
||||
#: wp-admin/about.php:127
|
||||
#: wp-admin/about.php:135
|
||||
msgid "Terms shared across multiple taxonomies will be split when one of them is updated. Find out more in the <a href=\"%1$s\">Plugin Developer Handbook</a>."
|
||||
msgstr "Termer delt over flere taksonomier vil bli delt opp når én av dem oppdateres. Finn ut mer i <a href=\"%1$s\">Utviklerhåndboken for utvidelser</a>."
|
||||
|
||||
#: wp-admin/about.php:124
|
||||
#: wp-admin/about.php:132
|
||||
msgid "Shared term splitting"
|
||||
msgstr "Deling av delte termer"
|
||||
|
||||
#. translators: %s wp.a11y.speak()
|
||||
#: wp-admin/about.php:120
|
||||
#: wp-admin/about.php:128
|
||||
msgid "You can now send audible notifications to screen readers in JavaScript with %s. Pass it a string, and an update will be sent to a dedicated ARIA live notifications area."
|
||||
msgstr "Du kan nå sende hørbare varsler til skjermlesere i JavaScript med %s. Send det en tekststreng, og en oppdatering vil bli sendt til et dedikert ARIA live varslingsområde."
|
||||
|
||||
#: wp-admin/about.php:117
|
||||
#: wp-admin/about.php:125
|
||||
msgid "JavaScript accessibility"
|
||||
msgstr "JavaScript-tilgjengelighet"
|
||||
|
||||
#: wp-admin/about.php:115
|
||||
#: wp-admin/about.php:123
|
||||
msgid "Database character encoding has changed from utf8 to utf8mb4, which adds support for a whole range of new 4-byte characters."
|
||||
msgstr "Tegnkodingen i databasen er endret fra utf8 til utf8mb4, som betyr støtte for en hel serie av nye 4-byte tegn."
|
||||
|
||||
#: wp-admin/about.php:114
|
||||
#: wp-admin/about.php:122
|
||||
msgid "utf8mb4 support"
|
||||
msgstr "Støtte for utf8mb4"
|
||||
|
||||
#: wp-admin/about.php:110
|
||||
#: wp-admin/about.php:118
|
||||
msgid "Under the Hood"
|
||||
msgstr "Under panseret"
|
||||
|
||||
#: wp-admin/about.php:105
|
||||
#: wp-admin/about.php:113
|
||||
msgid "Goodbye boring loading screen, hello smooth and simple plugin updates. Click <em>Update Now</em> and watch the magic happen."
|
||||
msgstr "Farvel til kjedelige innlastingsskjermer, hallo til strømlinjeformede og enkle utvidelsesoppdateringer. Klikk <em>Oppdater nå</em> og opplev magien."
|
||||
|
||||
#: wp-admin/about.php:104
|
||||
#: wp-admin/about.php:112
|
||||
msgid "Streamlined plugin updates"
|
||||
msgstr "Strømlinjeformede oppdateringer av utvidelser"
|
||||
|
||||
#: wp-admin/about.php:100
|
||||
#: wp-admin/about.php:108
|
||||
msgid "Paste links from Tumblr.com and Kickstarter and watch them magically appear right in the editor. With every release, your publishing and editing experience get closer together."
|
||||
msgstr "Lim inn lenker fra Tumblr.com og Kickstarter og se dem bygges inn automatisk rett i tekstbehandleren. Hver nye utgave av WordPress gjør publiserings- og redigerings­opplevelsen mer sømløs."
|
||||
|
||||
#: wp-admin/about.php:99
|
||||
#: wp-admin/about.php:107
|
||||
msgid "Even more embeds"
|
||||
msgstr "Enda flere innbygginger"
|
||||
|
||||
#: wp-admin/about.php:95
|
||||
#: wp-admin/about.php:103
|
||||
msgid "Browse and preview your installed themes from the Customizer. Make sure the theme looks great with <em>your</em> content, before it debuts on your site. "
|
||||
msgstr "Bla i og forhåndsvis dine installerte temaer fra tematilpasseren. Forsikre deg om at temaet ser bra ut med <em>ditt</em> innhold, før det får sin debut på ditt nettsted."
|
||||
|
||||
#: wp-admin/about.php:94
|
||||
#: wp-admin/about.php:102
|
||||
msgid "Switch themes in the Customizer"
|
||||
msgstr "Bytt temaer i tematilpasseren"
|
||||
|
||||
#: wp-admin/about.php:86
|
||||
#: wp-admin/about.php:94
|
||||
msgid "https://codex.wordpress.org/Emoji"
|
||||
msgstr "https://codex.wordpress.org/Emoji"
|
||||
|
||||
#. translators: 1: heart emoji, 2: frog face emoji, 3, monkey emoji, 4: pizza
|
||||
#. emoji, 5: Emoji Codex link
|
||||
#: wp-admin/about.php:86
|
||||
#: wp-admin/about.php:94
|
||||
msgid "Don’t use any of those characters? You can still have fun — emoji are now available in WordPress! Get creative and decorate your content with %1$s, %2$s, %3$s, %4$s, and all the many other <a href=\"%5$s\">emoji</a>."
|
||||
msgstr "Bruker du ikke noen av de tegnene? Du kan fortsatt ha det gøy: emoji er nå tilgjengelig i WordPress! Så slå deg løs og dekorér innholdet ditt med %1$s, %2$s, %3$s, %4$s, og alle de andre <a href=\"%5$s\">emojiene</a>. "
|
||||
|
||||
#: wp-admin/about.php:83
|
||||
#: wp-admin/about.php:91
|
||||
msgid "Writing in WordPress, whatever your language, just got better. WordPress 4.2 supports a host of new characters out-of-the-box, including native Chinese, Japanese, and Korean characters, musical and mathematical symbols, and hieroglyphs."
|
||||
msgstr "Å skrive i WordPress, uansett språk, har akkurat blitt bedre. WordPress støtter stadig flere språk. Nytt i 4.2 er kinesiske, japanske og koreanske tegn, i tillegg til musikalske og matematiske symboler, samt hieroglyfer. "
|
||||
|
||||
#: wp-admin/about.php:82
|
||||
#: wp-admin/about.php:90
|
||||
msgid "Extended character support"
|
||||
msgstr "Støtte for flere tegn og bokstaver"
|
||||
|
||||
#: wp-admin/about.php:68 wp-admin/tools.php:16 wp-admin/tools.php:40
|
||||
#: wp-admin/about.php:76 wp-admin/tools.php:16 wp-admin/tools.php:40
|
||||
#: wp-admin/tools.php:51
|
||||
msgid "Press This"
|
||||
msgstr "Skriv om dette"
|
||||
|
||||
#: wp-admin/about.php:65 wp-admin/tools.php:48
|
||||
#: wp-admin/about.php:73 wp-admin/tools.php:48
|
||||
msgid "Drag the bookmarklet below to your bookmarks bar. Then, when you’re on a page you want to share, simply “press” it."
|
||||
msgstr "Dra bokmerkeskriptet nedenfor til dine bokmerker. Da kan du enkelt skrive om en nettside som du har lyst å dele."
|
||||
|
||||
#: wp-admin/about.php:64
|
||||
#: wp-admin/about.php:72
|
||||
msgid "Clip it, edit it, publish it. Get familiar with the new and improved Press This. From the <a href=\"%s\">Tools</a> menu, add Press This to your browser bookmark bar or your mobile device home screen. Once installed you can share your content with lightning speed. Sharing your favorite videos, images, and content has never been this fast or this easy."
|
||||
msgstr "Klipp det, rediger det, publiser det. Bli kjent med den nye og forbedrede «Skriv om dette». I <a href=\"%s\">Verktøy</a>-menyen finner du «Skriv om dette»-appen, som du kan dra til din nettlesers bokmerkerad eller din mobile enhets hjem-skjerm. Etter at den er installert kan du dele ditt innhold lynraskt. Å dele dine favorittfilmer, -bilder og annet innhold har aldri være så raskt og enkelt."
|
||||
|
||||
#: wp-admin/about.php:63
|
||||
#: wp-admin/about.php:71
|
||||
msgid "An easier way to share content"
|
||||
msgstr "En enklere måte å dele innhold"
|
||||
|
||||
#. translators: 1: WordPress version number.
|
||||
#: wp-admin/about.php:49 wp-admin/about.php:163
|
||||
#: wp-admin/about.php:57 wp-admin/about.php:171
|
||||
msgid "<strong>Version %1$s</strong> addressed a security issue."
|
||||
msgid_plural "<strong>Version %1$s</strong> addressed some security issues."
|
||||
msgstr[0] "<strong>Versjon %1$s</strong> tettet et sikkerhetshull."
|
||||
msgstr[1] "<strong>Versjon %1$s</strong> tettet noen sikkerhetshull."
|
||||
|
||||
#: wp-admin/about.php:47 wp-admin/about.php:51 wp-admin/about.php:178
|
||||
#: wp-admin/about.php:47 wp-admin/about.php:51 wp-admin/about.php:55
|
||||
#: wp-admin/about.php:59 wp-admin/about.php:186
|
||||
msgid "For more information, see <a href=\"%s\">the release notes</a>."
|
||||
msgstr "For mer informasjon, se <a href=\"%s\">versjonsmerknadene</a>."
|
||||
|
||||
#. translators: 1: WordPress version number, 2: plural number of bugs. More
|
||||
#. than one security issue.
|
||||
#: wp-admin/about.php:45 wp-admin/about.php:175
|
||||
#: wp-admin/about.php:45 wp-admin/about.php:49 wp-admin/about.php:53
|
||||
#: wp-admin/about.php:183
|
||||
msgid "<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug."
|
||||
msgid_plural "<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs."
|
||||
msgstr[0] "<strong>Versjon %1$s</strong> tettet noen sikkerhetshull og rettet %2$s programfeil."
|
||||
msgstr[1] "<strong>Versjon %1$s</strong> tettet noen sikkerhetshull og rettet %2$s programfeil."
|
||||
|
||||
#: wp-admin/about.php:44 wp-admin/about.php:160
|
||||
#: wp-admin/about.php:44 wp-admin/about.php:168
|
||||
msgid "Maintenance and Security Release"
|
||||
msgid_plural "Maintenance and Security Releases"
|
||||
msgstr[0] "Vedlikeholds- og sikkerhetsoppdatering"
|
||||
|
||||
Binary file not shown.
@@ -7,7 +7,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: Network Admin\n"
|
||||
|
||||
#: wp-admin/network.php:545
|
||||
|
||||
Binary file not shown.
@@ -7,7 +7,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: Continents & Cities\n"
|
||||
|
||||
#: wp-admin/includes/continents-cities.php:493
|
||||
|
||||
Binary file not shown.
@@ -2,12 +2,12 @@
|
||||
# This file is distributed under the same license as the 4.2.x package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2015-07-07 10:32:20+0000\n"
|
||||
"PO-Revision-Date: 2015-08-02 17:06:22+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: 4.2.x\n"
|
||||
|
||||
#: wp-signup.php:716
|
||||
@@ -442,7 +442,7 @@ msgstr "Det ser ikke ut til at det finnes noen fil <code>wp-config.php</code>. D
|
||||
msgid "Links for %s"
|
||||
msgstr "Lenker for %s"
|
||||
|
||||
#: wp-includes/wp-db.php:2977
|
||||
#: wp-includes/wp-db.php:2979
|
||||
msgid "<strong>ERROR</strong>: WordPress %1$s requires MySQL %2$s or higher"
|
||||
msgstr "<strong>FEIL</strong>: WordPress %1$s krever MySQL %2$s eller høyere"
|
||||
|
||||
@@ -635,16 +635,16 @@ msgstr "(WordPress kunne ikke etablere en sikker forbindelse til WordPress.org.
|
||||
msgid "An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href=\"https://wordpress.org/support/\">support forums</a>."
|
||||
msgstr "En uventet feil skjedde. Noe er kanskje galt med WordPress.org eller denne serverkonfigurasjonen. Hvis problemene fortsetter, vennligst prøv <a href=\"https://wordpress.org/support/\">supportforumene</a>."
|
||||
|
||||
#: wp-includes/theme.php:1969
|
||||
#: wp-includes/theme.php:1948
|
||||
msgid "Customizer"
|
||||
msgstr "Tematilpasser"
|
||||
|
||||
#. translators: 1: Theme support 2: hook name
|
||||
#: wp-includes/theme.php:1635
|
||||
#: wp-includes/theme.php:1614
|
||||
msgid "Theme support for %1$s should be registered before the %2$s hook."
|
||||
msgstr "Temastøtte for %1$s bør registreres før %2$s."
|
||||
|
||||
#: wp-includes/theme.php:1504
|
||||
#: wp-includes/theme.php:1483
|
||||
msgid "You need to pass an array of types."
|
||||
msgstr "Du må bruke en array med typer."
|
||||
|
||||
@@ -767,7 +767,7 @@ msgstr "Dette innlegget er passordbeskyttet. Du må oppgi passord for å se komm
|
||||
|
||||
#: wp-includes/theme-compat/comments-popup.php:120
|
||||
msgid "Powered by <a href=\"%s\" title=\"Powered by WordPress, state-of-the-art semantic personal publishing platform\"><strong>WordPress</strong></a>"
|
||||
msgstr "Drives med <a href=\"%s\" title=\"Drives med WordPress, en toppmoderne emantisk publiseringsplattform\"><strong>WordPress</strong></a>"
|
||||
msgstr "Drives med <a href=\"%s\" title=\"Drives med WordPress, en toppmoderne semantisk publiseringsplattform\"><strong>WordPress</strong></a>"
|
||||
|
||||
#: wp-includes/theme-compat/comments-popup.php:116
|
||||
msgid "Sorry, no posts matched your criteria."
|
||||
@@ -1237,7 +1237,7 @@ msgstr "Vis flere kommentarer"
|
||||
#. translators: 1: month, 2: day, 3: year, 4: hour, 5: minute
|
||||
#: wp-includes/script-loader.php:460
|
||||
msgid "%1$s %2$s, %3$s @ %4$s : %5$s"
|
||||
msgstr "%1$s. %2$s, %3$s @ %4$s:%5$s"
|
||||
msgstr "%2$s. %1$s %3$s kl. %4$s:%5$s"
|
||||
|
||||
#: wp-includes/script-loader.php:458
|
||||
msgid "Published on:"
|
||||
@@ -1567,33 +1567,33 @@ msgstr "I <code>%1$s</code>, bruk metoden <code>%2$s</code>, ikke funksjonen <co
|
||||
msgid "Conditional query tags do not work before the query is run. Before then, they always return false."
|
||||
msgstr "Betingede spørringer fungerer ikke fungerer ikke før spørringen er utført. Før det skjer, returnerer de alltid \"false\"."
|
||||
|
||||
#: wp-includes/post.php:3891 wp-includes/script-loader.php:449
|
||||
#: wp-includes/post.php:3892 wp-includes/script-loader.php:449
|
||||
#: wp-includes/script-loader.php:510
|
||||
msgctxt "tag delimiter"
|
||||
msgid ","
|
||||
msgstr ","
|
||||
|
||||
#: wp-includes/post.php:3459
|
||||
#: wp-includes/post.php:3460
|
||||
msgid "The page template is invalid."
|
||||
msgstr "Sidemalen er ugyldig."
|
||||
|
||||
#: wp-includes/post.php:3395
|
||||
#: wp-includes/post.php:3396
|
||||
msgid "Could not insert post into the database"
|
||||
msgstr "Kunne ikke lagre innlegget i databasen"
|
||||
|
||||
#: wp-includes/post.php:3380
|
||||
#: wp-includes/post.php:3381
|
||||
msgid "Could not update post in the database"
|
||||
msgstr "Kunne ikke oppdatere innlegget i databasen"
|
||||
|
||||
#: wp-includes/post.php:3236
|
||||
#: wp-includes/post.php:3237
|
||||
msgid "Whoops, the provided date is invalid."
|
||||
msgstr "Beklager, den angitte datoen er ugyldig."
|
||||
|
||||
#: wp-includes/post.php:3168
|
||||
#: wp-includes/post.php:3169
|
||||
msgid "Content, title, and excerpt are empty."
|
||||
msgstr "Innhold, tittel og utdrag er tomme."
|
||||
|
||||
#: wp-includes/post.php:3011
|
||||
#: wp-includes/post.php:3012
|
||||
msgid "Passing an integer number of posts is deprecated. Pass an array of arguments instead."
|
||||
msgstr "Passing an integer number of posts is deprecated. Pass an array of arguments instead."
|
||||
|
||||
@@ -3633,12 +3633,12 @@ msgstr "Rediger dette"
|
||||
msgid "Comments Feed"
|
||||
msgstr "Kommentarstrøm"
|
||||
|
||||
#: wp-includes/l10n.php:940
|
||||
#: wp-includes/l10n.php:944
|
||||
msgctxt "translations"
|
||||
msgid "Available"
|
||||
msgstr "Tilgjengelig"
|
||||
|
||||
#: wp-includes/l10n.php:922
|
||||
#: wp-includes/l10n.php:926
|
||||
msgctxt "translations"
|
||||
msgid "Installed"
|
||||
msgstr "Installert"
|
||||
@@ -4128,33 +4128,33 @@ msgid "ERROR: This is not a valid feed template."
|
||||
msgstr "FEIL: Dette er ikke en gyldig feed-mal."
|
||||
|
||||
#. translators: used to join items in a list with only 2 items
|
||||
#: wp-includes/formatting.php:3798
|
||||
#: wp-includes/formatting.php:3830
|
||||
msgid "%s and %s"
|
||||
msgstr "%s og %s"
|
||||
|
||||
#. translators: used to join last two items in a list with more than 2 times
|
||||
#: wp-includes/formatting.php:3796
|
||||
#: wp-includes/formatting.php:3828
|
||||
msgid "%s, and %s"
|
||||
msgstr "%s og %s"
|
||||
|
||||
#. translators: used to join items in a list with more than 2 items
|
||||
#: wp-includes/formatting.php:3794
|
||||
#: wp-includes/formatting.php:3826
|
||||
msgid "%s, %s"
|
||||
msgstr "%s, %s"
|
||||
|
||||
#: wp-includes/formatting.php:3580
|
||||
#: wp-includes/formatting.php:3612
|
||||
msgid "The timezone you have entered is not valid. Please select a valid timezone."
|
||||
msgstr "Tidssonen du har skrevet inn er ikke gyldig. Vennligst velg en gyldig tidssone."
|
||||
|
||||
#: wp-includes/formatting.php:3525
|
||||
#: wp-includes/formatting.php:3557
|
||||
msgid "The Site address you entered did not appear to be a valid URL. Please enter a valid URL."
|
||||
msgstr "Nettstedsadressen du skrev inn virker ikke å være en gyldig URL. Vennligst skriv inn en gyldig URL."
|
||||
|
||||
#: wp-includes/formatting.php:3512
|
||||
#: wp-includes/formatting.php:3544
|
||||
msgid "The WordPress address you entered did not appear to be a valid URL. Please enter a valid URL."
|
||||
msgstr "WordPress-adressen som du skrev inn virker ikke å være en gyldig URL. Vennligst skriv inn en gyldig URL."
|
||||
|
||||
#: wp-includes/formatting.php:3412
|
||||
#: wp-includes/formatting.php:3444
|
||||
msgid "The email address entered did not appear to be a valid email address. Please enter a valid email address."
|
||||
msgstr "E-postadressen som du skrev inn virker ikke å være en gyldig adresse. Vennligst skriv inn en gyldig e-postadresse."
|
||||
|
||||
@@ -4164,47 +4164,47 @@ msgstr "E-postadressen som du skrev inn virker ikke å være en gyldig adresse.
|
||||
#. translators: If your word count is based on single characters (East Asian
|
||||
#. characters), enter 'characters'. Otherwise, enter 'words'. Do not
|
||||
#. translate into your own language.
|
||||
#: wp-includes/formatting.php:2738 wp-includes/script-loader.php:379
|
||||
#: wp-includes/formatting.php:2770 wp-includes/script-loader.php:379
|
||||
msgctxt "word count: words or characters?"
|
||||
msgid "words"
|
||||
msgstr "words"
|
||||
|
||||
#: wp-includes/formatting.php:2733 wp-includes/general-template.php:2721
|
||||
#: wp-includes/formatting.php:2765 wp-includes/general-template.php:2721
|
||||
msgid "…"
|
||||
msgstr "…"
|
||||
|
||||
#: wp-includes/formatting.php:2646
|
||||
#: wp-includes/formatting.php:2678
|
||||
msgid "%s year"
|
||||
msgid_plural "%s years"
|
||||
msgstr[0] "%s år"
|
||||
msgstr[1] "%s år"
|
||||
|
||||
#: wp-includes/formatting.php:2641
|
||||
#: wp-includes/formatting.php:2673
|
||||
msgid "%s month"
|
||||
msgid_plural "%s months"
|
||||
msgstr[0] "%s måned"
|
||||
msgstr[1] "%s måneder"
|
||||
|
||||
#: wp-includes/formatting.php:2636
|
||||
#: wp-includes/formatting.php:2668
|
||||
msgid "%s week"
|
||||
msgid_plural "%s weeks"
|
||||
msgstr[0] "%s uke"
|
||||
msgstr[1] "%s uker"
|
||||
|
||||
#: wp-includes/formatting.php:2631
|
||||
#: wp-includes/formatting.php:2663
|
||||
msgid "%s day"
|
||||
msgid_plural "%s days"
|
||||
msgstr[0] "%s dag"
|
||||
msgstr[1] "%s dager"
|
||||
|
||||
#: wp-includes/formatting.php:2626
|
||||
#: wp-includes/formatting.php:2658
|
||||
msgid "%s hour"
|
||||
msgid_plural "%s hours"
|
||||
msgstr[0] "%s time"
|
||||
msgstr[1] "%s timer"
|
||||
|
||||
#. translators: min=minute
|
||||
#: wp-includes/formatting.php:2621
|
||||
#: wp-includes/formatting.php:2653
|
||||
msgid "%s min"
|
||||
msgid_plural "%s mins"
|
||||
msgstr[0] "%s minutt"
|
||||
@@ -4259,7 +4259,7 @@ msgid "”"
|
||||
msgstr "»"
|
||||
|
||||
#. translators: opening curly double quote
|
||||
#: wp-includes/formatting.php:62 wp-includes/formatting.php:4035
|
||||
#: wp-includes/formatting.php:62 wp-includes/formatting.php:4067
|
||||
msgctxt "opening curly double quote"
|
||||
msgid "“"
|
||||
msgstr "«"
|
||||
@@ -5354,8 +5354,8 @@ msgstr "Beklager, du har ikke tillatelse til å redigere dette innlegget."
|
||||
#: wp-includes/class-wp-xmlrpc-server.php:4986
|
||||
#: wp-includes/class-wp-xmlrpc-server.php:5476
|
||||
#: wp-includes/class-wp-xmlrpc-server.php:5524
|
||||
#: wp-includes/class-wp-xmlrpc-server.php:5648 wp-includes/post.php:3124
|
||||
#: wp-includes/post.php:3582
|
||||
#: wp-includes/class-wp-xmlrpc-server.php:5648 wp-includes/post.php:3125
|
||||
#: wp-includes/post.php:3583
|
||||
msgid "Invalid post ID."
|
||||
msgstr "Ugyldig innlegg-ID."
|
||||
|
||||
@@ -5747,7 +5747,7 @@ msgstr "Din nettleser støtter ikke direktetilgang til din utklippstavle. Vennli
|
||||
|
||||
#: wp-includes/class-wp-editor.php:974 wp-includes/script-loader.php:395
|
||||
#: wp-includes/script-loader.php:474 wp-includes/script-loader.php:482
|
||||
#: wp-includes/script-loader.php:586 wp-includes/theme.php:1968
|
||||
#: wp-includes/script-loader.php:586 wp-includes/theme.php:1947
|
||||
msgid "The changes you made will be lost if you navigate away from this page."
|
||||
msgstr "Endringene du gjorde vil bli borte hvis du navigerer bort fra denne siden."
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,14 +1,18 @@
|
||||
# Translation of Development in Norwegian (Bokmål)
|
||||
# This file is distributed under the same license as the Development package.
|
||||
# Translation of Development (trunk) in Norwegian (Bokmål)
|
||||
# This file is distributed under the same license as the Development (trunk) package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2015-05-10 18:23:31+0000\n"
|
||||
"PO-Revision-Date: 2015-08-03 21:34:23+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"Project-Id-Version: Development\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: Development (trunk)\n"
|
||||
|
||||
#: views/notice.php:94
|
||||
msgid "Your API key is no longer valid. Please enter a new key or contact support@akismet.com."
|
||||
msgstr "API-nøkkelen din er ikke lenger gyldig. Vennligst oppgi en ny nøkkel, eller kontakt support@akismet.com."
|
||||
|
||||
#: views/notice.php:81 views/notice.php:108 views/notice.php:115
|
||||
msgid "Please <a href=\"%s\" target=\"_blank\">contact our support team</a> with any questions."
|
||||
@@ -446,7 +450,7 @@ msgstr "Akismet godkjente denne kommentaren ved en ny automatisk kontroll."
|
||||
msgid "View comment history"
|
||||
msgstr "Se kommentarhistorikk"
|
||||
|
||||
#. #-#-#-#-# akismet.pot (Akismet 3.1.4a1) #-#-#-#-#
|
||||
#. #-#-#-#-# tmp-akismet.pot (Akismet 3.1.4a1) #-#-#-#-#
|
||||
#. Plugin Name of the plugin/theme
|
||||
#: class.akismet-admin.php:76 class.akismet-admin.php:78
|
||||
#: class.akismet-admin.php:842 views/config.php:3
|
||||
|
||||
Binary file not shown.
@@ -2,72 +2,66 @@
|
||||
# This file is distributed under the same license as the Twenty Fifteen package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2015-07-07 10:34:42+0000\n"
|
||||
"PO-Revision-Date: 2015-07-27 22:21:26+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: Twenty Fifteen\n"
|
||||
|
||||
#. translators: %s: post title
|
||||
#: inc/template-tags.php:123
|
||||
msgid "Leave a comment<span class=\"screen-reader-text\"> on %s</span>"
|
||||
msgstr "Legg igjen en kommentar<span class=\"screen-reader-text\"> til %s</span>"
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
|
||||
#. Theme URI of the plugin/theme
|
||||
msgid "https://wordpress.org/themes/twentyfifteen/"
|
||||
msgstr "https://wordpress.org/themes/twentyfifteen/"
|
||||
|
||||
#. Description of the plugin/theme
|
||||
msgid "Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer."
|
||||
msgstr "Vårt standardtema for 2015 er stilrent, bloggfokusert og designet for tydelighet. Twenty Fifteens enkle, ukompliserte typografi er lesbar på en lang rekke skjermstørrelser og tilpasset flere språk. Vi designet det med en mobil-først-tilnærming, som betyr at innholdet ditt får hovedfokus, uansett om dine besøkende kommer via smarttelefon, nettbrett, bærbar eller stasjonær datamaskin."
|
||||
|
||||
#. Theme Name of the plugin/theme
|
||||
msgid "Twenty Fifteen"
|
||||
msgstr "Twenty Fifteen"
|
||||
|
||||
#: single.php:37
|
||||
msgid "Previous post:"
|
||||
msgstr "Forrige innlegg:"
|
||||
|
||||
#: single.php:34
|
||||
msgid "Next post:"
|
||||
msgstr "Neste innlegg:"
|
||||
|
||||
#: inc/customizer.php:47 inc/customizer.php:63 inc/customizer.php:68
|
||||
msgid "Applied to the header on small screens and the sidebar on wide screens."
|
||||
msgstr "Benyttes i sidetoppen på små skjermer og i sidekolonnen på brede skjermer."
|
||||
|
||||
#: single.php:36
|
||||
msgid "Previous"
|
||||
msgstr "Forrige"
|
||||
|
||||
#: single.php:34
|
||||
msgid "Next post:"
|
||||
msgstr "Neste innlegg:"
|
||||
|
||||
#: single.php:33
|
||||
msgid "Next"
|
||||
msgstr "Neste"
|
||||
|
||||
#: image.php:84
|
||||
msgctxt "Parent post link"
|
||||
msgid "<span class=\"meta-nav\">Published in</span><span class=\"post-title\">%title</span>"
|
||||
msgstr "<span class=\"meta-nav\">Hører til</span><span class=\"post-title\">%title</span>"
|
||||
|
||||
#: inc/template-tags.php:91 inc/template-tags.php:99
|
||||
msgctxt "Used between list items, there is a space after the comma."
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: image.php:24
|
||||
msgid "Previous Image"
|
||||
msgstr "Forrige bilde"
|
||||
|
||||
#: image.php:24
|
||||
msgid "Next Image"
|
||||
msgstr "Neste bilde"
|
||||
|
||||
#: inc/template-tags.php:23
|
||||
msgid "Comment navigation"
|
||||
msgstr "Kommentarnavigasjon"
|
||||
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Søkeresultater for: %s"
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
#: inc/template-tags.php:122
|
||||
msgid "% Comments"
|
||||
msgstr "% kommentarer"
|
||||
|
||||
#: inc/template-tags.php:122
|
||||
msgid "1 Comment"
|
||||
msgstr "1 kommentar"
|
||||
|
||||
#: inc/template-tags.php:122
|
||||
msgid "Leave a comment"
|
||||
msgstr "Legg igjen en kommentar"
|
||||
|
||||
#: inc/template-tags.php:113
|
||||
msgctxt "Used before full size attachment link."
|
||||
msgid "Full size"
|
||||
msgstr "Full størrelse"
|
||||
|
||||
#: inc/template-tags.php:102
|
||||
msgctxt "Used before tag names."
|
||||
@@ -79,21 +73,41 @@ msgctxt "Used before category names."
|
||||
msgid "Categories"
|
||||
msgstr "Kategorier"
|
||||
|
||||
#. Theme Name of the plugin/theme
|
||||
msgid "Twenty Fifteen"
|
||||
msgstr "Twenty Fifteen"
|
||||
#: inc/template-tags.php:91 inc/template-tags.php:99
|
||||
msgctxt "Used between list items, there is a space after the comma."
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: inc/template-tags.php:26
|
||||
msgid "Older Comments"
|
||||
msgstr "Eldre kommentarer"
|
||||
#: inc/template-tags.php:85
|
||||
msgctxt "Used before post author name."
|
||||
msgid "Author"
|
||||
msgstr "Forfatter"
|
||||
|
||||
#: inc/template-tags.php:55
|
||||
msgctxt "Used before post format."
|
||||
msgid "Format"
|
||||
msgstr "Format"
|
||||
|
||||
#: inc/template-tags.php:76
|
||||
msgctxt "Used before publish date."
|
||||
msgid "Posted on"
|
||||
msgstr "Publisert"
|
||||
|
||||
#: inc/template-tags.php:49
|
||||
msgid "Featured"
|
||||
msgstr "Fremhevet"
|
||||
|
||||
#: inc/template-tags.php:30
|
||||
msgid "Newer Comments"
|
||||
msgstr "Nyere kommentarer"
|
||||
|
||||
#: inc/template-tags.php:49
|
||||
msgid "Featured"
|
||||
msgstr "Fremhevet"
|
||||
#: inc/template-tags.php:26
|
||||
msgid "Older Comments"
|
||||
msgstr "Eldre kommentarer"
|
||||
|
||||
#: inc/template-tags.php:23
|
||||
msgid "Comment navigation"
|
||||
msgstr "Kommentarnavigasjon"
|
||||
|
||||
#: inc/customizer.php:147
|
||||
msgid "Blue"
|
||||
@@ -107,133 +121,66 @@ msgstr "Lilla"
|
||||
msgid "Pink"
|
||||
msgstr "Rosa"
|
||||
|
||||
#: inc/back-compat.php:37 inc/back-compat.php:47 inc/back-compat.php:60
|
||||
msgid "Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again."
|
||||
msgstr "Twenty Fifteen krever minst WordPress versjon 4.1. Du kjører versjon %s. Vennligst oppgrader og forsøk igjen."
|
||||
|
||||
#: header.php:43
|
||||
msgid "Menu and widgets"
|
||||
msgstr "Meny og widgeter"
|
||||
|
||||
#: inc/template-tags.php:113
|
||||
msgctxt "Used before full size attachment link."
|
||||
msgid "Full size"
|
||||
msgstr "Full størrelse"
|
||||
#: inc/customizer.php:114
|
||||
msgid "Yellow"
|
||||
msgstr "Gul"
|
||||
|
||||
#: inc/customizer.php:103
|
||||
msgid "Dark"
|
||||
msgstr "Mørk"
|
||||
|
||||
#: inc/customizer.php:114
|
||||
msgid "Yellow"
|
||||
msgstr "Gul"
|
||||
|
||||
#: inc/customizer.php:92
|
||||
msgid "Default"
|
||||
msgstr "Standard"
|
||||
|
||||
#: inc/template-tags.php:76
|
||||
msgctxt "Used before publish date."
|
||||
msgid "Posted on"
|
||||
msgstr "Publisert"
|
||||
|
||||
#: inc/customizer.php:31
|
||||
msgid "Base Color Scheme"
|
||||
msgstr "Grunnpalett"
|
||||
|
||||
#: inc/template-tags.php:55
|
||||
msgctxt "Used before post format."
|
||||
msgid "Format"
|
||||
msgstr "Format"
|
||||
|
||||
#: inc/template-tags.php:85
|
||||
msgctxt "Used before post author name."
|
||||
msgid "Author"
|
||||
msgstr "Forfatter"
|
||||
|
||||
#: inc/customizer.php:46
|
||||
msgid "Header and Sidebar Text Color"
|
||||
msgstr "Tekstfarge i sidetopp og sidekolonne"
|
||||
|
||||
#: inc/customizer.php:62
|
||||
msgid "Header and Sidebar Background Color"
|
||||
msgstr "Bakgrunnsfarge i sidetopp og sidekolonne"
|
||||
|
||||
#. Description of the plugin/theme
|
||||
msgid "Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer."
|
||||
msgstr "Vårt standardtema for 2015 er stilrent, bloggfokusert og designet for tydelighet. Twenty Fifteens enkle, ukompliserte typografi er lesbar på en lang rekke skjermstørrelser og tilpasset flere språk. Vi designet det med en mobil-først-tilnærming, som betyr at innholdet ditt får hovedfokus, uansett om dine besøkende kommer via smarttelefon, nettbrett, bærbar eller stasjonær datamaskin."
|
||||
#: inc/customizer.php:47 inc/customizer.php:63 inc/customizer.php:68
|
||||
msgid "Applied to the header on small screens and the sidebar on wide screens."
|
||||
msgstr "Benyttes i sidetoppen på små skjermer og i sidekolonnen på brede skjermer."
|
||||
|
||||
#: content-none.php:22
|
||||
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||
msgstr "Klar for å skrive ditt første innlegg? <a href=\"%1$s\">Kom i gang her</a>."
|
||||
#: inc/customizer.php:31
|
||||
msgid "Base Color Scheme"
|
||||
msgstr "Grunnpalett"
|
||||
|
||||
#: comments.php:53
|
||||
msgid "Comments are closed."
|
||||
msgstr "Det er stengt for kommentarer."
|
||||
#: inc/customizer.php:46
|
||||
msgid "Header and Sidebar Text Color"
|
||||
msgstr "Tekstfarge i sidetopp og sidekolonne"
|
||||
|
||||
#: content-link.php:36 content-page.php:25 content.php:38 image.php:59
|
||||
msgid "Pages:"
|
||||
msgstr "Sider:"
|
||||
#: inc/back-compat.php:37 inc/back-compat.php:47 inc/back-compat.php:60
|
||||
msgid "Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again."
|
||||
msgstr "Twenty Fifteen krever minst WordPress versjon 4.1. Du kjører versjon %s. Vennligst oppgrader og forsøk igjen."
|
||||
|
||||
#: content-link.php:56 content-page.php:35 content-search.php:28
|
||||
#: content-search.php:33 content.php:57 image.php:71
|
||||
msgid "Edit"
|
||||
msgstr "Rediger"
|
||||
#: image.php:84
|
||||
msgctxt "Parent post link"
|
||||
msgid "<span class=\"meta-nav\">Published in</span><span class=\"post-title\">%title</span>"
|
||||
msgstr "<span class=\"meta-nav\">Hører til</span><span class=\"post-title\">%title</span>"
|
||||
|
||||
#: footer.php:25
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolt drevet av %s"
|
||||
#: image.php:24
|
||||
msgid "Next Image"
|
||||
msgstr "Neste bilde"
|
||||
|
||||
#: functions.php:85
|
||||
msgid "Primary Menu"
|
||||
msgstr "Primærmeny"
|
||||
#: header.php:43
|
||||
msgid "Menu and widgets"
|
||||
msgstr "Meny og widgeter"
|
||||
|
||||
#: image.php:24
|
||||
msgid "Previous Image"
|
||||
msgstr "Forrige bilde"
|
||||
|
||||
#: header.php:26
|
||||
msgid "Skip to content"
|
||||
msgstr "Gå til innhold"
|
||||
|
||||
#: content-none.php:15
|
||||
msgid "Nothing Found"
|
||||
msgstr "Ingenting funnet"
|
||||
|
||||
#: content-none.php:26
|
||||
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
|
||||
msgstr "Beklager, men det ble ikke funnet noe som passet det du søkte etter. Vennligst prøv med noen andre søkeord."
|
||||
|
||||
#: content-none.php:31
|
||||
msgid "It seems we can’t find what you’re looking for. Perhaps searching can help."
|
||||
msgstr "Vi klarer ikke å finne det du leter etter. Prøv å søke."
|
||||
|
||||
#: functions.php:133
|
||||
msgid "Widget Area"
|
||||
msgstr "Widgetområde"
|
||||
|
||||
#. #-#-#-#-# twentyfifteen.pot (Twenty Fifteen 1.2) #-#-#-#-#
|
||||
#. Author URI of the plugin/theme
|
||||
#: footer.php:25
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://wordpress.org/"
|
||||
|
||||
#. translators: %s: Name of current post
|
||||
#: content-link.php:31 content.php:33 inc/template-tags.php:238
|
||||
msgid "Continue reading %s"
|
||||
msgstr "Fortsett å lese %s"
|
||||
|
||||
#: functions.php:255
|
||||
msgid "expand child menu"
|
||||
msgstr "Utvid undermeny"
|
||||
|
||||
#: functions.php:256
|
||||
msgid "collapse child menu"
|
||||
msgstr "Slå sammen undermeny"
|
||||
|
||||
#. Translators: If there are characters in your language that are not supported
|
||||
#. by Inconsolata, translate this to 'off'. Do not translate into your own
|
||||
#. language.
|
||||
#: functions.php:177
|
||||
msgctxt "Inconsolata font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
#: functions.php:255
|
||||
msgid "expand child menu"
|
||||
msgstr "Utvid undermeny"
|
||||
|
||||
#. Translators: To add an additional character subset specific to your
|
||||
#. language, translate this to 'greek', 'cyrillic', 'devanagari' or
|
||||
@@ -244,10 +191,10 @@ msgid "no-subset"
|
||||
msgstr "no-subset"
|
||||
|
||||
#. Translators: If there are characters in your language that are not supported
|
||||
#. by Noto Sans, translate this to 'off'. Do not translate into your own
|
||||
#. by Inconsolata, translate this to 'off'. Do not translate into your own
|
||||
#. language.
|
||||
#: functions.php:161
|
||||
msgctxt "Noto Sans font: on or off"
|
||||
#: functions.php:177
|
||||
msgctxt "Inconsolata font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
@@ -259,6 +206,74 @@ msgctxt "Noto Serif font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#. Translators: If there are characters in your language that are not supported
|
||||
#. by Noto Sans, translate this to 'off'. Do not translate into your own
|
||||
#. language.
|
||||
#: functions.php:161
|
||||
msgctxt "Noto Sans font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#: functions.php:135
|
||||
msgid "Add widgets here to appear in your sidebar."
|
||||
msgstr "Widgeter som legges til her vises i din sidekolonne."
|
||||
|
||||
#: functions.php:133
|
||||
msgid "Widget Area"
|
||||
msgstr "Widgetområde"
|
||||
|
||||
#: functions.php:86
|
||||
msgid "Social Links Menu"
|
||||
msgstr "Sosiale medier-meny"
|
||||
|
||||
#: functions.php:85
|
||||
msgid "Primary Menu"
|
||||
msgstr "Primærmeny"
|
||||
|
||||
#: footer.php:25
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Drevet av %s"
|
||||
|
||||
#. #-#-#-#-# twentyfifteen.pot (Twenty Fifteen 1.2) #-#-#-#-#
|
||||
#. Author URI of the plugin/theme
|
||||
#: footer.php:25
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://wordpress.org/"
|
||||
|
||||
#: content-none.php:31
|
||||
msgid "It seems we can’t find what you’re looking for. Perhaps searching can help."
|
||||
msgstr "Vi klarer ikke å finne det du leter etter. Prøv å søke."
|
||||
|
||||
#: content-none.php:26
|
||||
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
|
||||
msgstr "Beklager, men det ble ikke funnet noe som passet det du søkte etter. Vennligst prøv med noen andre søkeord."
|
||||
|
||||
#: content-none.php:22
|
||||
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||
msgstr "Klar for å skrive ditt første innlegg? <a href=\"%1$s\">Kom i gang her</a>."
|
||||
|
||||
#: content-none.php:15
|
||||
msgid "Nothing Found"
|
||||
msgstr "Ingenting funnet"
|
||||
|
||||
#: content-link.php:56 content-page.php:35 content-search.php:28
|
||||
#: content-search.php:33 content.php:57 image.php:71
|
||||
msgid "Edit"
|
||||
msgstr "Rediger"
|
||||
|
||||
#: content-link.php:36 content-page.php:25 content.php:38 image.php:59
|
||||
msgid "Pages:"
|
||||
msgstr "Sider:"
|
||||
|
||||
#. translators: %s: Name of current post
|
||||
#: content-link.php:31 content.php:33 inc/template-tags.php:237
|
||||
msgid "Continue reading %s"
|
||||
msgstr "Fortsett å lese %s"
|
||||
|
||||
#: comments.php:53
|
||||
msgid "Comments are closed."
|
||||
msgstr "Det er stengt for kommentarer."
|
||||
|
||||
#: comments.php:28
|
||||
msgctxt "comments title"
|
||||
msgid "One thought on “%2$s”"
|
||||
@@ -266,26 +281,14 @@ msgid_plural "%1$s thoughts on “%2$s”"
|
||||
msgstr[0] "Én kommentar til «%2$s»"
|
||||
msgstr[1] "%1$s kommentarer til «%2$s»"
|
||||
|
||||
#: functions.php:86
|
||||
msgid "Social Links Menu"
|
||||
msgstr "Sosiale medier-meny"
|
||||
|
||||
#: functions.php:135
|
||||
msgid "Add widgets here to appear in your sidebar."
|
||||
msgstr "Widgeter som legges til her vises i din sidekolonne."
|
||||
#: author-bio.php:34
|
||||
msgid "View all posts by %s"
|
||||
msgstr "Vis alle innlegg av %s"
|
||||
|
||||
#: author-bio.php:12
|
||||
msgid "Published by"
|
||||
msgstr "Skrevet av"
|
||||
|
||||
#: 404.php:21
|
||||
msgid "It looks like nothing was found at this location. Maybe try a search?"
|
||||
msgstr "Det ser ikke ut til at noe ble funnet på denne adressen. Kanskje du kan prøve et søk?"
|
||||
|
||||
#: author-bio.php:34
|
||||
msgid "View all posts by %s"
|
||||
msgstr "Vis alle innlegg av %s"
|
||||
|
||||
#: archive.php:51 content-link.php:40 content-page.php:29 content.php:42
|
||||
#: image.php:63 index.php:48 search.php:40
|
||||
msgid "Page"
|
||||
@@ -299,6 +302,10 @@ msgstr "Neste side"
|
||||
msgid "Previous page"
|
||||
msgstr "Forrige side"
|
||||
|
||||
#: 404.php:21
|
||||
msgid "It looks like nothing was found at this location. Maybe try a search?"
|
||||
msgstr "Det ser ikke ut til at noe ble funnet på denne adressen. Kanskje du kan prøve et søk?"
|
||||
|
||||
#: 404.php:17
|
||||
msgid "Oops! That page can’t be found."
|
||||
msgstr "Oida! Den siden finnes ikke."
|
||||
Binary file not shown.
@@ -2,14 +2,18 @@
|
||||
# This file is distributed under the same license as the Twenty Fourteen package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2015-06-28 13:54:56+0000\n"
|
||||
"PO-Revision-Date: 2015-07-27 22:21:24+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: Twenty Fourteen\n"
|
||||
|
||||
#. Author URI of the plugin/theme
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://wordpress.org/"
|
||||
|
||||
#. Template Name of the plugin/theme
|
||||
msgid "Full Width Page"
|
||||
msgstr "Side i full bredde"
|
||||
@@ -27,8 +31,8 @@ msgid "In 2014, our default theme lets you create a responsive magazine website
|
||||
msgstr "I 2014 gjør vårt standardtema deg i stand til å lage et responsivt magasinnettsted med et moderne design. Fremhev ditt favorittinnhold i et rutenett eller en slider. Bruk de tre widgetområdene for å tilpasse nettstedet og endre layouten med fullbreddeformat og bidragsytersider for å fremheve dine ulike forfattere. Å lage et magasinnettsted med WordPress har aldri vært enklere."
|
||||
|
||||
#. Theme URI of the plugin/theme
|
||||
msgid "http://wordpress.org/themes/twentyfourteen"
|
||||
msgstr "http://wordpress.org/themes/twentyfourteen"
|
||||
msgid "https://wordpress.org/themes/twentyfourteen/"
|
||||
msgstr "https://wordpress.org/themes/twentyfourteen/"
|
||||
|
||||
#: tag.php:22
|
||||
msgid "Tag Archives: %s"
|
||||
@@ -181,7 +185,7 @@ msgstr "Forbedre utseendet ved å bruke <a href=\"%s\">fremhevede bilder</a> for
|
||||
msgid "The home page features your choice of up to 6 posts prominently displayed in a grid or slider, controlled by a <a href=\"%1$s\">tag</a>; you can change the tag and layout in <a href=\"%2$s\">Appearance → Customize</a>. If no posts match the tag, <a href=\"%3$s\">sticky posts</a> will be displayed instead."
|
||||
msgstr "Forsiden viser fremhevet innhold – opp til seks innlegg som vises i et rutenett eller i en slider, kontrollert av et <a href=\"%1$s\">stikkord</a>. Du kan endre stikkordet og layouten i <a href=\"%2$s\">Utseende → Tilpass</a>. Hvis ingen innlegg har dette stikkordet, vises <a href=\"%3$s\">klebrige innlegg</a> isteden."
|
||||
|
||||
#. #-#-#-#-# twentyfourteen.pot (Twenty Fourteen 1.3) #-#-#-#-#
|
||||
#. #-#-#-#-# twentyfourteen.pot (Twenty Fourteen 1.4) #-#-#-#-#
|
||||
#. Theme Name of the plugin/theme
|
||||
#: inc/customizer.php:105
|
||||
msgid "Twenty Fourteen"
|
||||
@@ -314,8 +318,6 @@ msgstr "Øverste primærmeny"
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolt drevet av %s"
|
||||
|
||||
#. #-#-#-#-# twentyfourteen.pot (Twenty Fourteen 1.3) #-#-#-#-#
|
||||
#. Author URI of the plugin/theme
|
||||
#: footer.php:21
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr "http://nb.wordpress.org/"
|
||||
@@ -345,7 +347,7 @@ msgstr "Sider:"
|
||||
#. translators: %s: Name of current post
|
||||
#: content-aside.php:48 content-audio.php:48 content-gallery.php:48
|
||||
#: content-image.php:48 content-link.php:48 content-quote.php:48
|
||||
#: content-video.php:48 content.php:56 inc/template-tags.php:219
|
||||
#: content-video.php:48 content.php:56 inc/template-tags.php:222
|
||||
msgid "Continue reading %s <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Fortsett å lese %s <span class=\"meta-nav\">→</span>"
|
||||
|
||||
|
||||
Binary file not shown.
@@ -2,14 +2,18 @@
|
||||
# This file is distributed under the same license as the Twenty Thirteen package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2015-06-28 13:54:54+0000\n"
|
||||
"PO-Revision-Date: 2015-07-27 22:21:23+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: Twenty Thirteen\n"
|
||||
|
||||
#. Author URI of the plugin/theme
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://wordpress.org/"
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
@@ -19,8 +23,8 @@ msgid "The 2013 theme for WordPress takes us back to the blog, featuring a full
|
||||
msgstr "2013-temaet for WordPress tar oss tilbake til bloggen, med alle mulige innleggsformater, og hvert eneste format vises på sin unike måte. Twenty Thirteen har drøssevis av designdetaljer, som fargeskjema og matchende toppbilder, flott typografi, ikoner og et fleksibelt oppsett som ser fantastisk ut på både data, nettbrett og mobil."
|
||||
|
||||
#. Theme URI of the plugin/theme
|
||||
msgid "http://wordpress.org/themes/twentythirteen"
|
||||
msgstr "http://wordpress.org/themes/twentythirteen"
|
||||
msgid "https://wordpress.org/themes/twentythirteen/"
|
||||
msgstr "https://wordpress.org/themes/twentythirteen/"
|
||||
|
||||
#. Theme Name of the plugin/theme
|
||||
msgid "Twenty Thirteen"
|
||||
@@ -180,8 +184,6 @@ msgstr "Stolt drevet av %s"
|
||||
msgid "Semantic Personal Publishing Platform"
|
||||
msgstr "Semantisk, personlig publiseringsplattform"
|
||||
|
||||
#. #-#-#-#-# twentythirteen.pot (Twenty Thirteen 1.4) #-#-#-#-#
|
||||
#. Author URI of the plugin/theme
|
||||
#: footer.php:19
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr "http://wordpress.org/"
|
||||
|
||||
Binary file not shown.
@@ -2,45 +2,17 @@
|
||||
# This file is distributed under the same license as the Twenty Twelve package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2015-03-26 15:59:36+0000\n"
|
||||
"PO-Revision-Date: 2015-07-27 22:21:31+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: Twenty Twelve\n"
|
||||
|
||||
#: tag.php:21
|
||||
msgid "Tag Archives: %s"
|
||||
msgstr "Stikkordarkiv: %s"
|
||||
|
||||
#. Theme Name of the plugin/theme
|
||||
msgid "Twenty Twelve"
|
||||
msgstr "Twenty Twelve"
|
||||
|
||||
#: image.php:42
|
||||
msgid "Next →"
|
||||
msgstr "Neste →"
|
||||
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Søkeresultater for: %s"
|
||||
|
||||
#: search.php:38
|
||||
msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords."
|
||||
msgstr "Det var ingen treff på dine søkekriterier. Søk på nytt med noen andre nøkkelord."
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
|
||||
#: index.php:42
|
||||
msgid "Ready to publish your first post? <a href=\"%s\">Get started here</a>."
|
||||
msgstr "Klar for å publisere ditt første innlegg? <a href=\"%s\">Start her</a>."
|
||||
|
||||
#: index.php:38
|
||||
msgid "No posts to display"
|
||||
msgstr "Ingen innlegg å vise"
|
||||
#. Author URI of the plugin/theme
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://wordpress.org/"
|
||||
|
||||
#. Template Name of the plugin/theme
|
||||
msgid "Full-width Page Template, No Sidebar"
|
||||
@@ -50,180 +22,63 @@ msgstr "Sidemal med full bredde, uten sidekolonne"
|
||||
msgid "Front Page Template"
|
||||
msgstr "Forsidemal"
|
||||
|
||||
#: single.php:21
|
||||
msgctxt "Previous post link"
|
||||
msgid "←"
|
||||
msgstr "←"
|
||||
|
||||
#: single.php:22
|
||||
msgctxt "Next post link"
|
||||
msgid "→"
|
||||
msgstr "→"
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
|
||||
#. Description of the plugin/theme
|
||||
msgid "The 2012 theme for WordPress is a fully responsive theme that looks great on any device. Features include a front page template with its own widgets, an optional display font, styling for post formats on both index and single views, and an optional no-sidebar page template. Make it yours with a custom menu, header image, and background."
|
||||
msgstr "2012-temaet for WordPress er et helresponsivt tema som ser bra ut både på såvel mobil som datamaskin. Funksjoner inkluderer forsidemal med egne widgeter, en valgfri visningsfont, stiler for innleggsformater, både i arkivvisning og enkeltvisning, og en valgfri sidemal uten sidekolonne. Gjør temaet til ditt eget med en egendefinert meny, toppbilde og bakgrunn."
|
||||
|
||||
#. Theme URI of the plugin/theme
|
||||
msgid "http://wordpress.org/themes/twentytwelve"
|
||||
msgstr "http://wordpress.org/themes/twentytwelve"
|
||||
msgid "https://wordpress.org/themes/twentytwelve/"
|
||||
msgstr "https://wordpress.org/themes/twentytwelve/"
|
||||
|
||||
#: content.php:66
|
||||
msgid "View all posts by %s <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Les alle innlegg av %s <span class=\"meta-nav\">→</span>"
|
||||
#. Theme Name of the plugin/theme
|
||||
msgid "Twenty Twelve"
|
||||
msgstr "Twenty Twelve"
|
||||
|
||||
#: functions.php:242
|
||||
msgid "Main Sidebar"
|
||||
msgstr "Primær sidekolonne"
|
||||
#: tag.php:21
|
||||
msgid "Tag Archives: %s"
|
||||
msgstr "Stikkordarkiv: %s"
|
||||
|
||||
#: functions.php:64
|
||||
msgid "Primary Menu"
|
||||
msgstr "Primærmeny"
|
||||
#: single.php:22
|
||||
msgctxt "Next post link"
|
||||
msgid "→"
|
||||
msgstr "→"
|
||||
|
||||
#: functions.php:286 single.php:20
|
||||
msgid "Post navigation"
|
||||
msgstr "Innleggsnavigasjon"
|
||||
#: single.php:21
|
||||
msgctxt "Previous post link"
|
||||
msgid "←"
|
||||
msgstr "←"
|
||||
|
||||
#: functions.php:287
|
||||
msgid "<span class=\"meta-nav\">←</span> Older posts"
|
||||
msgstr "<span class=\"meta-nav\">←</span> Eldre innlegg"
|
||||
#: search.php:38
|
||||
msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords."
|
||||
msgstr "Det var ingen treff på dine søkekriterier. Søk på nytt med noen andre nøkkelord."
|
||||
|
||||
#: functions.php:288
|
||||
msgid "Newer posts <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Nyere innlegg <span class=\"meta-nav\">→</span>"
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Søkeresultater for: %s"
|
||||
|
||||
#: functions.php:313
|
||||
msgid "Pingback:"
|
||||
msgstr "Tilbaketråkk:"
|
||||
#: index.php:42
|
||||
msgid "Ready to publish your first post? <a href=\"%s\">Get started here</a>."
|
||||
msgstr "Klar for å publisere ditt første innlegg? <a href=\"%s\">Start her</a>."
|
||||
|
||||
#: content-aside.php:26 content-image.php:26 content-link.php:24
|
||||
#: content-page.php:24 content-quote.php:23 content-status.php:40
|
||||
#: content.php:51 functions.php:345 image.php:37
|
||||
msgid "Edit"
|
||||
msgstr "Rediger"
|
||||
#: index.php:38
|
||||
msgid "No posts to display"
|
||||
msgstr "Ingen innlegg å vise"
|
||||
|
||||
#: content-aside.php:23 content-image.php:23 content-link.php:21
|
||||
#: content-quote.php:20 content-status.php:37 content.php:33
|
||||
msgid "Leave a reply"
|
||||
msgstr "Skriv en kommentar"
|
||||
|
||||
#: content-page.php:21 content.php:45 image.php:102
|
||||
msgid "Pages:"
|
||||
msgstr "Sider:"
|
||||
|
||||
#: content-aside.php:15 content-image.php:13 content-link.php:14
|
||||
#: content-quote.php:13 content-status.php:31 content.php:44
|
||||
msgid "Continue reading <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Les videre <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: content-none.php:13 index.php:49 search.php:34
|
||||
msgid "Nothing Found"
|
||||
msgstr "Ingenting funnet"
|
||||
|
||||
#: author.php:32
|
||||
msgid "Author Archives: %s"
|
||||
msgstr "Forfatterarkiv: %s"
|
||||
|
||||
#: comments.php:31
|
||||
msgid "One thought on “%2$s”"
|
||||
msgid_plural "%1$s thoughts on “%2$s”"
|
||||
msgstr[0] "En tanke om “%2$s”"
|
||||
msgstr[1] "%1$s tanker om “%2$s”"
|
||||
|
||||
#: comments.php:42
|
||||
msgid "Comment navigation"
|
||||
msgstr "Kommentarnavigasjon"
|
||||
|
||||
#: category.php:21
|
||||
msgid "Category Archives: %s"
|
||||
msgstr "Kategoriarkiv: %s"
|
||||
|
||||
#: 404.php:17
|
||||
msgid "This is somewhat embarrassing, isn’t it?"
|
||||
msgstr "Dette er litt flaut, ikke sant?"
|
||||
|
||||
#: content-aside.php:20 content-link.php:18 content-quote.php:17
|
||||
#: content-status.php:15
|
||||
msgid "Permalink to %s"
|
||||
msgstr "Permalenke til %s"
|
||||
|
||||
#: comments.php:53
|
||||
msgid "Comments are closed."
|
||||
msgstr "Det er stengt for kommentarer."
|
||||
|
||||
#: comments.php:43
|
||||
msgid "← Older Comments"
|
||||
msgstr "← Eldre kommentarer"
|
||||
|
||||
#: comments.php:44
|
||||
msgid "Newer Comments →"
|
||||
msgstr "Nyere kommentarer →"
|
||||
|
||||
#. #-#-#-#-# twentytwelve.pot (Twenty Twelve 1.6) #-#-#-#-#
|
||||
#. Author URI of the plugin/theme
|
||||
#: footer.php:16
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr "http://wordpress.org/"
|
||||
|
||||
#: author.php:63 content.php:62
|
||||
msgid "About %s"
|
||||
msgstr "Om %s"
|
||||
|
||||
#: archive.php:33
|
||||
msgid "Yearly Archives: %s"
|
||||
msgstr "Årlige arkiver: %s"
|
||||
|
||||
#: archive.php:29
|
||||
msgid "Daily Archives: %s"
|
||||
msgstr "Daglige arkiver: %s"
|
||||
|
||||
#: archive.php:31
|
||||
msgid "Monthly Archives: %s"
|
||||
msgstr "Månedlige arkiver: %s"
|
||||
|
||||
#: footer.php:16
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolt drevet av %s"
|
||||
|
||||
#: footer.php:16
|
||||
msgid "Semantic Personal Publishing Platform"
|
||||
msgstr "Semantisk, personlig publiseringsplattform"
|
||||
|
||||
#. Translators: used between list items, there is a space after the comma.
|
||||
#: functions.php:370 functions.php:373
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: archive.php:31
|
||||
msgctxt "monthly archives date format"
|
||||
msgid "F Y"
|
||||
msgstr "F Y"
|
||||
|
||||
#: archive.php:33
|
||||
msgctxt "yearly archives date format"
|
||||
msgid "Y"
|
||||
msgstr "Y"
|
||||
|
||||
#: functions.php:340
|
||||
msgid "Your comment is awaiting moderation."
|
||||
msgstr "Din kommentar avventer moderasjon."
|
||||
#: image.php:42
|
||||
msgid "Next →"
|
||||
msgstr "Neste →"
|
||||
|
||||
#: image.php:41
|
||||
msgid "← Previous"
|
||||
msgstr "← Forrige"
|
||||
|
||||
#: functions.php:384
|
||||
msgid "View all posts by %s"
|
||||
msgstr "Vis alle innlegg av %s"
|
||||
|
||||
#: archive.php:35
|
||||
msgid "Archives"
|
||||
msgstr "Arkiv"
|
||||
|
||||
#. translators: 1: date, 2: time
|
||||
#: functions.php:334
|
||||
msgid "%1$s at %2$s"
|
||||
msgstr "%1$s, kl. %2$s"
|
||||
#: image.php:26
|
||||
msgid "<span class=\"meta-prep meta-prep-entry-date\">Published </span> <span class=\"entry-date\"><time class=\"entry-date\" datetime=\"%1$s\">%2$s</time></span> at <a href=\"%3$s\" title=\"Link to full-size image\">%4$s × %5$s</a> in <a href=\"%6$s\" title=\"Return to %7$s\" rel=\"gallery\">%8$s</a>."
|
||||
msgstr "<span class=\"meta-prep meta-prep-entry-date\">Publisert </span> <span class=\"entry-date\"><time class=\"entry-date\" datetime=\"%1$s\">%2$s</time></span>, <a href=\"%3$s\" title=\"Link to full-size image\">%4$s × %5$s</a> i <a href=\"%6$s\" title=\"Tilbake til %7$s\" rel=\"gallery\">%8$s</a>."
|
||||
|
||||
#: header.php:44
|
||||
msgid "Skip to content"
|
||||
@@ -233,58 +88,66 @@ msgstr "Gå til innhold"
|
||||
msgid "Menu"
|
||||
msgstr "Meny"
|
||||
|
||||
#: functions.php:313
|
||||
msgid "(Edit)"
|
||||
msgstr "(Rediger)"
|
||||
|
||||
#: functions.php:328
|
||||
msgid "Post author"
|
||||
msgstr "Innleggsforfatter"
|
||||
|
||||
#: content-aside.php:23 content-image.php:23 content-link.php:21
|
||||
#: content-quote.php:20 content-status.php:37 content.php:33
|
||||
msgid "1 Reply"
|
||||
msgstr "1 svar"
|
||||
|
||||
#: content-none.php:17 index.php:53
|
||||
msgid "Apologies, but no results were found. Perhaps searching will help find a related post."
|
||||
msgstr "Beklager, men ingen resultater ble funnet. Kanskje du kan finne et relatert innlegg ved å søke."
|
||||
|
||||
#: content-aside.php:23 content-image.php:23 content-link.php:21
|
||||
#: content-quote.php:20 content-status.php:37 content.php:33
|
||||
msgid "% Replies"
|
||||
msgstr "% svar"
|
||||
|
||||
#: content-link.php:12
|
||||
msgid "Link"
|
||||
msgstr "Lenke"
|
||||
|
||||
#: functions.php:213
|
||||
msgid "Page %s"
|
||||
msgstr "Side %s"
|
||||
|
||||
#: 404.php:21
|
||||
msgid "It seems we can’t find what you’re looking for. Perhaps searching can help."
|
||||
msgstr "Vi klarer ikke å finne det du leter etter. Prøv å søke."
|
||||
|
||||
#: content.php:16
|
||||
msgid "Featured post"
|
||||
msgstr "Fremhevet innlegg"
|
||||
|
||||
#. Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's
|
||||
#. name.
|
||||
#: functions.php:390
|
||||
msgid "This entry was posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>."
|
||||
msgstr "Dette innlegget ble skrevet i %1$s og merket %2$s, %3$s<span class=\"by-author\"> av %4$s</span>."
|
||||
|
||||
#: functions.php:394
|
||||
#: functions.php:392
|
||||
msgid "This entry was posted on %3$s<span class=\"by-author\"> by %4$s</span>."
|
||||
msgstr "Dette innlegget ble skrevet %3$s<span class=\"by-author\"> av %4$s</span>."
|
||||
|
||||
#: functions.php:392
|
||||
#: functions.php:390
|
||||
msgid "This entry was posted in %1$s on %3$s<span class=\"by-author\"> by %4$s</span>."
|
||||
msgstr "Dette innlegget ble skrevet i %1$s, %3$s<span class=\"by-author\"> av %4$s</span>."
|
||||
|
||||
#. Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's
|
||||
#. name.
|
||||
#: functions.php:388
|
||||
msgid "This entry was posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>."
|
||||
msgstr "Dette innlegget ble skrevet i %1$s og merket %2$s, %3$s<span class=\"by-author\"> av %4$s</span>."
|
||||
|
||||
#: functions.php:382
|
||||
msgid "View all posts by %s"
|
||||
msgstr "Vis alle innlegg av %s"
|
||||
|
||||
#. Translators: used between list items, there is a space after the comma.
|
||||
#: functions.php:368 functions.php:371
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: functions.php:347
|
||||
msgid "Reply"
|
||||
msgstr "Svar"
|
||||
|
||||
#: functions.php:338
|
||||
msgid "Your comment is awaiting moderation."
|
||||
msgstr "Din kommentar avventer moderasjon."
|
||||
|
||||
#. translators: 1: date, 2: time
|
||||
#: functions.php:332
|
||||
msgid "%1$s at %2$s"
|
||||
msgstr "%1$s, kl. %2$s"
|
||||
|
||||
#: functions.php:326
|
||||
msgid "Post author"
|
||||
msgstr "Innleggsforfatter"
|
||||
|
||||
#: functions.php:311
|
||||
msgid "(Edit)"
|
||||
msgstr "(Rediger)"
|
||||
|
||||
#: functions.php:311
|
||||
msgid "Pingback:"
|
||||
msgstr "Tilbaketråkk:"
|
||||
|
||||
#: functions.php:286
|
||||
msgid "Newer posts <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Nyere innlegg <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: functions.php:285
|
||||
msgid "<span class=\"meta-nav\">←</span> Older posts"
|
||||
msgstr "<span class=\"meta-nav\">←</span> Eldre innlegg"
|
||||
|
||||
#: functions.php:284 single.php:20
|
||||
msgid "Post navigation"
|
||||
msgstr "Innleggsnavigasjon"
|
||||
|
||||
#: functions.php:262
|
||||
msgid "Second Front Page Widget Area"
|
||||
msgstr "Andre widget-område på forside"
|
||||
@@ -293,17 +156,21 @@ msgstr "Andre widget-område på forside"
|
||||
msgid "Appears when using the optional Front Page template with a page set as Static Front Page"
|
||||
msgstr "Vises når man bruker den valgfrie forsidemalen med en side satt som statisk forside"
|
||||
|
||||
#: functions.php:252
|
||||
msgid "First Front Page Widget Area"
|
||||
msgstr "Første widget-område på forside"
|
||||
|
||||
#: functions.php:244
|
||||
msgid "Appears on posts and pages except the optional Front Page template, which has its own widgets"
|
||||
msgstr "Vises på innlegg og sider bortsett fra den valgfrie forsidemalen, som har sine egne widgeter"
|
||||
|
||||
#. translators: If there are characters in your language that are not supported
|
||||
#. by Open Sans, translate this to 'off'. Do not translate into your own
|
||||
#. language.
|
||||
#: functions.php:101
|
||||
msgctxt "Open Sans font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
#: functions.php:242
|
||||
msgid "Main Sidebar"
|
||||
msgstr "Primær sidekolonne"
|
||||
|
||||
#: functions.php:213
|
||||
msgid "Page %s"
|
||||
msgstr "Side %s"
|
||||
|
||||
#. translators: To add an additional Open Sans character subset specific to
|
||||
#. your language, translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not
|
||||
@@ -313,14 +180,149 @@ msgctxt "Open Sans font: add new subset (greek, cyrillic, vietnamese)"
|
||||
msgid "no-subset"
|
||||
msgstr "no-subset"
|
||||
|
||||
#: functions.php:252
|
||||
msgid "First Front Page Widget Area"
|
||||
msgstr "Første widget-område på forside"
|
||||
#. translators: If there are characters in your language that are not supported
|
||||
#. by Open Sans, translate this to 'off'. Do not translate into your own
|
||||
#. language.
|
||||
#: functions.php:101
|
||||
msgctxt "Open Sans font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#: image.php:26
|
||||
msgid "<span class=\"meta-prep meta-prep-entry-date\">Published </span> <span class=\"entry-date\"><time class=\"entry-date\" datetime=\"%1$s\">%2$s</time></span> at <a href=\"%3$s\" title=\"Link to full-size image\">%4$s × %5$s</a> in <a href=\"%6$s\" title=\"Return to %7$s\" rel=\"gallery\">%8$s</a>."
|
||||
msgstr "<span class=\"meta-prep meta-prep-entry-date\">Publisert </span> <span class=\"entry-date\"><time class=\"entry-date\" datetime=\"%1$s\">%2$s</time></span>, <a href=\"%3$s\" title=\"Link to full-size image\">%4$s × %5$s</a> i <a href=\"%6$s\" title=\"Tilbake til %7$s\" rel=\"gallery\">%8$s</a>."
|
||||
#: functions.php:64
|
||||
msgid "Primary Menu"
|
||||
msgstr "Primærmeny"
|
||||
|
||||
#: functions.php:349
|
||||
msgid "Reply"
|
||||
msgstr "Svar"
|
||||
#: footer.php:16
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolt drevet av %s"
|
||||
|
||||
#: footer.php:16
|
||||
msgid "Semantic Personal Publishing Platform"
|
||||
msgstr "Semantisk, personlig publiseringsplattform"
|
||||
|
||||
#: footer.php:16
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr "http://wordpress.org/"
|
||||
|
||||
#: content.php:66
|
||||
msgid "View all posts by %s <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Les alle innlegg av %s <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: content.php:16
|
||||
msgid "Featured post"
|
||||
msgstr "Fremhevet innlegg"
|
||||
|
||||
#: content-page.php:21 content.php:45 image.php:102
|
||||
msgid "Pages:"
|
||||
msgstr "Sider:"
|
||||
|
||||
#: content-none.php:17 index.php:53
|
||||
msgid "Apologies, but no results were found. Perhaps searching will help find a related post."
|
||||
msgstr "Beklager, men ingen resultater ble funnet. Kanskje du kan finne et relatert innlegg ved å søke."
|
||||
|
||||
#: content-none.php:13 index.php:49 search.php:34
|
||||
msgid "Nothing Found"
|
||||
msgstr "Ingenting funnet"
|
||||
|
||||
#: content-link.php:12
|
||||
msgid "Link"
|
||||
msgstr "Lenke"
|
||||
|
||||
#: content-aside.php:26 content-image.php:26 content-link.php:24
|
||||
#: content-page.php:24 content-quote.php:23 content-status.php:40
|
||||
#: content.php:51 functions.php:343 image.php:37
|
||||
msgid "Edit"
|
||||
msgstr "Rediger"
|
||||
|
||||
#: content-aside.php:23 content-image.php:23 content-link.php:21
|
||||
#: content-quote.php:20 content-status.php:37 content.php:33
|
||||
msgid "% Replies"
|
||||
msgstr "% svar"
|
||||
|
||||
#: content-aside.php:23 content-image.php:23 content-link.php:21
|
||||
#: content-quote.php:20 content-status.php:37 content.php:33
|
||||
msgid "1 Reply"
|
||||
msgstr "1 svar"
|
||||
|
||||
#: content-aside.php:23 content-image.php:23 content-link.php:21
|
||||
#: content-quote.php:20 content-status.php:37 content.php:33
|
||||
msgid "Leave a reply"
|
||||
msgstr "Skriv en kommentar"
|
||||
|
||||
#: content-aside.php:20 content-link.php:18 content-quote.php:17
|
||||
#: content-status.php:15
|
||||
msgid "Permalink to %s"
|
||||
msgstr "Permalenke til %s"
|
||||
|
||||
#: content-aside.php:15 content-image.php:13 content-link.php:14
|
||||
#: content-quote.php:13 content-status.php:31 content.php:44
|
||||
msgid "Continue reading <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Les videre <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: comments.php:53
|
||||
msgid "Comments are closed."
|
||||
msgstr "Det er stengt for kommentarer."
|
||||
|
||||
#: comments.php:44
|
||||
msgid "Newer Comments →"
|
||||
msgstr "Nyere kommentarer →"
|
||||
|
||||
#: comments.php:43
|
||||
msgid "← Older Comments"
|
||||
msgstr "← Eldre kommentarer"
|
||||
|
||||
#: comments.php:42
|
||||
msgid "Comment navigation"
|
||||
msgstr "Kommentarnavigasjon"
|
||||
|
||||
#: comments.php:31
|
||||
msgid "One thought on “%2$s”"
|
||||
msgid_plural "%1$s thoughts on “%2$s”"
|
||||
msgstr[0] "En tanke om “%2$s”"
|
||||
msgstr[1] "%1$s tanker om “%2$s”"
|
||||
|
||||
#: category.php:21
|
||||
msgid "Category Archives: %s"
|
||||
msgstr "Kategoriarkiv: %s"
|
||||
|
||||
#: author.php:63 content.php:62
|
||||
msgid "About %s"
|
||||
msgstr "Om %s"
|
||||
|
||||
#: author.php:32
|
||||
msgid "Author Archives: %s"
|
||||
msgstr "Forfatterarkiv: %s"
|
||||
|
||||
#: archive.php:35
|
||||
msgid "Archives"
|
||||
msgstr "Arkiv"
|
||||
|
||||
#: archive.php:33
|
||||
msgctxt "yearly archives date format"
|
||||
msgid "Y"
|
||||
msgstr "Y"
|
||||
|
||||
#: archive.php:33
|
||||
msgid "Yearly Archives: %s"
|
||||
msgstr "Årlige arkiver: %s"
|
||||
|
||||
#: archive.php:31
|
||||
msgctxt "monthly archives date format"
|
||||
msgid "F Y"
|
||||
msgstr "F Y"
|
||||
|
||||
#: archive.php:31
|
||||
msgid "Monthly Archives: %s"
|
||||
msgstr "Månedlige arkiver: %s"
|
||||
|
||||
#: archive.php:29
|
||||
msgid "Daily Archives: %s"
|
||||
msgstr "Daglige arkiver: %s"
|
||||
|
||||
#: 404.php:21
|
||||
msgid "It seems we can’t find what you’re looking for. Perhaps searching can help."
|
||||
msgstr "Vi klarer ikke å finne det du leter etter. Prøv å søke."
|
||||
|
||||
#: 404.php:17
|
||||
msgid "This is somewhat embarrassing, isn’t it?"
|
||||
msgstr "Dette er litt flaut, ikke sant?"
|
||||
@@ -61,6 +61,10 @@ class Google_Calendar_Events_Admin {
|
||||
|
||||
// Add admin notice after plugin activation. Also check if should be hidden.
|
||||
add_action( 'admin_notices', array( $this, 'show_admin_notice' ) );
|
||||
|
||||
// Add media button for adding a shortcode.
|
||||
add_action( 'media_buttons', array( $this, 'add_shortcode_button' ), 100 );
|
||||
add_action( 'edit_form_after_editor', array( $this, 'add_shortcode_panel' ), 100 );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,8 +120,16 @@ class Google_Calendar_Events_Admin {
|
||||
* @since 2.1.0
|
||||
*/
|
||||
public static function activate() {
|
||||
flush_rewrite_rules();
|
||||
update_option( 'gce_show_admin_install_notice', 1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when the plugin is deactivated.
|
||||
*/
|
||||
public static function deactivate() {
|
||||
flush_rewrite_rules();
|
||||
}
|
||||
|
||||
public function add_plugin_admin_menu() {
|
||||
// Add Help submenu page
|
||||
@@ -141,7 +153,10 @@ class Google_Calendar_Events_Admin {
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public function enqueue_admin_scripts() {
|
||||
|
||||
|
||||
// Script for the add shortcode media button.
|
||||
wp_enqueue_script( 'gce-admin-add-shortcode', plugins_url( 'js/gce-admin-shortcode.js', __FILE__ ), array( 'jquery', 'thickbox' ), $this->version, true);
|
||||
|
||||
if( $this->viewing_this_plugin() ) {
|
||||
wp_enqueue_script( 'jquery-ui-datepicker' );
|
||||
wp_enqueue_script( 'gce-admin', plugins_url( 'js/gce-admin.js', __FILE__ ), array( 'jquery' ), $this->version, true );
|
||||
@@ -154,7 +169,10 @@ class Google_Calendar_Events_Admin {
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public function enqueue_admin_styles() {
|
||||
|
||||
|
||||
// Style for the add shortcode media button.
|
||||
wp_enqueue_style( 'gce-admin-shortcode', plugins_url( 'css/admin-shortcode.css', __FILE__ ), array(), $this->version, 'all' );
|
||||
|
||||
if( $this->viewing_this_plugin() ) {
|
||||
global $wp_scripts;
|
||||
|
||||
@@ -220,4 +238,74 @@ class Google_Calendar_Events_Admin {
|
||||
$links
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a shortcode button.
|
||||
*
|
||||
* Adds a button to add a calendar shortcode in WordPress content editor.
|
||||
*
|
||||
* @see http://codex.wordpress.org/ThickBox
|
||||
*/
|
||||
public function add_shortcode_button() {
|
||||
// Thickbox will ignore height and width, will adjust these in js.
|
||||
// @see https://core.trac.wordpress.org/ticket/17249
|
||||
?>
|
||||
<a href="#TB_inline?height=250&width=500&inlineId=gce-insert-shortcode-panel" id="gce-insert-shortcode-button" class="thickbox button insert-calendar add_calendar">
|
||||
<span class="wp-media-buttons-icon"></span> <?php _e( 'Add Calendar', 'gce' ); ?>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Panel for the add shortcode media button.
|
||||
*
|
||||
* Prints the panel for choosing a calendar to insert as a shortcode in a page or post.
|
||||
*/
|
||||
public function add_shortcode_panel() {
|
||||
|
||||
$feeds = get_transient( 'gce_feed_ids' );
|
||||
if ( ! $feeds ) {
|
||||
|
||||
$query = get_posts( array(
|
||||
'post_type' => 'gce_feed',
|
||||
'orderby' => 'title',
|
||||
'order' => 'ASC',
|
||||
'nopaging' => true
|
||||
) );
|
||||
|
||||
$results = array();
|
||||
if ( $query && is_array( $query ) ) {
|
||||
foreach ( $query as $feed ) {
|
||||
$results[ $feed->ID ] = $feed->post_title;
|
||||
}
|
||||
set_transient( 'gce_feed_ids', $results, 604800 );
|
||||
}
|
||||
$feeds = $results;
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="gce-insert-shortcode-panel" style="display:none;">
|
||||
<div class="gce-insert-shortcode-panel">
|
||||
<h1><?php _e( 'Add Calendar', 'gce'); ?></h1>
|
||||
<p><?php _e( 'Add a calendar feed to your post.', 'gce' ); ?></p>
|
||||
<?php if ( ! empty( $feeds ) ) : ?>
|
||||
<label for="gce-choose-gce-feed">
|
||||
<select id="gce-choose-gce-feed" name="">
|
||||
<?php foreach ( $feeds as $id => $title ) : ?>
|
||||
<option value="<?php echo $id ?>"><?php echo $title ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</label>
|
||||
<br />
|
||||
<input type="button" value="<?php _e( 'Insert Calendar', 'gce' ); ?>" id="gce-insert-shortcode" class="button button-primary button-large" name="" />
|
||||
<?php else : ?>
|
||||
<p><em><?php _e( 'Could not find any calendars to add to this post.', 'gce' ); ?></em></p>
|
||||
<p><strong><a href="post-new.php?post_type=gce_feed"><?php _e( 'Please add a new calendar feed first.', 'gce' ); ?></a></strong>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,7 +18,7 @@ class Google_Calendar_Events {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $version = '2.2.6';
|
||||
protected $version = '2.2.8';
|
||||
|
||||
/**
|
||||
* Unique identifier for the plugin.
|
||||
@@ -37,7 +37,7 @@ class Google_Calendar_Events {
|
||||
* @var object
|
||||
*/
|
||||
protected static $instance = null;
|
||||
|
||||
|
||||
public $show_scripts = false;
|
||||
|
||||
/**
|
||||
@@ -47,56 +47,56 @@ class Google_Calendar_Events {
|
||||
* @since 2.0.0
|
||||
*/
|
||||
private function __construct() {
|
||||
|
||||
|
||||
$this->includes();
|
||||
|
||||
|
||||
$old = get_option( 'gce_version' );
|
||||
|
||||
|
||||
if( version_compare( $old, $this->version, '<' ) ) {
|
||||
delete_option( 'gce_upgrade_has_run' );
|
||||
}
|
||||
|
||||
|
||||
if( false === get_option( 'gce_upgrade_has_run' ) ) {
|
||||
$this->upgrade();
|
||||
}
|
||||
|
||||
|
||||
$this->setup_constants();
|
||||
|
||||
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_public_scripts' ) );
|
||||
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_public_styles' ) );
|
||||
add_action( 'init', array( $this, 'register_public_scripts' ) );
|
||||
add_action( 'init', array( $this, 'register_public_styles' ) );
|
||||
|
||||
// Load scripts when posts load so we know if we need to include them or not
|
||||
add_filter( 'the_posts', array( $this, 'load_scripts' ) );
|
||||
|
||||
|
||||
// Load plugin text domain
|
||||
$this->plugin_textdomain();
|
||||
|
||||
|
||||
add_action( 'wp_footer', array( $this, 'localize_main_script' ) );
|
||||
}
|
||||
|
||||
|
||||
public function localize_main_script() {
|
||||
|
||||
|
||||
if( $this->show_scripts ) {
|
||||
global $localize;
|
||||
|
||||
wp_localize_script( GCE_PLUGIN_SLUG . '-public', 'gce_grid', $localize );
|
||||
|
||||
wp_localize_script( GCE_PLUGIN_SLUG . '-public', 'gce',
|
||||
wp_localize_script( GCE_PLUGIN_SLUG . '-public', 'gce',
|
||||
array(
|
||||
'script_debug' => ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ),
|
||||
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
||||
'loadingText' => __( 'Loading...', 'gce' ),
|
||||
'script_debug' => ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ),
|
||||
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
||||
'loadingText' => __( 'Loading...', 'gce' ),
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function load_scripts( $posts ) {
|
||||
|
||||
|
||||
global $gce_options;
|
||||
|
||||
// Init enqueue flag.
|
||||
$do_enqueue = false;
|
||||
|
||||
|
||||
if ( isset( $gce_options['always_enqueue'] ) ) {
|
||||
|
||||
$do_enqueue = true;
|
||||
@@ -128,39 +128,39 @@ class Google_Calendar_Events {
|
||||
|
||||
return $posts;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load the upgrade file
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public function upgrade() {
|
||||
include_once( 'includes/admin/upgrade.php' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Setup public constants
|
||||
*
|
||||
* Setup public constants
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public function setup_constants() {
|
||||
if( ! defined( 'GCE_DIR' ) ) {
|
||||
define( 'GCE_DIR', dirname( __FILE__ ) );
|
||||
}
|
||||
|
||||
|
||||
if( ! defined( 'GCE_PLUGIN_SLUG' ) ) {
|
||||
define( 'GCE_PLUGIN_SLUG', $this->plugin_slug );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Include all necessary files
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public static function includes() {
|
||||
global $gce_options;
|
||||
|
||||
|
||||
// First include common files between admin and public
|
||||
include_once( 'includes/misc-functions.php' );
|
||||
include_once( 'includes/gce-feed-cpt.php' );
|
||||
@@ -169,7 +169,7 @@ class Google_Calendar_Events {
|
||||
include_once( 'includes/class-gce-feed.php' );
|
||||
include_once( 'includes/shortcodes.php' );
|
||||
include_once( 'views/widgets.php' );
|
||||
|
||||
|
||||
// Now include files specifically for public or admin
|
||||
if( is_admin() ) {
|
||||
// Admin includes
|
||||
@@ -177,19 +177,19 @@ class Google_Calendar_Events {
|
||||
} else {
|
||||
// Public includes
|
||||
}
|
||||
|
||||
|
||||
// Setup our main settings options
|
||||
include_once( 'includes/register-settings.php' );
|
||||
|
||||
|
||||
$gce_options = gce_get_settings();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load public facing scripts
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public function enqueue_public_scripts() {
|
||||
public function register_public_scripts() {
|
||||
|
||||
// DON'T include ImagesLoaded JS library recommended by qTip2 yet since we don't use "complex content that contains images" (yet).
|
||||
// http://qtip2.com/guides#gettingstarted.imagesloaded
|
||||
@@ -203,13 +203,13 @@ class Google_Calendar_Events {
|
||||
wp_register_script( $this->plugin_slug . '-qtip', plugins_url( 'js/jquery.qtip' . $min . '.js', __FILE__ ), array( 'jquery' ), $this->version, true );
|
||||
wp_register_script( $this->plugin_slug . '-public', plugins_url( 'js/gce-script.js', __FILE__ ), array( 'jquery', $this->plugin_slug . '-qtip' ), $this->version, true );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Load public facing styles
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public function enqueue_public_styles() {
|
||||
public function register_public_styles() {
|
||||
wp_register_style( $this->plugin_slug . '-qtip', plugins_url( 'css/jquery.qtip.min.css', __FILE__ ), array(), $this->version );
|
||||
wp_register_style( $this->plugin_slug . '-public', plugins_url( 'css/gce-style.css', __FILE__ ), array( $this->plugin_slug . '-qtip' ), $this->version );
|
||||
}
|
||||
@@ -219,18 +219,18 @@ class Google_Calendar_Events {
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @return Plugin version variable.
|
||||
* @return string Plugin version variable.
|
||||
*/
|
||||
public function get_plugin_slug() {
|
||||
return $this->plugin_slug;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the plugin version.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return Plugin slug variable.
|
||||
* @return string Plugin slug variable.
|
||||
*/
|
||||
public function get_plugin_version() {
|
||||
return $this->version;
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
body.post-type-gce_feed #gce-insert-shortcode-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Add shortcode media button and panel */
|
||||
.wp-media-buttons a.add_calendar span.wp-media-buttons-icon {
|
||||
background: none;
|
||||
}
|
||||
.wp-media-buttons a.add_calendar span.wp-media-buttons-icon:before {
|
||||
content: '\f508';
|
||||
font: normal 18px/1 'dashicons';
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
speak: none;
|
||||
}
|
||||
|
||||
/* Add shortcode panel contents */
|
||||
.gce-insert-shortcode-panel select {
|
||||
display: block;
|
||||
max-width: 470px;
|
||||
width: 100%;
|
||||
}
|
||||
/* Hack to make ThickBox look right */
|
||||
/* see: https://core.trac.wordpress.org/ticket/17249 */
|
||||
body .gce-insert-shortcode-modal {
|
||||
height: 220px !important;
|
||||
margin-left: -250px !important;
|
||||
width: 500px !important;
|
||||
}
|
||||
body .gce-insert-shortcode-modal-title {
|
||||
background: #fff !important;
|
||||
border-bottom: none !important;
|
||||
height: 0 !important;
|
||||
}
|
||||
@@ -58,3 +58,10 @@
|
||||
.gce-custom-range input {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
input.gce-shortcode {
|
||||
border: none;
|
||||
color: rgba(0,0,0,.58);
|
||||
font-family: monospace;
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -1,24 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* Google Calendar Events
|
||||
* Plugin Name: Google Calendar Events
|
||||
* Plugin URI: https://wordpress.org/plugins/google-calendar-events/
|
||||
* Description: Show off your Google calendar in grid (month) or list view, in a post, page or widget, and in a style that matches your site.
|
||||
* Author: Moonstone Media
|
||||
* Author URI: http://moonstonemediagroup.com
|
||||
* Version: 2.2.8
|
||||
* Text Domain: gce
|
||||
* Domain Path: /languages/
|
||||
*
|
||||
* @package GCE
|
||||
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://philderksen.com
|
||||
* @copyright 2014-2015 Phil Derksen
|
||||
*
|
||||
* @wordpress-plugin
|
||||
* Plugin Name: Google Calendar Events
|
||||
* Plugin URI: https://wordpress.org/plugins/google-calendar-events/
|
||||
* Description: Show off your Google calendar in grid (month) or list view, in a post, page or widget, and in a style that matches your site.
|
||||
* Version: 2.2.6
|
||||
* Author: Phil Derksen
|
||||
* Author URI: http://philderksen.com
|
||||
* License: GPL-2.0+
|
||||
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
||||
* Text Domain: gce
|
||||
* Domain Path: /languages
|
||||
* Copyright 2014 Moonstone Media/Phil Derksen. All rights reserved.
|
||||
*/
|
||||
|
||||
// If this file is called directly, abort.
|
||||
@@ -62,7 +53,7 @@ require_once( 'class-google-calendar-events.php' );
|
||||
|
||||
/**
|
||||
* Define constant pointing to this file
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
if( ! defined( 'GCE_MAIN_FILE' ) ) {
|
||||
@@ -71,22 +62,23 @@ if( ! defined( 'GCE_MAIN_FILE' ) ) {
|
||||
|
||||
/*
|
||||
* Get instance of our plugin
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
add_action( 'plugins_loaded', array( 'Google_Calendar_Events', 'get_instance' ) );
|
||||
|
||||
/*
|
||||
* If we are in admin then load the Admin class
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
|
||||
require_once( 'class-google-calendar-events-admin.php' );
|
||||
|
||||
|
||||
// Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
|
||||
register_activation_hook( __FILE__, array( 'Google_Calendar_Events_Admin', 'activate' ) );
|
||||
|
||||
register_deactivation_hook( __FILE__, array( 'Google_Calendar_Events_Admin', 'deactivate' ) );
|
||||
|
||||
// Get plugin admin class instance
|
||||
add_action( 'plugins_loaded', array( 'Google_Calendar_Events_Admin', 'get_instance' ) );
|
||||
}
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
|
||||
/**
|
||||
* Function to clear the cache out
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function gce_clear_cache( $id ) {
|
||||
|
||||
|
||||
delete_transient( 'gce_feed_' . $id );
|
||||
|
||||
|
||||
add_settings_error( 'gce-notices', 'gce-cache-updated', __( 'Cache has been cleared for this feed.', 'gce' ), 'updated' );
|
||||
}
|
||||
|
||||
@@ -24,12 +24,12 @@ function gce_clear_cache( $id ) {
|
||||
* Function that runs when a new Feed CPT is made
|
||||
* Adds the default editor content for the event builder
|
||||
* Adds default post meta options
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
|
||||
function gce_default_editor_content( $content, $post ) {
|
||||
|
||||
|
||||
if( $post->post_type == 'gce_feed' ) {
|
||||
$content = '<div class="gce-list-event gce-tooltip-event">[event-title]</div>' . "\n";
|
||||
$content .= '<div><span>' . __( 'Starts:', 'gce' ) . '</span> [start-time]</div>' . "\n";
|
||||
@@ -37,7 +37,7 @@ function gce_default_editor_content( $content, $post ) {
|
||||
$content .= '[if-location]<div><span>' . __( 'Location:', 'gce' ) . '</span> [location]</div>[/if-location]' . "\n";
|
||||
$content .= '[if-description]<div><span>' . __( 'Description:', 'gce' ) . '</span> [description]</div>[/if-description]' . "\n";
|
||||
$content .= '<div>[link newwindow="true"]' . __( 'More details...', 'gce' ) . '[/link]</div>' . "\n";
|
||||
|
||||
|
||||
// Default Post Meta Options
|
||||
add_post_meta( $post->ID, 'gce_expand_recurring', 1 );
|
||||
add_post_meta( $post->ID, 'gce_retrieve_from', 'today' );
|
||||
@@ -50,7 +50,7 @@ function gce_default_editor_content( $content, $post ) {
|
||||
add_post_meta( $post->ID, 'gce_feed_end', 'years' );
|
||||
add_post_meta( $post->ID, 'gce_feed_start', 'months' );
|
||||
add_post_meta( $post->ID, 'gce_show_tooltips', 1 );
|
||||
|
||||
|
||||
// Default Simple Display Options
|
||||
add_post_meta( $post->ID, 'gce_display_start', 'time' );
|
||||
add_post_meta( $post->ID, 'gce_display_start_text', __( 'Starts:', 'gce' ) );
|
||||
@@ -61,9 +61,9 @@ function gce_default_editor_content( $content, $post ) {
|
||||
add_post_meta( $post->ID, 'gce_display_description_text', __( 'Description:', 'gce' ) );
|
||||
add_post_meta( $post->ID, 'gce_display_link', 1 );
|
||||
add_post_meta( $post->ID, 'gce_display_link_text', __( 'More Details', 'gce' ) );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $content;
|
||||
}
|
||||
add_filter( 'default_content', 'gce_default_editor_content', 10, 2 );
|
||||
@@ -71,7 +71,7 @@ add_filter( 'default_content', 'gce_default_editor_content', 10, 2 );
|
||||
|
||||
function gce_add_cache_button() {
|
||||
global $post;
|
||||
|
||||
|
||||
if( $post->post_type == 'gce_feed' ) {
|
||||
$html = '<div id="gce-clear-cache">' .
|
||||
'<a href="' . esc_url( add_query_arg( array( 'clear_cache' => true ) ) ) . '">' . __( 'Clear Cache', 'gce' ) . '</a>' .
|
||||
@@ -82,4 +82,47 @@ function gce_add_cache_button() {
|
||||
}
|
||||
add_action( 'post_submitbox_start', 'gce_add_cache_button' );
|
||||
|
||||
/**
|
||||
* Sanitize a variable of unknown type.
|
||||
*
|
||||
* Helper function to sanitize a variable from input,
|
||||
* which could also be a multidimensional array of variable depth.
|
||||
*
|
||||
* @param mixed $var Variable to sanitize.
|
||||
* @param string $func Function to use for sanitizing text strings (default 'sanitize_text_field')
|
||||
*
|
||||
* @return array|string Sanitized variable
|
||||
*/
|
||||
function gce_sanitize_input( $var, $func = 'sanitize_text_field' ) {
|
||||
|
||||
if ( empty( $var ) || is_null( $var ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ( is_bool( $var ) ) {
|
||||
if ( $var === true ) {
|
||||
return 'yes';
|
||||
} else {
|
||||
return 'no';
|
||||
}
|
||||
}
|
||||
|
||||
if ( is_string( $var ) || is_numeric( $var ) ) {
|
||||
$func = is_string( $func ) && function_exists( $func ) ? $func : 'sanitize_text_field';
|
||||
return call_user_func( $func, trim( strval( $var ) ) );
|
||||
}
|
||||
|
||||
if ( is_object( $var ) ) {
|
||||
$var = (array) $var;
|
||||
}
|
||||
|
||||
if ( is_array( $var ) ) {
|
||||
$array = array();
|
||||
foreach( $var as $k => $v ) {
|
||||
$array[$k] = gce_sanitize_input( $v );
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
@@ -377,6 +377,7 @@ function clear_old_transients( $id ) {
|
||||
|
||||
delete_transient( 'gce_feed_' . $id );
|
||||
delete_transient( 'gce_feed_' . $id . '_url' );
|
||||
delete_transient( 'gce_feed_ids' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -403,7 +403,7 @@ class GCE_Display {
|
||||
}
|
||||
|
||||
if( ! $has_events ) {
|
||||
$markup .= __( 'No events to display.', 'gce' );
|
||||
$markup .= apply_filters( 'gce_no_events_message_text', __( 'No events to display.', 'gce' ) );
|
||||
}
|
||||
|
||||
$markup .= '</div>';
|
||||
|
||||
@@ -10,16 +10,16 @@
|
||||
*/
|
||||
|
||||
class GCE_Event {
|
||||
|
||||
|
||||
public $feed;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function __construct( GCE_Feed $feed, $id, $title, $description, $location, $start_time, $end_time, $link ) {
|
||||
|
||||
|
||||
$this->feed = $feed;
|
||||
$this->id = $id;
|
||||
$this->title = $title;
|
||||
@@ -28,7 +28,7 @@ class GCE_Event {
|
||||
$this->start_time = $start_time;
|
||||
$this->end_time = $end_time;
|
||||
$this->link = $link;
|
||||
|
||||
|
||||
//Calculate which day type this event is (SWD = single whole day, SPD = single part day, MWD = multiple whole day, MPD = multiple part day)
|
||||
if ( ( $start_time + 86400 ) <= $end_time ) {
|
||||
if ( ( $start_time + 86400 ) == $end_time ) {
|
||||
@@ -52,14 +52,14 @@ class GCE_Event {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns an array of days (as UNIX timestamps) that this events spans
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function get_days() {
|
||||
|
||||
function get_days() {
|
||||
|
||||
if( $this->start_time !== null ) {
|
||||
//Round start date to nearest day
|
||||
$start_time = mktime( 0, 0, 0, date( 'm', $this->start_time ), date( 'd', $this->start_time ) , date( 'Y', $this->start_time ) );
|
||||
@@ -93,7 +93,7 @@ class GCE_Event {
|
||||
|
||||
/**
|
||||
* Returns the markup for this event, so that it can be used in the construction of a grid / list
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function get_event_markup( $display_type, $num_in_day, $num ) {
|
||||
@@ -110,12 +110,12 @@ class GCE_Event {
|
||||
|
||||
// First check if we use the builder or not
|
||||
$use_simple = get_post_meta( $this->feed->id, 'gce_display_simple', true );
|
||||
|
||||
|
||||
if( empty( $use_simple ) ) {
|
||||
return $this->use_builder();
|
||||
}
|
||||
|
||||
// Setup the markup to return
|
||||
// Setup the markup to return
|
||||
$display_options['display_start'] = get_post_meta( $this->feed->id, 'gce_display_start', true );
|
||||
$display_options['display_start_text'] = get_post_meta( $this->feed->id, 'gce_display_start_text', true );
|
||||
$display_options['display_end'] = get_post_meta( $this->feed->id, 'gce_display_end', true );
|
||||
@@ -129,7 +129,7 @@ class GCE_Event {
|
||||
$display_options['display_link_text'] = get_post_meta( $this->feed->id, 'gce_display_link_text', true );
|
||||
$display_options['display_separator'] = get_post_meta( $this->feed->id, 'gce_display_separator', true );
|
||||
$display_options['display_link_target'] = get_post_meta( $this->feed->id, 'gce_display_link_tab', true );
|
||||
|
||||
|
||||
$markup = '<p class="gce-' . esc_attr( $this->type ) . '-event">' . esc_html( $this->title ) . '</p>';
|
||||
|
||||
$start_end = array();
|
||||
@@ -155,7 +155,7 @@ class GCE_Event {
|
||||
//Add the correct start / end, date / time information to $markup
|
||||
foreach ( $start_end as $start_or_end => $info ) {
|
||||
$markup .= '<p class="gce-' . esc_attr( $this->type ) . '-' . $start_or_end . '"><span>' . esc_html( $display_options['display_' . $start_or_end . '_text'] ) . '</span> ';
|
||||
|
||||
|
||||
if( ! empty( $display_options['display_' . $start_or_end] ) ) {
|
||||
switch ( $display_options['display_' . $start_or_end] ) {
|
||||
case 'time': $markup .= esc_html( $info['time'] );
|
||||
@@ -196,23 +196,23 @@ class GCE_Event {
|
||||
//If link should be displayed add to $markup
|
||||
if ( ! empty( $display_options['display_link'] ) ) {
|
||||
$target = ( ! empty( $display_options['display_link_target'] ) ? 'target="blank"' : '' );
|
||||
|
||||
|
||||
$ctz = get_option( 'timezone_string' );
|
||||
|
||||
|
||||
// Check if it is a hangouts link first
|
||||
if( strpos( $this->link, 'plus.google.com/events/' ) !== false ) {
|
||||
$link = $this->link;
|
||||
} else {
|
||||
$link = $this->link . ( ! empty( $ctz ) ? '&ctz=' . $ctz : '' );
|
||||
}
|
||||
|
||||
|
||||
$markup .= '<p class="gce-' . esc_attr( $this->type ) . '-link"><a href="' . esc_url( $link ) . '" ' . esc_attr( $target ) . '>' . esc_html( $display_options['display_link_text'] ) . '</a></p>';
|
||||
}
|
||||
|
||||
return $markup;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//Return the event markup using the builder
|
||||
function use_builder() {
|
||||
//Array of valid shortcodes
|
||||
@@ -247,6 +247,7 @@ class GCE_Event {
|
||||
'if-title', //The event has a title
|
||||
'if-description', //The event has a description
|
||||
'if-location', //The event has a location
|
||||
'if-not-location',//The event does not have a location
|
||||
'if-tooltip', //The current display type is 'tooltip'
|
||||
'if-list', //The current display type is 'list'
|
||||
'if-now', //The event is taking place now (after the start time, but before the end time)
|
||||
@@ -376,14 +377,14 @@ class GCE_Event {
|
||||
case 'link':
|
||||
$new_window = ( $newwindow ) ? ' target="_blank"' : '';
|
||||
$ctz = get_option( 'timezone_string' );
|
||||
|
||||
|
||||
// Check if it is a hangouts link first
|
||||
if( strpos( $this->link, 'plus.google.com/events/' ) !== false ) {
|
||||
$link = $this->link;
|
||||
} else {
|
||||
$link = $this->link . ( ! empty( $ctz ) ? '&ctz=' . $ctz : '' );
|
||||
}
|
||||
|
||||
|
||||
return $m[1] . '<a href="' . esc_url( $link ) . '"' . $new_window . '>' . $this->look_for_shortcodes( $m[5] ) . '</a>' . $m[6];
|
||||
|
||||
case 'url':
|
||||
@@ -442,6 +443,12 @@ class GCE_Event {
|
||||
|
||||
return '';
|
||||
|
||||
case 'if-not-location':
|
||||
if ( '' == $this->location )
|
||||
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
||||
|
||||
return '';
|
||||
|
||||
case 'if-tooltip':
|
||||
if ( 'tooltip' == $this->type )
|
||||
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
||||
@@ -515,8 +522,8 @@ class GCE_Event {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
//Returns the difference between two times in human-readable format. Based on a patch for human_time_diff posted in the WordPress trac (http://core.trac.wordpress.org/ticket/9272) by Viper007Bond
|
||||
|
||||
//Returns the difference between two times in human-readable format. Based on a patch for human_time_diff posted in the WordPress trac (http://core.trac.wordpress.org/ticket/9272) by Viper007Bond
|
||||
function gce_human_time_diff( $from, $to = '', $limit = 1 ) {
|
||||
$units = array(
|
||||
31556926 => array( __( '%s year', 'gce' ), __( '%s years', 'gce' ) ),
|
||||
@@ -528,7 +535,7 @@ class GCE_Event {
|
||||
);
|
||||
|
||||
if ( empty( $to ) )
|
||||
$to = time();
|
||||
$to = time();
|
||||
|
||||
$from = (int) $from;
|
||||
$to = (int) $to;
|
||||
@@ -539,26 +546,26 @@ class GCE_Event {
|
||||
|
||||
foreach ( $units as $unitsec => $unitnames ) {
|
||||
if ( $items >= $limit )
|
||||
break;
|
||||
break;
|
||||
|
||||
if ( $diff < $unitsec )
|
||||
continue;
|
||||
continue;
|
||||
|
||||
$numthisunits = floor( $diff / $unitsec );
|
||||
$diff = $diff - ( $numthisunits * $unitsec );
|
||||
$items++;
|
||||
$numthisunits = floor( $diff / $unitsec );
|
||||
$diff = $diff - ( $numthisunits * $unitsec );
|
||||
$items++;
|
||||
|
||||
if ( $numthisunits > 0 )
|
||||
$output[] = sprintf( _n( $unitnames[0], $unitnames[1], $numthisunits ), $numthisunits );
|
||||
}
|
||||
$output[] = sprintf( _n( $unitnames[0], $unitnames[1], $numthisunits, 'gce' ), $numthisunits );
|
||||
}
|
||||
|
||||
$seperator = _x( ', ', 'human_time_diff' );
|
||||
$seperator = _x( ', ', 'human_time_diff', 'gce' );
|
||||
|
||||
if ( ! empty( $output ) ) {
|
||||
return implode( $seperator, $output );
|
||||
return implode( $seperator, $output );
|
||||
} else {
|
||||
$smallest = array_pop( $units );
|
||||
return sprintf( $smallest[0], 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
$smallest = array_pop( $units );
|
||||
return sprintf( $smallest[0], 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
class GCE_Feed {
|
||||
|
||||
|
||||
public $id,
|
||||
$calendar_id,
|
||||
$feed_url,
|
||||
@@ -23,49 +23,50 @@ class GCE_Feed {
|
||||
$expand_recurring,
|
||||
$title,
|
||||
$feed_start,
|
||||
$feed_end;
|
||||
|
||||
$feed_end,
|
||||
$builder;
|
||||
|
||||
public $events = array();
|
||||
|
||||
|
||||
// Google API Key
|
||||
private $api_key = 'AIzaSyAssdKVved1mPVY0UJCrx96OUOF9u17AuY';
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public function __construct( $id ) {
|
||||
// Set the ID
|
||||
$this->id = $id;
|
||||
|
||||
|
||||
$this->calendar_id = get_post_meta( $this->id, 'gce_feed_url', true );
|
||||
|
||||
|
||||
// Set up all other data based on the ID
|
||||
$this->setup_attributes();
|
||||
|
||||
|
||||
// Now create the Feed
|
||||
$this->create_feed();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the transient to cache the events
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
private function cache_events() {
|
||||
set_transient( 'gce_feed_' . $this->id, $this->events, $this->cache );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set all of the feed attributes from the post meta options
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
private function setup_attributes() {
|
||||
private function setup_attributes() {
|
||||
$date_format = get_post_meta( $this->id, 'gce_date_format', true );
|
||||
$time_format = get_post_meta( $this->id, 'gce_time_format', true );
|
||||
|
||||
|
||||
$this->feed_url = get_post_meta( $this->id, 'gce_feed_url', true );
|
||||
$this->date_format = ( ! empty( $date_format ) ? $date_format : get_option( 'date_format' ) );
|
||||
$this->time_format = ( ! empty( $time_format ) ? $time_format : get_option( 'time_format' ) );
|
||||
@@ -77,90 +78,84 @@ class GCE_Feed {
|
||||
$this->feed_start = $this->get_feed_start();
|
||||
$this->feed_end = $this->get_feed_end();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create the feed URL
|
||||
*
|
||||
* Create the feed URL
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
private function create_feed() {
|
||||
//Break the feed URL up into its parts (scheme, host, path, query)
|
||||
|
||||
|
||||
global $gce_options;
|
||||
|
||||
|
||||
if( empty( $this->feed_url ) ) {
|
||||
if( current_user_can( 'manage_options' ) ) {
|
||||
echo '<p>' . __( 'The Google Calendar ID has not been set. Please make sure to set it correctly in the Feed settings.', 'gce' ) . '</p>';
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$args = array();
|
||||
|
||||
|
||||
if( ! empty( $gce_options['api_key'] ) ) {
|
||||
$api_key = $gce_options['api_key'];
|
||||
$api_key = urlencode( $gce_options['api_key'] );
|
||||
} else {
|
||||
$api_key = $this->api_key;
|
||||
}
|
||||
|
||||
|
||||
$query = 'https://www.googleapis.com/calendar/v3/calendars/' . $this->calendar_id . '/events';
|
||||
|
||||
|
||||
// Set API key
|
||||
$query .= '?key=' . $api_key;
|
||||
|
||||
|
||||
$args['timeMin'] = urlencode( date( 'c', $this->feed_start ) );
|
||||
|
||||
$args['timeMax'] = urlencode( date( 'c', $this->feed_end ) );
|
||||
|
||||
$args['maxResults'] = 2500;
|
||||
|
||||
$ctz = get_option( 'timezone_string' );
|
||||
|
||||
if( ! empty( $ctz ) ) {
|
||||
$args['timeZone'] = $ctz;
|
||||
|
||||
// Timezone.
|
||||
$timezone = esc_attr( get_post_meta( $this->id, '_feed_timezone_setting', true ) );
|
||||
if ( 'use_site' == $timezone ) {
|
||||
$args['timeZone'] = gce_get_wp_timezone();
|
||||
}
|
||||
|
||||
$args['timeMin'] = urlencode( date( 'c', $this->feed_start ) );
|
||||
$args['timeMax'] = urlencode( date( 'c', $this->feed_end ) );
|
||||
|
||||
$args['maxResults'] = 2500;
|
||||
|
||||
if ( ! empty( $this->search_query ) ) {
|
||||
$args['q'] = rawurlencode( $this->search_query );
|
||||
}
|
||||
|
||||
|
||||
if( ! empty( $this->expand_recurring ) ) {
|
||||
$args['singleEvents'] = 'true';
|
||||
}
|
||||
|
||||
|
||||
$query = esc_url_raw( add_query_arg( $args, $query ) );
|
||||
|
||||
|
||||
$this->display_url = $query;
|
||||
|
||||
|
||||
if( isset( $_GET['gce_debug'] ) && $_GET['gce_debug'] == true ) {
|
||||
echo '<pre>' . $this->display_url . '</pre><br>';
|
||||
}
|
||||
|
||||
|
||||
$this->get_feed_data( $query );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make remote call to get the feed data
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
private function get_feed_data( $url ) {
|
||||
|
||||
private function get_feed_data( $url ) {
|
||||
|
||||
// First check for transient data to use
|
||||
if( false !== get_transient( 'gce_feed_' . $this->id ) ) {
|
||||
$this->events = get_transient( 'gce_feed_' . $this->id );
|
||||
} else {
|
||||
$raw_data = wp_remote_get( $url, array(
|
||||
'sslverify' => false, //sslverify is set to false to ensure https URLs work reliably. Data source is Google's servers, so is trustworthy
|
||||
'timeout' => 10 //Increase timeout from the default 5 seconds to ensure even large feeds are retrieved successfully
|
||||
) );
|
||||
$raw_data = wp_remote_get( $url, array( 'timeout' => 10 ) );
|
||||
//If $raw_data is a WP_Error, something went wrong
|
||||
if ( ! is_wp_error( $raw_data ) ) {
|
||||
//Attempt to convert the returned JSON into an array
|
||||
$raw_data = json_decode( $raw_data['body'], true );
|
||||
|
||||
|
||||
if( ! isset( $raw_data['error'] ) ) {
|
||||
//If decoding was successful
|
||||
if ( ! empty( $raw_data ) ) {
|
||||
@@ -205,7 +200,7 @@ class GCE_Feed {
|
||||
$this->error = $raw_data->get_error_message() . __( ' Please ensure your calendar ID is correct.', 'gce' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( ! empty( $this->error ) ) {
|
||||
if( current_user_can( 'manage_options' ) ) {
|
||||
echo $this->error;
|
||||
@@ -217,38 +212,41 @@ class GCE_Feed {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convert an ISO date/time to a UNIX timestamp
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
private function iso_to_ts( $iso ) {
|
||||
sscanf( $iso, "%u-%u-%uT%u:%u:%uZ", $year, $month, $day, $hour, $minute, $second );
|
||||
return mktime( $hour, $minute, $second, $month, $day, $year );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
private function get_feed_start() {
|
||||
|
||||
|
||||
$range = get_post_meta( $this->id, 'gce_display_mode', true );
|
||||
$use_range = ( ( $range == 'date-range-list' || $range == 'date-range-grid' ) ? true : false );
|
||||
|
||||
|
||||
if( $use_range ) {
|
||||
$start = get_post_meta( $this->id, 'gce_feed_range_start', true );
|
||||
|
||||
|
||||
$start = gce_date_unix( $start );
|
||||
|
||||
|
||||
$interval = 'date-range';
|
||||
|
||||
|
||||
} else {
|
||||
$start = get_post_meta( $this->id, 'gce_feed_start_num', true );
|
||||
$interval = get_post_meta( $this->id, 'gce_feed_start', true );
|
||||
|
||||
|
||||
if( empty( $start ) && $start !== '0' ) {
|
||||
$start = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch( $interval ) {
|
||||
case 'days':
|
||||
return time() - ( $start * 86400 );
|
||||
@@ -259,32 +257,35 @@ class GCE_Feed {
|
||||
case 'date-range':
|
||||
return $start;
|
||||
}
|
||||
|
||||
|
||||
// fall back just in case. Falls back to 1 year ago
|
||||
return time() - 31556926;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
private function get_feed_end() {
|
||||
|
||||
|
||||
$range = get_post_meta( $this->id, 'gce_display_mode', true );
|
||||
$use_range = ( ( $range == 'date-range-list' || $range == 'date-range-grid' ) ? true : false );
|
||||
|
||||
|
||||
if( $use_range ) {
|
||||
$end = get_post_meta( $this->id, 'gce_feed_range_end', true );
|
||||
|
||||
|
||||
$end = gce_date_unix( $end );
|
||||
|
||||
|
||||
$interval = 'date-range';
|
||||
|
||||
|
||||
} else {
|
||||
$end = get_post_meta( $this->id, 'gce_feed_end_num', true );
|
||||
$interval = get_post_meta( $this->id, 'gce_feed_end', true );
|
||||
|
||||
|
||||
if( empty( $end ) && $end !== '0' ) {
|
||||
$end = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch( $interval ) {
|
||||
case 'days':
|
||||
return time() + ( $end * 86400 );
|
||||
@@ -295,15 +296,15 @@ class GCE_Feed {
|
||||
case 'date-range':
|
||||
return mktime( 23, 59, 59, date( 'n', $end ), date( 'j', $end ), date( 'Y', $end ) );
|
||||
}
|
||||
|
||||
|
||||
// Falls back to 1 year ahead just in case
|
||||
return time() + 31556926;
|
||||
}
|
||||
|
||||
|
||||
function get_builder() {
|
||||
|
||||
|
||||
$this->builder = get_post( $this->id )->post_content;
|
||||
|
||||
|
||||
return $this->builder;
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/**
|
||||
* Register Google Calendar Events custom post type
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function gce_setup_cpt() {
|
||||
@@ -46,15 +46,15 @@ function gce_setup_cpt() {
|
||||
'menu_icon' => plugins_url( '/assets/gcal-icon-16x16.png', GCE_MAIN_FILE ),
|
||||
'supports' => array( 'title', 'editor' )
|
||||
);
|
||||
|
||||
|
||||
register_post_type( 'gce_feed', $args );
|
||||
|
||||
|
||||
// MUST ONLY RUN ONCE!
|
||||
if( false === get_option( 'gce_cpt_setup' ) ) {
|
||||
flush_rewrite_rules();
|
||||
update_option( 'gce_cpt_setup', 1 );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
add_action( 'init', 'gce_setup_cpt' );
|
||||
|
||||
@@ -88,7 +88,7 @@ add_filter( 'post_updated_messages', 'gce_feed_messages' );
|
||||
/**
|
||||
* Add post meta to tie in with the Google Calendar Events custom post type.
|
||||
* Also render sidebar meta boxes.
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function gce_cpt_meta() {
|
||||
@@ -101,7 +101,7 @@ add_action( 'add_meta_boxes', 'gce_cpt_meta' );
|
||||
|
||||
/**
|
||||
* Include view to display post meta.
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function gce_display_meta() {
|
||||
@@ -119,7 +119,7 @@ function gce_feed_sidebar_help() {
|
||||
|
||||
/**
|
||||
* Include view to display options in sidebar.
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function gce_display_options_meta() {
|
||||
@@ -128,14 +128,24 @@ function gce_display_options_meta() {
|
||||
|
||||
/**
|
||||
* Function to save post meta for the feed CPT
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @param int $post_id
|
||||
* @param WP_Post $post
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
function gce_save_meta( $post_id ) {
|
||||
function gce_save_meta( $post_id, $post ) {
|
||||
|
||||
if ( 'gce_feed' != $post->post_type ) {
|
||||
return $post_id;
|
||||
}
|
||||
|
||||
if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
||||
return $post_id;
|
||||
}
|
||||
|
||||
|
||||
if( isset( $_REQUEST['bulk_edit'] ) ) {
|
||||
return $post_id;
|
||||
}
|
||||
@@ -169,6 +179,7 @@ function gce_save_meta( $post_id ) {
|
||||
'gce_feed_use_range',
|
||||
'gce_feed_range_start',
|
||||
'gce_feed_range_end',
|
||||
'_feed_timezone_setting',
|
||||
// Display options
|
||||
'gce_display_start',
|
||||
'gce_display_start_text',
|
||||
@@ -193,28 +204,28 @@ function gce_save_meta( $post_id ) {
|
||||
foreach ( $post_meta_fields as $pmf ) {
|
||||
if ( isset( $_POST[$pmf] ) && ( ! empty( $_POST[$pmf] ) || $_POST[$pmf] == 0 ) ) {
|
||||
if( $pmf == 'gce_feed_url' ) {
|
||||
|
||||
|
||||
$id = $_POST[$pmf];
|
||||
|
||||
|
||||
// convert from URL if user enters a URL link (like the old versions required)
|
||||
if ( strpos( $id, 'https://www.google.com/calendar/feeds/' ) !== false ) {
|
||||
$id = str_replace( 'https://www.google.com/calendar/feeds/', '', $id );
|
||||
$id = str_replace( '/public/basic', '', $id );
|
||||
$id = str_replace( '%40', '@', $id );
|
||||
}
|
||||
|
||||
|
||||
// decode first before re-encoding it
|
||||
$id = urldecode( $id );
|
||||
$id = trim( $id );
|
||||
|
||||
|
||||
$at = strpos( $id, '@' );
|
||||
|
||||
|
||||
if ( $at !== false ) {
|
||||
$id = substr_replace( $id, urlencode( substr( $id, 0, $at ) ), 0, $at );
|
||||
}
|
||||
|
||||
|
||||
update_post_meta( $post_id, $pmf, $id );
|
||||
} elseif( $pmf == 'gce_time_format' || $pmf == 'gce_date_format' ) {
|
||||
} elseif( $pmf == 'gce_time_format' || $pmf == 'gce_date_format' || '_feed_timezone_setting' ) {
|
||||
update_post_meta( $post_id, $pmf, sanitize_text_field( $_POST[ $pmf ] ) );
|
||||
} else {
|
||||
update_post_meta( $post_id, $pmf, stripslashes( $_POST[ $pmf ] ) );
|
||||
@@ -224,20 +235,36 @@ function gce_save_meta( $post_id ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $post_id;
|
||||
}
|
||||
add_action( 'save_post', 'gce_save_meta' );
|
||||
add_action( 'save_post', 'gce_save_meta', 10, 2 );
|
||||
|
||||
|
||||
/**
|
||||
* Delete feed ids transient if a feed post type is deleted.
|
||||
*
|
||||
* @param int $id The id of the deleted post.
|
||||
*/
|
||||
function gce_delete_post( $id ) {
|
||||
$feeds = get_transient( 'gce_feed_ids' );
|
||||
if ( $feeds && is_array( $feeds ) ) {
|
||||
if ( in_array( $id, array_keys( $feeds ) ) ) {
|
||||
delete_transient( 'gce_feed_ids' );
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action( 'delete_post', 'gce_delete_post', 10, 1 );
|
||||
|
||||
|
||||
/**
|
||||
* Add column headers to our "All Feeds" CPT page
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function gce_add_column_headers( $defaults ) {
|
||||
|
||||
$new_columns = array(
|
||||
|
||||
$new_columns = array(
|
||||
'cb' => $defaults['cb'],
|
||||
'feed-id' => __( 'Feed ID', 'gce' ),
|
||||
'feed-sc' => __( 'Feed Shortcode', 'gce' ),
|
||||
@@ -246,60 +273,67 @@ function gce_add_column_headers( $defaults ) {
|
||||
|
||||
return array_merge( $defaults, $new_columns );
|
||||
}
|
||||
add_filter( 'manage_gce_feed_posts_columns', 'gce_add_column_headers' );
|
||||
add_filter( 'manage_gce_feed_posts_columns', 'gce_add_column_headers' );
|
||||
|
||||
|
||||
/**
|
||||
* Fill out the columns
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function gce_column_content( $column_name, $post_ID ) {
|
||||
|
||||
|
||||
switch ( $column_name ) {
|
||||
|
||||
case 'feed-id':
|
||||
case 'feed-id':
|
||||
echo $post_ID;
|
||||
break;
|
||||
case 'feed-sc':
|
||||
echo '<code>[gcal id="' . esc_attr( $post_ID ) . '"]</code>';
|
||||
?>
|
||||
<input
|
||||
name="gce_shortcode"
|
||||
class="gce-shortcode"
|
||||
readonly="readonly"
|
||||
value='[gcal id="<?php echo $post_ID; ?>"]'
|
||||
onclick="this.select();"
|
||||
/>
|
||||
<?php
|
||||
break;
|
||||
case 'display-type':
|
||||
$display = get_post_meta( $post_ID, 'gce_display_mode', true );
|
||||
|
||||
|
||||
if ( $display == 'grid' ) {
|
||||
echo __( 'Grid', 'gce' );
|
||||
} elseif ( $display == 'list' ) {
|
||||
echo __( 'List', 'gce' );
|
||||
} elseif ( $display == 'list-grouped' ) {
|
||||
} elseif ( $display == 'list-grouped' ) {
|
||||
echo __( 'Grouped List', 'gce' );
|
||||
} elseif ( $display == 'date-range' ) {
|
||||
echo __( 'Custom Date Range', 'gce' );
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
add_action( 'manage_gce_feed_posts_custom_column', 'gce_column_content', 10, 2 );
|
||||
|
||||
|
||||
/**
|
||||
* Add the "Clear Cache" action to the CPT action links
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function gce_cpt_actions( $actions, $post ) {
|
||||
if( $post->post_type == 'gce_feed' ) {
|
||||
$actions['clear_cache'] = '<a href="' . esc_url( add_query_arg( array( 'clear_cache' => $post->ID ) ) ) . '">' . __( 'Clear Cache', 'gce' ) . '</a>';
|
||||
}
|
||||
|
||||
return $actions;
|
||||
}
|
||||
add_filter( 'post_row_actions', 'gce_cpt_actions', 10, 2 );
|
||||
|
||||
|
||||
/**
|
||||
* Function to clear cache if on the post listing page
|
||||
*
|
||||
* Function to clear cache if on the post listing page.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function gce_clear_cache_link() {
|
||||
@@ -307,14 +341,133 @@ function gce_clear_cache_link() {
|
||||
$post_id = absint( $_REQUEST['clear_cache'] );
|
||||
|
||||
gce_clear_cache( $post_id );
|
||||
|
||||
|
||||
settings_errors( 'gce-notices' );
|
||||
}
|
||||
}
|
||||
add_action( 'admin_init', 'gce_clear_cache_link' );
|
||||
|
||||
|
||||
/**
|
||||
* Clear cache on post save.
|
||||
*
|
||||
* @param int $post_id
|
||||
*/
|
||||
function gce_clear_cache_on_save( $post_id ) {
|
||||
// Transient with calendar feed data.
|
||||
delete_transient( 'gce_feed_' . $post_id );
|
||||
// Transient with an associative array list of feed ids and their titles.
|
||||
delete_transient( 'gce_feed_ids' );
|
||||
}
|
||||
add_action( 'save_post_gce_feed', 'gce_clear_cache_on_save' );
|
||||
|
||||
/**
|
||||
* Adds a 'clear cache' option to bulk actions.
|
||||
*
|
||||
* It's done through jQuery since one can't write into bulk actions yet.
|
||||
* @link https://core.trac.wordpress.org/ticket/16031
|
||||
* @link https://www.skyverge.com/blog/add-custom-bulk-action/
|
||||
*/
|
||||
function gce_clear_cache_bulk_action_option() {
|
||||
|
||||
global $post_type;
|
||||
|
||||
if ( $post_type == 'gce_feed' ) {
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
jQuery('<option>')
|
||||
.val('clear_cache')
|
||||
.text('<?php _e( 'Clear Cache', 'gce' ); ?>')
|
||||
.appendTo("select[name='action']");
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
add_action( 'admin_footer-edit.php', 'gce_clear_cache_bulk_action_option' );
|
||||
|
||||
/**
|
||||
* Clear cache bulk action.
|
||||
*
|
||||
* @see gce_clear_cache_bulk_action_option()
|
||||
*/
|
||||
function gce_clear_cache_bulk_action() {
|
||||
|
||||
global $typenow;
|
||||
$post_type = $typenow;
|
||||
|
||||
if ( 'gce_feed' == $post_type ) {
|
||||
|
||||
$send_back = remove_query_arg( array( 'cleared' ), wp_get_referer() );
|
||||
if ( ! $send_back ) {
|
||||
$send_back = admin_url( 'edit.php?post_type=' . $post_type );
|
||||
}
|
||||
|
||||
// Get the bulk action.
|
||||
$wp_list_table = _get_list_table( 'WP_Posts_List_Table' );
|
||||
$action = $wp_list_table->current_action();
|
||||
if ( $action == 'clear_cache' ) {
|
||||
|
||||
// Security check (the referer is right).
|
||||
check_admin_referer( 'bulk-posts' );
|
||||
|
||||
// This is based on wp-admin/edit.php.
|
||||
$send_back = remove_query_arg(
|
||||
array( 'cleared', 'untrashed', 'deleted', 'ids' ),
|
||||
$send_back
|
||||
);
|
||||
|
||||
// Proceed if there are post ids selected.
|
||||
$post_ids = isset( $_REQUEST['post'] ) ? array_map( 'intval', $_REQUEST['post'] ) : '';
|
||||
if ( $post_ids ) {
|
||||
|
||||
// Add page num to query arg.
|
||||
$page_num = $wp_list_table->get_pagenum();
|
||||
$send_back = add_query_arg( 'paged', $page_num, $send_back );
|
||||
|
||||
switch ( $action ) {
|
||||
case 'clear_cache' :
|
||||
$cleared = 0;
|
||||
foreach ( $post_ids as $post_id ) {
|
||||
gce_clear_cache( $post_id );
|
||||
$cleared ++;
|
||||
}
|
||||
$send_back = add_query_arg( array(
|
||||
'cleared' => $cleared,
|
||||
'ids' => join( ',', $post_ids )
|
||||
),
|
||||
$send_back
|
||||
);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
$send_back = remove_query_arg(
|
||||
array( 'action', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view' ),
|
||||
$send_back
|
||||
);
|
||||
|
||||
wp_redirect( $send_back );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action( 'load-edit.php', 'gce_clear_cache_bulk_action' );
|
||||
|
||||
/**
|
||||
* Display an admin notice when the cache is cleared.
|
||||
*/
|
||||
function gce_clear_cache_bulk_action_notice() {
|
||||
global $post_type, $pagenow;
|
||||
if ( $pagenow == 'edit.php' && $post_type == 'gce_feed' && isset( $_REQUEST['cleared'] ) && (int) $_REQUEST['cleared'] ) {
|
||||
$message = sprintf( _n( 'Feed cache cleared.', 'Cleared cache for %s feeds.', $_REQUEST['cleared'], 'gce' ), number_format_i18n( $_REQUEST['cleared'] ) );
|
||||
echo '<div class="updated notice is-dismissible"><p>' . $message . '</p></div>';
|
||||
}
|
||||
}
|
||||
add_action( 'admin_notices', 'gce_clear_cache_bulk_action_notice' );
|
||||
@@ -2,22 +2,21 @@
|
||||
|
||||
/*
|
||||
* Function to display the calendar to the screen
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function gce_print_calendar( $feed_ids, $display = 'grid', $args = array(), $widget = false, $uid = null ) {
|
||||
|
||||
|
||||
// Set static unique ID for setting id attributes
|
||||
if( $uid == null ) {
|
||||
STATIC $uid = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Load scripts
|
||||
wp_enqueue_script( GCE_PLUGIN_SLUG . '-images-loaded' );
|
||||
wp_enqueue_script( GCE_PLUGIN_SLUG . '-qtip' );
|
||||
wp_enqueue_script( GCE_PLUGIN_SLUG . '-public' );
|
||||
|
||||
|
||||
$defaults = array(
|
||||
'title_text' => '',
|
||||
'sort' => 'asc',
|
||||
@@ -34,120 +33,120 @@ function gce_print_calendar( $feed_ids, $display = 'grid', $args = array(), $wid
|
||||
'range_start' => null,
|
||||
'show_tooltips' => null
|
||||
);
|
||||
|
||||
|
||||
$args = array_merge( $defaults, $args );
|
||||
|
||||
|
||||
extract( $args );
|
||||
|
||||
|
||||
$ids = explode( '-', str_replace( ' ', '', $feed_ids ) );
|
||||
|
||||
|
||||
//Create new display object, passing array of feed id(s)
|
||||
$d = new GCE_Display( $ids, $title_text, $sort );
|
||||
$markup = '';
|
||||
$start = current_time( 'timestamp' );
|
||||
|
||||
|
||||
if( $widget ) {
|
||||
foreach( $ids as $f ) {
|
||||
$paging = get_post_meta( $f, 'gce_paging_widget', true );
|
||||
$old_paging[] = get_post_meta( $f, 'gce_paging', true );
|
||||
|
||||
|
||||
if( $paging ) {
|
||||
update_post_meta( $f, 'gce_paging', true );
|
||||
}
|
||||
|
||||
|
||||
$paging_interval = get_post_meta( $f, 'gce_widget_paging_interval', true );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// If paging is not set then we need to set it now
|
||||
foreach( $ids as $id ) {
|
||||
if( $paging === null ) {
|
||||
$paging = get_post_meta( $id, 'gce_paging', true );
|
||||
}
|
||||
|
||||
|
||||
if( empty( $show_tooltips ) && $show_tooltips != 0 ) {
|
||||
$tooltips = get_post_meta( $id, 'gce_show_tooltips', true );
|
||||
} else {
|
||||
$tooltips = $show_tooltips;
|
||||
}
|
||||
|
||||
|
||||
if( ! empty( $tooltips ) && ( $tooltips === true || $tooltips == 'true' || $tooltips == '1' || $tooltips == 1 ) ) {
|
||||
$show_tooltips = 'true';
|
||||
} else {
|
||||
$show_tooltips = 'false';
|
||||
}
|
||||
|
||||
|
||||
if ( 'date-range-grid' === $display ) {
|
||||
$start = get_post_meta( $id, 'gce_feed_range_start', true );
|
||||
|
||||
|
||||
$start = gce_date_unix( $start );
|
||||
|
||||
|
||||
$year = date( 'Y', $start );
|
||||
$month = date( 'n', $start );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( 'grid' == $display ) {
|
||||
|
||||
|
||||
global $localize;
|
||||
|
||||
|
||||
$target = 'gce-' . $uid;
|
||||
|
||||
$localize[$target] = array(
|
||||
|
||||
$localize[$target] = array(
|
||||
'target_element' => $target,
|
||||
'feed_ids' => $feed_ids,
|
||||
'title_text' => $title_text,
|
||||
'type' => ( $widget == 1 ? 'widget' : 'page' ),
|
||||
'show_tooltips' => ( $show_tooltips == 'true' || $show_tooltips == '1' ? 'true' : 'false' )
|
||||
);
|
||||
|
||||
|
||||
if( $widget == 1 ) {
|
||||
$markup .= '<div class="gce-widget-grid gce-widget-' . esc_attr( $feed_ids ) . '" id="gce-' . $uid . '">';
|
||||
} else {
|
||||
$markup .= '<div class="gce-page-grid gce-page-grid-' . esc_attr( $feed_ids ) . '" id="gce-' . $uid . '">';
|
||||
}
|
||||
|
||||
|
||||
$markup .= $d->get_grid( $year, $month, $widget, $paging );
|
||||
$markup .= '</div>';
|
||||
|
||||
|
||||
|
||||
} else if( 'list' == $display || 'list-grouped' == $display ) {
|
||||
|
||||
|
||||
if( $widget ) {
|
||||
$markup = '<div class="gce-widget-list gce-widget-list-' . esc_attr( $feed_ids ) . '" id="gce-' . $uid . '">' . $d->get_list( $grouped, ( $start + $start_offset ), $paging, $paging_interval, $start_offset, $max_events, $paging_type, $max_num ) . '</div>';
|
||||
} else {
|
||||
$markup = '<div class="gce-page-list gce-page-list-' . esc_attr( $feed_ids ) . '" id="gce-' . $uid . '">' . $d->get_list( $grouped, ( $start + $start_offset ), $paging, $paging_interval, $start_offset, $max_events, $paging_type ) . '</div>';
|
||||
}
|
||||
} else if( 'date-range-list' == $display ) {
|
||||
|
||||
} else if( 'date-range-list' == $display ) {
|
||||
|
||||
$paging_interval = 'date-range';
|
||||
|
||||
|
||||
if( $widget ) {
|
||||
$markup = '<div class="gce-widget-list gce-widget-list-' . esc_attr( $feed_ids ) . '" id="gce-' . $uid . '">' . $d->get_list( $grouped, $range_start, false, $paging_interval, $start_offset, INF, $paging_type, $max_num ) . '</div>';
|
||||
} else {
|
||||
$markup = '<div class="gce-page-list gce-page-list-' . esc_attr( $feed_ids ) . '" id="gce-' . $uid . '">' . $d->get_list( $grouped, $range_start, false, $paging_interval, $start_offset, INF, $paging_type, INF ) . '</div>';
|
||||
}
|
||||
} elseif ( 'date-range-grid' == $display ) {
|
||||
|
||||
|
||||
global $localize;
|
||||
|
||||
|
||||
$target = 'gce-' . $uid;
|
||||
|
||||
$localize[$target] = array(
|
||||
|
||||
$localize[$target] = array(
|
||||
'target_element' => $target,
|
||||
'feed_ids' => $feed_ids,
|
||||
'title_text' => $title_text,
|
||||
'type' => ( $widget == 1 ? 'widget' : 'page' ),
|
||||
'show_tooltips' => ( $show_tooltips == 'true' || $show_tooltips == '1' ? 'true' : 'false' )
|
||||
);
|
||||
|
||||
|
||||
if( $widget ) {
|
||||
$markup = '<div class="gce-widget-grid gce-widget-grid-' . esc_attr( $feed_ids ) . '" id="gce-' . $uid . '">' . $d->get_grid( $year, $month, $widget, $paging ) . '</div>';
|
||||
} else {
|
||||
$markup = '<div class="gce-page-grid gce-page-grid-' . esc_attr( $feed_ids ) . '" id="gce-' . $uid . '">' . $d->get_grid( $year, $month, $widget, $paging ) . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Reset post meta
|
||||
if( $widget ) {
|
||||
$i = 0;
|
||||
@@ -157,19 +156,19 @@ function gce_print_calendar( $feed_ids, $display = 'grid', $args = array(), $wid
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$uid++;
|
||||
|
||||
|
||||
return $markup;
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX function for grid pagination
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function gce_ajax() {
|
||||
|
||||
|
||||
$uid = esc_html( $_POST['gce_uid'] );
|
||||
$ids = esc_html( $_POST['gce_feed_ids'] );
|
||||
$title = esc_html( $_POST['gce_title_text'] );
|
||||
@@ -177,7 +176,7 @@ function gce_ajax() {
|
||||
$year = esc_html( $_POST['gce_year'] );
|
||||
$paging = esc_html( $_POST['gce_paging'] );
|
||||
$type = esc_html( $_POST['gce_type'] );
|
||||
|
||||
|
||||
// Split ID and pass as UID to function
|
||||
$uid = explode( '-', $uid );
|
||||
|
||||
@@ -196,7 +195,7 @@ function gce_ajax() {
|
||||
$args['widget'] = 1;
|
||||
echo gce_print_calendar( $ids, 'grid', $args, 1, $uid[1] );
|
||||
}
|
||||
|
||||
|
||||
die();
|
||||
}
|
||||
add_action( 'wp_ajax_nopriv_gce_ajax', 'gce_ajax' );
|
||||
@@ -205,11 +204,11 @@ add_action( 'wp_ajax_gce_ajax', 'gce_ajax' );
|
||||
|
||||
/**
|
||||
* AJAX function for grid pagination
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function gce_ajax_list() {
|
||||
|
||||
|
||||
$grouped = esc_html( $_POST['gce_grouped'] );
|
||||
$start = esc_html( $_POST['gce_start'] );
|
||||
$ids = esc_html( $_POST['gce_feed_ids'] );
|
||||
@@ -220,7 +219,7 @@ function gce_ajax_list() {
|
||||
$paging_direction = esc_html( $_POST['gce_paging_direction'] );
|
||||
$start_offset = esc_html( $_POST['gce_start_offset'] );
|
||||
$paging_type = esc_html( $_POST['gce_paging_type'] );
|
||||
|
||||
|
||||
if( $paging_direction == 'back' ) {
|
||||
if( $paging_type == 'month' ) {
|
||||
|
||||
@@ -228,10 +227,10 @@ function gce_ajax_list() {
|
||||
$prev_month = mktime( 0, 0, 0, date( 'm', $start ) - 2, 1, date( 'Y', $start ) );
|
||||
$prev_interval_days = date( 't', $prev_month );
|
||||
$month_days = date( 't', $this_month );
|
||||
|
||||
|
||||
$int = $month_days + $prev_interval_days;
|
||||
$int = $int * 86400;
|
||||
|
||||
|
||||
$start = $start - ( $int );
|
||||
|
||||
$changed_month_days = date( 't', $start );
|
||||
@@ -239,18 +238,18 @@ function gce_ajax_list() {
|
||||
} else {
|
||||
$start = $start - ( $paging_interval * 2 );
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
if( $paging_type == 'month' ) {
|
||||
$days_in_month = date( 't', $start );
|
||||
$paging_interval = 86400 * $days_in_month;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$d = new GCE_Display( explode( '-', $ids ), $title_text, $sort );
|
||||
|
||||
echo $d->get_list( $grouped, $start, $paging, $paging_interval, $start_offset );
|
||||
|
||||
|
||||
die();
|
||||
}
|
||||
add_action( 'wp_ajax_nopriv_gce_ajax_list', 'gce_ajax_list' );
|
||||
@@ -259,11 +258,11 @@ add_action( 'wp_ajax_gce_ajax_list', 'gce_ajax_list' );
|
||||
|
||||
function gce_feed_content( $content ) {
|
||||
global $post;
|
||||
|
||||
|
||||
if( $post->post_type == 'gce_feed' ) {
|
||||
$content = '[gcal id="' . esc_attr( $post->ID ) . '"]';
|
||||
}
|
||||
|
||||
|
||||
return $content;
|
||||
}
|
||||
add_filter( 'the_content', 'gce_feed_content' );
|
||||
@@ -295,14 +294,14 @@ function gce_ga_campaign_url( $base_url, $source, $medium, $campaign ) {
|
||||
* Function to convert date format mm/dd/YYYY to unix timestamp
|
||||
*/
|
||||
function gce_date_unix( $date ) {
|
||||
|
||||
|
||||
if ( empty( $date ) ) {
|
||||
|
||||
|
||||
$current_time = current_time( 'timestamp' );
|
||||
|
||||
|
||||
$timestamp = mktime( 0, 0, 0, date( 'm', $current_time ), date( 'd', $current_time ), date( 'Y', $current_time ) );
|
||||
} else {
|
||||
|
||||
|
||||
$date = explode( '/', $date );
|
||||
|
||||
$month = $date[0];
|
||||
@@ -311,6 +310,69 @@ function gce_date_unix( $date ) {
|
||||
|
||||
$timestamp = mktime( 0, 0, 0, $month, $day, $year );
|
||||
}
|
||||
|
||||
|
||||
return $timestamp;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get WordPress timezone setting.
|
||||
*
|
||||
* Always returns a valid timezone string even when the setting is a GMT offset.
|
||||
*
|
||||
* @return null|string
|
||||
*/
|
||||
function gce_get_wp_timezone() {
|
||||
|
||||
$timezone = get_option( 'timezone_string' );
|
||||
|
||||
if ( empty( $timezone ) ) {
|
||||
|
||||
$gmt = get_option( 'gmt_offset' );
|
||||
|
||||
$timezone = gce_get_timezone_from_gmt_offset( $gmt );
|
||||
}
|
||||
|
||||
return $timezone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a timezone from a GMT offset.
|
||||
*
|
||||
* Converts a numeric offset into a valid timezone string.
|
||||
*
|
||||
* @param string|float $offset
|
||||
*
|
||||
* @return null|string
|
||||
*/
|
||||
function gce_get_timezone_from_gmt_offset( $offset ) {
|
||||
|
||||
if ( is_numeric( $offset ) ) {
|
||||
|
||||
if ( 0 == intval( $offset ) ) {
|
||||
return 'UTC';
|
||||
} else {
|
||||
$offset = floatval( $offset ) * 3600;
|
||||
}
|
||||
|
||||
$timezone = timezone_name_from_abbr( null, $offset, true );
|
||||
// This is buggy and might return false:
|
||||
// @see http://php.net/manual/en/function.timezone-name-from-abbr.php#86928
|
||||
// Therefore:
|
||||
if ( false == $timezone ) {
|
||||
$list = timezone_abbreviations_list();
|
||||
foreach ( $list as $abbr ) {
|
||||
foreach ( $abbr as $city ) {
|
||||
if ( $offset == $city['offset'] ) {
|
||||
return $city['timezone_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $timezone;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -97,9 +97,10 @@ function gce_generate_calendar( $year, $month, $days = array(), $day_name_length
|
||||
if ( isset( $days[$timestamp] ) && is_array( $days[$timestamp] ) ) {
|
||||
list( $link, $classes, $content ) = $days[$timestamp];
|
||||
$calendar .= '<td' . ( ( $classes ) ? ( ' class="' . esc_attr( $classes ) . '">' ) : '>' ) . ( ( $link ) ? ( '<a href="' . esc_url( $link ) . '"><span class="gce-day-number">' . esc_html( $day ) . '</span></a>' . $content ) : '<span class="gce-day-number">' . esc_html( $day ) . '</span>' . $content ) . '</td>';
|
||||
}else{
|
||||
$css_class = ( $timestamp < $time_now ) ? 'gce-day-past' : 'gce-day-future';
|
||||
$calendar .= '<td class="' . esc_attr( $css_class ) . '"><span class="gce-day-number">' . esc_html( $day ) . '</span></td>';
|
||||
} else {
|
||||
$css_class = $timestamp < $time_now ? ' gce-day-past ' : ' gce-day-future ';
|
||||
$css_class .= ' gce-week-day-' . strval( $weekday ) . ' ';
|
||||
$calendar .= '<td class="' . esc_attr( $css_class ) . '"><span class="gce-day-number">' . esc_html( $day ) . '</span></td>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function gce_register_settings() {
|
||||
|
||||
|
||||
$gce_settings = array(
|
||||
|
||||
/* General Settings */
|
||||
@@ -43,7 +43,7 @@ function gce_register_settings() {
|
||||
),
|
||||
'disable_css' => array(
|
||||
'id' => 'disable_css',
|
||||
'name' => __( 'Disable Plugin CSS', 'sc' ),
|
||||
'name' => __( 'Disable Plugin CSS', 'gce' ),
|
||||
'desc' => __( "If this option is checked, this plugin's CSS file will not be referenced.", 'gce' ),
|
||||
'type' => 'checkbox'
|
||||
),
|
||||
@@ -118,9 +118,9 @@ function gce_get_settings_field_args( $option, $section ) {
|
||||
|
||||
/*
|
||||
* Single checkbox callback function
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
function gce_checkbox_callback( $args ) {
|
||||
global $gce_options;
|
||||
@@ -139,9 +139,9 @@ function gce_checkbox_callback( $args ) {
|
||||
* Textbox callback function
|
||||
* Valid built-in size CSS class values:
|
||||
* small-text, regular-text, large-text
|
||||
*
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
function gce_text_callback( $args ) {
|
||||
global $gce_options;
|
||||
@@ -164,20 +164,19 @@ function gce_text_callback( $args ) {
|
||||
|
||||
/*
|
||||
* Function we can use to sanitize the input data and return it when saving options
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
function gce_settings_sanitize( $input ) {
|
||||
//add_settings_error( 'gce-notices', '', '', '' );
|
||||
return $input;
|
||||
return gce_sanitize_input( $input, 'sanitize_text_field' );
|
||||
}
|
||||
|
||||
/*
|
||||
* Default callback function if correct one does not exist
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
function gce_missing_callback( $args ) {
|
||||
printf( __( 'The callback function used for the <strong>%s</strong> setting is missing.', 'gce' ), $args['id'] );
|
||||
@@ -185,24 +184,24 @@ function gce_missing_callback( $args ) {
|
||||
|
||||
/*
|
||||
* Function used to return an array of all of the plugin settings
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
function gce_get_settings() {
|
||||
|
||||
// Set default settings
|
||||
// If this is the first time running we need to set the defaults
|
||||
if ( ! get_option( 'gce_upgrade_has_run' ) ) {
|
||||
|
||||
|
||||
$general = get_option( 'gce_settings_general' );
|
||||
|
||||
|
||||
$general['save_settings'] = 1;
|
||||
$general['always_enqueue'] = 1;
|
||||
|
||||
|
||||
update_option( 'gce_settings_general', $general );
|
||||
}
|
||||
|
||||
|
||||
$general_settings = is_array( get_option( 'gce_settings_general' ) ) ? get_option( 'gce_settings_general' ) : array();
|
||||
|
||||
return $general_settings;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/* global jQuery */
|
||||
( function ($) {
|
||||
"use strict";
|
||||
|
||||
$( document ).ready( function() {
|
||||
|
||||
// ThickBox hack: https://core.trac.wordpress.org/ticket/17249
|
||||
$( '#gce-insert-shortcode-button' ).on( 'click', function() {
|
||||
|
||||
// ThickBox creates a div which is not immediately available.
|
||||
setTimeout( function() {
|
||||
var thickBox = document.getElementById( 'TB_window');
|
||||
if ( thickBox != 'undefined' ) {
|
||||
thickBox.classList.add( 'gce-insert-shortcode-modal' );
|
||||
}
|
||||
var thickBoxTitle = document.getElementById( 'TB_title' );
|
||||
if ( thickBoxTitle != 'undefined' ) {
|
||||
thickBoxTitle.classList.add( 'gce-insert-shortcode-modal-title' );
|
||||
}
|
||||
}, 120 );
|
||||
|
||||
} );
|
||||
|
||||
// Add shortcode in WordPress post editor.
|
||||
$( '#gce-insert-shortcode').on( 'click', function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var feedId = $( '#gce-choose-gce-feed').val();
|
||||
wp.media.editor.insert( '[gcal id="' + feedId + '"] ' );
|
||||
|
||||
// Close Thickbox.
|
||||
tb_remove();
|
||||
|
||||
} );
|
||||
|
||||
});
|
||||
|
||||
}( jQuery ));
|
||||
@@ -13,7 +13,7 @@
|
||||
"use strict";
|
||||
|
||||
$(function () {
|
||||
|
||||
|
||||
// Show the hidden text box if custom date is selected (Events per Page)
|
||||
$('body').on('change', 'select[id*=events_per_page]', function() {
|
||||
|
||||
@@ -65,6 +65,11 @@
|
||||
|
||||
$('#publish').click();
|
||||
});
|
||||
|
||||
// Automatically change the width of shortcode pseudo-inputs.
|
||||
$( 'input.gce-shortcode' ).each( function() {
|
||||
$( this ).attr( 'size', $( this ).val().length );
|
||||
} );
|
||||
|
||||
});
|
||||
}(jQuery));
|
||||
Binary file not shown.
File diff suppressed because it is too large.
Load diff
Binary file not shown.
File diff suppressed because it is too large.
Load diff
Binary file not shown.
File diff suppressed because it is too large.
Load diff
Binary file not shown.
File diff suppressed because it is too large.
Load diff
Binary file not shown.
File diff suppressed because it is too large.
Load diff
Binary file not shown.
File diff suppressed because it is too large.
Load diff
Binary file not shown.
File diff suppressed because it is too large.
Load diff
Binary file not shown.
File diff suppressed because it is too large.
Load diff
Binary file not shown.
File diff suppressed because it is too large.
Load diff
Binary file not shown.
@@ -3,8 +3,9 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Google Calendar Events\n"
|
||||
"Report-Msgid-Bugs-To: http://support.codelayer.org\n"
|
||||
"POT-Creation-Date: 2015-03-24 01:49-0300\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/pderksen/WP-Google-Calendar-Events/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2015-08-07 18:22:35+00:00\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: CodeLayer <codelayer@codelayer.org>\n"
|
||||
"Language-Team: CodeLayer <info@codelayer.org>\n"
|
||||
@@ -22,42 +23,73 @@ msgstr ""
|
||||
"X-Generator: Poedit 1.7.5\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
|
||||
#: class-google-calendar-events-admin.php:126
|
||||
#: class-google-calendar-events-admin.php:127
|
||||
#: class-google-calendar-events-admin.php:218
|
||||
#: includes/register-settings.php:66
|
||||
#: class-google-calendar-events-admin.php:138
|
||||
#: class-google-calendar-events-admin.php:139
|
||||
#: class-google-calendar-events-admin.php:235
|
||||
#: includes/register-settings.php:68
|
||||
msgid "General Settings"
|
||||
msgstr "Configurações Gerais"
|
||||
|
||||
#: class-google-calendar-events-admin.php:206 views/widgets.php:27
|
||||
#. Plugin Name of the plugin/theme
|
||||
msgid "Google Calendar Events"
|
||||
msgstr "Google Calendar Events"
|
||||
|
||||
#: class-google-calendar-events-admin.php:219
|
||||
#: class-google-calendar-events-admin.php:236
|
||||
msgid "Feeds"
|
||||
msgstr "Feeds"
|
||||
|
||||
#: class-google-calendar-events.php:90
|
||||
#: class-google-calendar-events-admin.php:254
|
||||
#: class-google-calendar-events-admin.php:289
|
||||
#, fuzzy
|
||||
msgid "Add Calendar"
|
||||
msgstr "ID Google Calendar"
|
||||
|
||||
#: class-google-calendar-events-admin.php:290
|
||||
msgid "Add a calendar feed to your post."
|
||||
msgstr ""
|
||||
|
||||
#: class-google-calendar-events-admin.php:300
|
||||
#, fuzzy
|
||||
msgid "Insert Calendar"
|
||||
msgstr "ID Google Calendar"
|
||||
|
||||
#: class-google-calendar-events-admin.php:302
|
||||
msgid "Could not find any calendars to add to this post."
|
||||
msgstr ""
|
||||
|
||||
#: class-google-calendar-events-admin.php:303
|
||||
#, fuzzy
|
||||
msgid "Please add a new calendar feed first."
|
||||
msgstr "Por favor certifique-se que a ID do calendário está correta"
|
||||
|
||||
#: class-google-calendar-events.php:88
|
||||
msgid "Loading..."
|
||||
msgstr "Carregando..."
|
||||
|
||||
#: google-calendar-events.php:34
|
||||
msgid ""
|
||||
"Google Events Calendar requires PHP %1$s and WordPress %2$s to function "
|
||||
"properly. PHP version found: %3$s. WordPress installed version: %4$s. Please "
|
||||
"upgrade to meet the minimum requirements."
|
||||
msgstr ""
|
||||
|
||||
#: includes/admin/admin-functions.php:20
|
||||
msgid "Cache has been cleared for this feed."
|
||||
msgstr "Cache foi esvaziado para este feed."
|
||||
|
||||
#: includes/admin/admin-functions.php:35 includes/admin/admin-functions.php:55
|
||||
#: includes/admin/admin-functions.php:35 includes/admin/admin-functions.php:56
|
||||
msgid "Starts:"
|
||||
msgstr "Inicia:"
|
||||
|
||||
#: includes/admin/admin-functions.php:36 includes/admin/admin-functions.php:57
|
||||
#: includes/admin/admin-functions.php:36 includes/admin/admin-functions.php:58
|
||||
msgid "Ends:"
|
||||
msgstr "Termina:"
|
||||
|
||||
#: includes/admin/admin-functions.php:37 includes/admin/admin-functions.php:59
|
||||
#: includes/admin/admin-functions.php:37 includes/admin/admin-functions.php:60
|
||||
msgid "Location:"
|
||||
msgstr "Local:"
|
||||
|
||||
#: includes/admin/admin-functions.php:38 includes/admin/admin-functions.php:60
|
||||
#: includes/admin/admin-functions.php:38 includes/admin/admin-functions.php:61
|
||||
msgid "Description:"
|
||||
msgstr "Descrição:"
|
||||
|
||||
@@ -65,11 +97,12 @@ msgstr "Descrição:"
|
||||
msgid "More details..."
|
||||
msgstr "Mais detalhes..."
|
||||
|
||||
#: includes/admin/admin-functions.php:62
|
||||
#: includes/admin/admin-functions.php:63
|
||||
msgid "More Details"
|
||||
msgstr "Mais Detalhes"
|
||||
|
||||
#: includes/admin/admin-functions.php:76 includes/gce-feed-cpt.php:291
|
||||
#: includes/admin/admin-functions.php:77 includes/gce-feed-cpt.php:328
|
||||
#: includes/gce-feed-cpt.php:381
|
||||
msgid "Clear Cache"
|
||||
msgstr "Limpar Cache"
|
||||
|
||||
@@ -107,84 +140,74 @@ msgstr "Configurar feeds GCal"
|
||||
msgid "Hide this"
|
||||
msgstr "Esconder isto"
|
||||
|
||||
#: includes/class-gce-display.php:179 includes/class-gce-display.php:289
|
||||
#: includes/class-gce-display.php:193 includes/class-gce-display.php:303
|
||||
msgid "Back"
|
||||
msgstr "Voltar"
|
||||
|
||||
#: includes/class-gce-display.php:183 includes/class-gce-display.php:290
|
||||
#: includes/class-gce-display.php:197 includes/class-gce-display.php:304
|
||||
#: includes/class-gce-display.php:310 includes/php-calendar.php:61
|
||||
#: includes/php-calendar.php:63
|
||||
msgid "Next"
|
||||
msgstr "Próximo"
|
||||
|
||||
#: includes/class-gce-display.php:392
|
||||
#: includes/class-gce-display.php:309 includes/php-calendar.php:55
|
||||
#: includes/php-calendar.php:57
|
||||
msgid "Previous"
|
||||
msgstr ""
|
||||
|
||||
#: includes/class-gce-display.php:406
|
||||
msgid "No events to display."
|
||||
msgstr "Nenhum evento para exibir"
|
||||
|
||||
#: includes/class-gce-event.php:522
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:529
|
||||
msgid "%s year"
|
||||
msgstr "%s ano"
|
||||
|
||||
#: includes/class-gce-event.php:522
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:529
|
||||
msgid "%s years"
|
||||
msgstr "%s anos"
|
||||
|
||||
#: includes/class-gce-event.php:523
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:530
|
||||
msgid "%s month"
|
||||
msgstr "%s mês"
|
||||
|
||||
#: includes/class-gce-event.php:523
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:530
|
||||
msgid "%s months"
|
||||
msgstr "%s meses"
|
||||
|
||||
#: includes/class-gce-event.php:524
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:531
|
||||
msgid "%s week"
|
||||
msgstr "%s semana"
|
||||
|
||||
#: includes/class-gce-event.php:524
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:531
|
||||
msgid "%s weeks"
|
||||
msgstr "%s semanas"
|
||||
|
||||
#: includes/class-gce-event.php:525
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:532
|
||||
msgid "%s day"
|
||||
msgstr "%s dia"
|
||||
|
||||
#: includes/class-gce-event.php:525
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:532
|
||||
msgid "%s days"
|
||||
msgstr "%s dias"
|
||||
|
||||
#: includes/class-gce-event.php:526
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:533
|
||||
msgid "%s hour"
|
||||
msgstr "%s hora"
|
||||
|
||||
#: includes/class-gce-event.php:526
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:533
|
||||
msgid "%s hours"
|
||||
msgstr "%s horas"
|
||||
|
||||
#: includes/class-gce-event.php:527
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:534
|
||||
msgid "%s min"
|
||||
msgstr "%s min"
|
||||
|
||||
#: includes/class-gce-event.php:527
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:534
|
||||
msgid "%s mins"
|
||||
msgstr "%s mins"
|
||||
|
||||
#: includes/class-gce-event.php:555
|
||||
msgctxt "human_time_diff"
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: includes/class-gce-feed.php:93
|
||||
#: includes/class-gce-feed.php:94
|
||||
msgid ""
|
||||
"The Google Calendar ID has not been set. Please make sure to set it "
|
||||
"correctly in the Feed settings."
|
||||
@@ -192,7 +215,7 @@ msgstr ""
|
||||
"A ID do Google Calendar não foi definida. Por favor certifique-se de definí-"
|
||||
"la corretamente nas configurações do Feed."
|
||||
|
||||
#: includes/class-gce-feed.php:197
|
||||
#: includes/class-gce-feed.php:192
|
||||
msgid ""
|
||||
"Some data was retrieved, but could not be parsed successfully. Please ensure "
|
||||
"your feed settings are correct."
|
||||
@@ -200,11 +223,11 @@ msgstr ""
|
||||
"Dados foram recebidos, mas não foi possível interpretá-los corretamente. "
|
||||
"Certifique-se que suas configurações do feed estão corretas."
|
||||
|
||||
#: includes/class-gce-feed.php:200
|
||||
#: includes/class-gce-feed.php:195
|
||||
msgid "An error has occured."
|
||||
msgstr "Um erro ocorreu."
|
||||
|
||||
#: includes/class-gce-feed.php:205
|
||||
#: includes/class-gce-feed.php:200
|
||||
msgid " Please ensure your calendar ID is correct."
|
||||
msgstr "Por favor certifique-se que a ID do calendário está correta"
|
||||
|
||||
@@ -262,72 +285,73 @@ msgid "feed"
|
||||
msgstr "feed"
|
||||
|
||||
#: includes/gce-feed-cpt.php:75 includes/gce-feed-cpt.php:76
|
||||
#, php-format
|
||||
msgid "%4$s updated. %1$sView %2$s%3$s"
|
||||
msgstr "%4$s atualizado. %1$sVer %2$s%3$s"
|
||||
|
||||
#: includes/gce-feed-cpt.php:77
|
||||
#, php-format
|
||||
msgid "%4$s published. %1$sView %2$s%3$s"
|
||||
msgstr "%4$s publicado. %1$sVer %2$s%3$s"
|
||||
|
||||
#: includes/gce-feed-cpt.php:78
|
||||
#, php-format
|
||||
msgid "%4$s saved. %1$sView %2$s%3$s"
|
||||
msgstr "%4$s salvo. %1$sVer %2$s%3$s"
|
||||
|
||||
#: includes/gce-feed-cpt.php:79
|
||||
#, php-format
|
||||
msgid "%4$s submitted. %1$sView %2$s%3$s"
|
||||
msgstr "%4$s submetido. %1$sVer %2$s%3$s"
|
||||
|
||||
#: includes/gce-feed-cpt.php:80
|
||||
#, php-format
|
||||
msgid "%4$s draft updated. %1$sView %2$s%3$s"
|
||||
msgstr "Rascunho %4$s atualizado. %1$sVer %2$s%3$s"
|
||||
|
||||
#: includes/gce-feed-cpt.php:94
|
||||
#: includes/gce-feed-cpt.php:95
|
||||
msgid "Feed Settings"
|
||||
msgstr "Configurações de Feed"
|
||||
|
||||
#: includes/gce-feed-cpt.php:97
|
||||
msgid "Helpful Links"
|
||||
msgstr "Links úteis"
|
||||
msgid "Resources"
|
||||
msgstr ""
|
||||
|
||||
#: includes/gce-feed-cpt.php:99
|
||||
#: includes/gce-feed-cpt.php:98
|
||||
msgid "Display Options"
|
||||
msgstr "Opções de exibição"
|
||||
|
||||
#: includes/gce-feed-cpt.php:241
|
||||
#: includes/gce-feed-cpt.php:269
|
||||
msgid "Feed ID"
|
||||
msgstr "ID Feed"
|
||||
|
||||
#: includes/gce-feed-cpt.php:242 views/admin/gce-feed-meta-display.php:87
|
||||
#: includes/gce-feed-cpt.php:270 views/admin/gce-feed-meta-display.php:79
|
||||
msgid "Feed Shortcode"
|
||||
msgstr "Shortcode Feed"
|
||||
|
||||
#: includes/gce-feed-cpt.php:243
|
||||
#: includes/gce-feed-cpt.php:271
|
||||
msgid "Display Type"
|
||||
msgstr "Tipo de exibição"
|
||||
|
||||
#: includes/gce-feed-cpt.php:270
|
||||
#: includes/gce-feed-cpt.php:306
|
||||
msgid "Grid"
|
||||
msgstr "Grid"
|
||||
|
||||
#: includes/gce-feed-cpt.php:272 views/admin/gce-feed-meta-display.php:137
|
||||
#: includes/gce-feed-cpt.php:308 views/admin/gce-feed-meta-display.php:155
|
||||
#: views/widgets.php:295
|
||||
msgid "List"
|
||||
msgstr "Lista"
|
||||
|
||||
#: includes/gce-feed-cpt.php:274 views/admin/gce-feed-meta-display.php:138
|
||||
#: includes/gce-feed-cpt.php:310 views/admin/gce-feed-meta-display.php:156
|
||||
#: views/widgets.php:296
|
||||
msgid "Grouped List"
|
||||
msgstr "Lista agrupada"
|
||||
|
||||
#: includes/gce-feed-cpt.php:276
|
||||
#: includes/gce-feed-cpt.php:312
|
||||
msgid "Custom Date Range"
|
||||
msgstr "Faixa de datas personalizada"
|
||||
|
||||
#: includes/gce-feed-cpt.php:469
|
||||
msgid "Feed cache cleared."
|
||||
msgid_plural "Cleared cache for %s feeds."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: includes/register-settings.php:29
|
||||
msgid "Google API Key"
|
||||
msgstr "Chave API Google"
|
||||
@@ -349,7 +373,6 @@ msgstr ""
|
||||
"5 por segundo."
|
||||
|
||||
#: includes/register-settings.php:32
|
||||
#, php-format
|
||||
msgid ""
|
||||
"To avoid these limits <a href=\"%s\" target=\"_blank\">click here for "
|
||||
"instructions on how to generate and use your own Google API key.</a>"
|
||||
@@ -361,29 +384,42 @@ msgstr ""
|
||||
msgid "Always Enqueue Scripts & Styles"
|
||||
msgstr "Sempre carregar scripts e estilos"
|
||||
|
||||
#: includes/register-settings.php:45
|
||||
#: includes/register-settings.php:40
|
||||
msgid "Enqueue this plugin's scripts and styles on every post and page."
|
||||
msgstr ""
|
||||
|
||||
#: includes/register-settings.php:41
|
||||
msgid "Useful if using shortcodes in widgets or other non-standard locations."
|
||||
msgstr ""
|
||||
|
||||
#: includes/register-settings.php:46
|
||||
msgid "Disable Plugin CSS"
|
||||
msgstr "Desativar CSS do plugin"
|
||||
|
||||
#: includes/register-settings.php:46
|
||||
#: includes/register-settings.php:47
|
||||
msgid ""
|
||||
"If this option is checked, this plugin's CSS file will not be referenced."
|
||||
msgstr "Se a opção é marcada, o CSS deste plugin não será referenciado."
|
||||
|
||||
#: includes/register-settings.php:51
|
||||
#: includes/register-settings.php:52
|
||||
msgid "Save Settings"
|
||||
msgstr "Salvar Configurações"
|
||||
|
||||
#: includes/register-settings.php:52
|
||||
msgid ""
|
||||
"Save your settings when uninstalling this plugin. Useful when upgrading or "
|
||||
"re-installing."
|
||||
#: includes/register-settings.php:53
|
||||
#, fuzzy
|
||||
msgid "Save your settings when uninstalling this plugin."
|
||||
msgstr ""
|
||||
"Salvar suas configurações ao desinstalar este plugin, útil ao atualizar ou "
|
||||
"reinstalar."
|
||||
|
||||
#: includes/register-settings.php:181
|
||||
#, php-format
|
||||
#: includes/register-settings.php:54
|
||||
#, fuzzy
|
||||
msgid "Useful when upgrading or re-installing."
|
||||
msgstr ""
|
||||
"Salvar suas configurações ao desinstalar este plugin, útil ao atualizar ou "
|
||||
"reinstalar."
|
||||
|
||||
#: includes/register-settings.php:182
|
||||
msgid ""
|
||||
"The callback function used for the <strong>%s</strong> setting is missing."
|
||||
msgstr ""
|
||||
@@ -530,15 +566,15 @@ msgstr "Links abertos em nova aba / janela?"
|
||||
msgid "The link text to be displayed."
|
||||
msgstr "O texto do link para ser exibido."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:77
|
||||
#: views/admin/gce-feed-meta-display.php:69
|
||||
msgid "Want to be in the know?"
|
||||
msgstr "Quer estar a saber?"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:80
|
||||
#: views/admin/gce-feed-meta-display.php:72
|
||||
msgid "Get notified when new features are released"
|
||||
msgstr "Seja notificado quando novos recursos forem lançados"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:91
|
||||
#: views/admin/gce-feed-meta-display.php:90
|
||||
msgid ""
|
||||
"Copy and paste this shortcode to display this Google Calendar feed on any "
|
||||
"post or page."
|
||||
@@ -546,7 +582,7 @@ msgstr ""
|
||||
"Copie e cole este shortcode para exibir este Feed do Google Calendar em "
|
||||
"qualquer post ou página."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:92
|
||||
#: views/admin/gce-feed-meta-display.php:91
|
||||
msgid ""
|
||||
"To avoid display issues, make sure to paste the shortcode in the Text tab of "
|
||||
"the post editor."
|
||||
@@ -554,39 +590,47 @@ msgstr ""
|
||||
"Para evitar problemas de exibição, certifique-se de colar o shortcode na aba "
|
||||
"texto do editor do post/página."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:97
|
||||
#: views/admin/gce-feed-meta-display.php:96
|
||||
msgid "Google Calendar ID"
|
||||
msgstr "ID Google Calendar"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:101
|
||||
#: views/admin/gce-feed-meta-display.php:100
|
||||
msgid "The Google Calendar ID."
|
||||
msgstr "A ID do Google Calendar."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:101
|
||||
#: views/admin/gce-feed-meta-display.php:100
|
||||
msgid "Example"
|
||||
msgstr "Exemplo"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:103
|
||||
#: views/admin/gce-feed-meta-display.php:102
|
||||
msgid "How to find your Google Calendar ID"
|
||||
msgstr "Como encontrar ID do Google Calendar"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:109
|
||||
#: views/admin/gce-feed-meta-display.php:115
|
||||
msgid "Timezone"
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:122
|
||||
msgid "It is recommended to use the calendar default timezone."
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:127
|
||||
msgid "Search Query"
|
||||
msgstr "Consulta"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:112
|
||||
#: views/admin/gce-feed-meta-display.php:130
|
||||
msgid "Find and show events based on a search query."
|
||||
msgstr "Enontre e exiba eventos baseado em consulta."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:117
|
||||
#: views/admin/gce-feed-meta-display.php:135
|
||||
msgid "Expand Recurring Events?"
|
||||
msgstr "Expandir eventos recorrentes?"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:119
|
||||
#: views/admin/gce-feed-meta-display.php:137
|
||||
msgid "Yes"
|
||||
msgstr "Sim"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:120
|
||||
#: views/admin/gce-feed-meta-display.php:138
|
||||
msgid ""
|
||||
"Display recurring events each time they occur. If disabled, events will be "
|
||||
"displayed only the first time they occur."
|
||||
@@ -594,15 +638,15 @@ msgstr ""
|
||||
"Exibir eventos recorrentes cada vez que ocorrer. Se desativado, eventos "
|
||||
"aparecerão apenas na primeira vez que ocorre."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:125
|
||||
#: views/admin/gce-feed-meta-display.php:143
|
||||
msgid "Multiple Day Events"
|
||||
msgstr "Eventos de múltiplos dias."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:127
|
||||
#: views/admin/gce-feed-meta-display.php:145
|
||||
msgid "Show on each day"
|
||||
msgstr "Exibir em cada dia"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:128
|
||||
#: views/admin/gce-feed-meta-display.php:146
|
||||
msgid ""
|
||||
"Display multiple day events on each day that they span. If disabled, "
|
||||
"multiple day events will be displayed only on the first day they occur."
|
||||
@@ -610,65 +654,65 @@ msgstr ""
|
||||
"Exibir eventos de múltiplos dias em cada dia de sua duração. Se desativado, "
|
||||
"eventos de múltiplos dias serão exibidos apenas no primeiro dia que ocorrem. "
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:133
|
||||
#: views/admin/gce-feed-meta-display.php:151
|
||||
msgid "Display Mode"
|
||||
msgstr "Modo de exibição"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:136 views/widgets.php:294
|
||||
#: views/admin/gce-feed-meta-display.php:154 views/widgets.php:294
|
||||
msgid "Grid (Month view)"
|
||||
msgstr "Grade (Mês)"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:139 views/widgets.php:297
|
||||
#: views/admin/gce-feed-meta-display.php:157 views/widgets.php:297
|
||||
msgid "Custom Date Range (List)"
|
||||
msgstr "Intervalo de datas personalizado (lista)"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:140 views/widgets.php:298
|
||||
#: views/admin/gce-feed-meta-display.php:158 views/widgets.php:298
|
||||
msgid "Custom Date Range (Grid)"
|
||||
msgstr "Intervalo de datas personalizado (grade)"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:142
|
||||
#: views/admin/gce-feed-meta-display.php:160
|
||||
msgid "Select how to display this feed."
|
||||
msgstr "Selecione como exibir este feed."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:147
|
||||
#: views/admin/gce-feed-meta-display.php:165
|
||||
msgid "Events per Page"
|
||||
msgstr "Eventos por págian"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:150 views/widgets.php:313
|
||||
#: views/admin/gce-feed-meta-display.php:168 views/widgets.php:313
|
||||
msgid "Number of Days"
|
||||
msgstr "Número de dias"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:151 views/widgets.php:314
|
||||
#: views/admin/gce-feed-meta-display.php:169 views/widgets.php:314
|
||||
msgid "Number of Events"
|
||||
msgstr "Número de eventos"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:152 views/widgets.php:315
|
||||
#: views/admin/gce-feed-meta-display.php:170 views/widgets.php:315
|
||||
msgid "One Week"
|
||||
msgstr "Uma semana"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:153 views/widgets.php:316
|
||||
#: views/admin/gce-feed-meta-display.php:171 views/widgets.php:316
|
||||
msgid "One Month"
|
||||
msgstr "Um mês"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:158
|
||||
#: views/admin/gce-feed-meta-display.php:176
|
||||
msgid "How many events to display per page (List View only)."
|
||||
msgstr "Quantos eventos exibir por página (apenas lista)."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:163
|
||||
#: views/admin/gce-feed-meta-display.php:181
|
||||
msgid "Display Start Date Offset"
|
||||
msgstr "Offset de exibição de data inicial"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:166
|
||||
#: views/admin/gce-feed-meta-display.php:178 views/widgets.php:330
|
||||
#: views/admin/gce-feed-meta-display.php:184
|
||||
#: views/admin/gce-feed-meta-display.php:196 views/widgets.php:330
|
||||
msgid "Number of Days Back"
|
||||
msgstr "Número de dias antes"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:167
|
||||
#: views/admin/gce-feed-meta-display.php:193 views/widgets.php:331
|
||||
#: views/admin/gce-feed-meta-display.php:185
|
||||
#: views/admin/gce-feed-meta-display.php:215 views/widgets.php:331
|
||||
msgid "Number of Days Forward"
|
||||
msgstr "Número de dias depois"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:170 views/widgets.php:335
|
||||
#: views/admin/gce-feed-meta-display.php:188 views/widgets.php:335
|
||||
msgid ""
|
||||
"Change to initially display events on a date other than today (List View "
|
||||
"only)."
|
||||
@@ -676,96 +720,98 @@ msgstr ""
|
||||
"Mudar para exibir inicialmente eventos em uma data diferente de hoje (apenas "
|
||||
"lista)."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:175
|
||||
#: views/admin/gce-feed-meta-display.php:193
|
||||
msgid "Earliest Feed Event Date"
|
||||
msgstr "Primeira Data de evento do Feed"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:179
|
||||
#: views/admin/gce-feed-meta-display.php:197
|
||||
msgid "Number of Months Back"
|
||||
msgstr "Número de meses antes"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:180
|
||||
#: views/admin/gce-feed-meta-display.php:198
|
||||
msgid "Number of Years Back"
|
||||
msgstr "Número de anos antes"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:185
|
||||
#: views/admin/gce-feed-meta-display.php:204
|
||||
msgid "Set how far back to retrieve events regardless of initial display."
|
||||
msgstr ""
|
||||
"Defina o quão longe no passado para recuperar eventos independente da "
|
||||
"exibição inicial."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:190
|
||||
#: views/admin/gce-feed-meta-display.php:206
|
||||
msgid ""
|
||||
"<strong>Note:</strong> Total events are currently limited to 2,500 by the "
|
||||
"Google Calendar API."
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:212
|
||||
msgid "Latest Feed Event Date"
|
||||
msgstr "Última Data de evento do Feed"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:194
|
||||
#: views/admin/gce-feed-meta-display.php:216
|
||||
msgid "Number of Months Forward"
|
||||
msgstr "Número de meses depois"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:195
|
||||
#: views/admin/gce-feed-meta-display.php:217
|
||||
msgid "Number of Years Forward"
|
||||
msgstr "Número de anos depois"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:200
|
||||
#: views/admin/gce-feed-meta-display.php:222
|
||||
msgid ""
|
||||
"Set how far in the future to retrieve events regardless of initial display."
|
||||
msgstr ""
|
||||
"Defina o quão longe no futuro para recuperar eventos independente da "
|
||||
"exibição inicial."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:205
|
||||
#: views/admin/gce-feed-meta-display.php:227
|
||||
msgid "Use Custom Date Range"
|
||||
msgstr "Usar intervalo de datas personalizado"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:209
|
||||
msgctxt "separator between custom date range fields"
|
||||
msgid "to"
|
||||
msgstr "à"
|
||||
#: views/admin/gce-feed-meta-display.php:233
|
||||
msgid ""
|
||||
"Set a specific range of events to retrieve. Leaving either field blank will "
|
||||
"set the date to the current day."
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:211
|
||||
msgid "Set a specific range of events to retrieve."
|
||||
msgstr "Definir um intervalo específico de eventos para coletar."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:217 views/widgets.php:345
|
||||
#: views/admin/gce-feed-meta-display.php:239 views/widgets.php:345
|
||||
msgid "Show Paging Links"
|
||||
msgstr "Exibir links de paginação"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:220
|
||||
#: views/admin/gce-feed-meta-display.php:242
|
||||
msgid "Display Next and Back navigation links."
|
||||
msgstr "Exibir links de navegação Próximo e Anterior"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:225 views/widgets.php:348
|
||||
#: views/admin/gce-feed-meta-display.php:247 views/widgets.php:348
|
||||
msgid "Show Tooltips"
|
||||
msgstr "Exibir Tooltips"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:228
|
||||
#: views/admin/gce-feed-meta-display.php:250
|
||||
msgid "Display tooltips when hovering over events (Grid View only)."
|
||||
msgstr "Exibir dicas ao pair sobre eventos (apenas grade)."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:233
|
||||
#: views/admin/gce-feed-meta-display.php:255
|
||||
msgid "Date Format"
|
||||
msgstr "Formato de Data"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:237
|
||||
#: views/admin/gce-feed-meta-display.php:248
|
||||
#, php-format
|
||||
#: views/admin/gce-feed-meta-display.php:259
|
||||
#: views/admin/gce-feed-meta-display.php:270
|
||||
msgid "Use %sPHP date formatting%s."
|
||||
msgstr "Usar %sformato de data PHP%s."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:238
|
||||
#: views/admin/gce-feed-meta-display.php:249
|
||||
#: views/admin/gce-feed-meta-display.php:260
|
||||
#: views/admin/gce-feed-meta-display.php:271
|
||||
msgid "Leave blank to use the default."
|
||||
msgstr "Deixar em branco para padrão."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:244
|
||||
#: views/admin/gce-feed-meta-display.php:266
|
||||
msgid "Time Format"
|
||||
msgstr "Formato de Hora"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:255
|
||||
#: views/admin/gce-feed-meta-display.php:277
|
||||
msgid "Cache Duration"
|
||||
msgstr "Duração do cache"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:258
|
||||
#: views/admin/gce-feed-meta-display.php:280
|
||||
msgid ""
|
||||
"The length of time, in seconds, to cache the feed (43200 = 12 hours). If "
|
||||
"this feed changes regularly, you may want to reduce the cache duration."
|
||||
@@ -774,25 +820,27 @@ msgstr ""
|
||||
"feed se altera regularmente, você vai querer reduzir a duração do cache."
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:6
|
||||
msgid "Documentation & getting started"
|
||||
msgstr "Documentação & Primeiros passos"
|
||||
#, fuzzy
|
||||
msgid "Documentation"
|
||||
msgstr "Local"
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:11
|
||||
msgid "Community support forums"
|
||||
msgstr "Fóruns de suporte"
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:16
|
||||
msgid "Rate this plugin"
|
||||
msgstr "Avalie este plugin"
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:21
|
||||
msgid "View our roadmap & vote"
|
||||
msgstr "Veja nossos planos & vote"
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:26
|
||||
msgid "Get notified of new features"
|
||||
msgstr "Seja notificado de novos recursos"
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:21
|
||||
msgid "Your review helps more folks find our plugin. Thanks so much!"
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:25
|
||||
#, fuzzy
|
||||
msgid "Review this Plugin Now"
|
||||
msgstr "Avalie este plugin"
|
||||
|
||||
#: views/widgets.php:28
|
||||
msgid ""
|
||||
"Display a list or calendar grid of events from one or more Google Calendar "
|
||||
@@ -882,3 +930,53 @@ msgid ""
|
||||
msgstr ""
|
||||
"Exibir título na tooltop/lista (ex.: 'Eventos em 7 de março'). Listas "
|
||||
"agrupadas sempre tem um título exibido."
|
||||
|
||||
#. Plugin URI of the plugin/theme
|
||||
msgid "https://wordpress.org/plugins/google-calendar-events/"
|
||||
msgstr ""
|
||||
|
||||
#. Description of the plugin/theme
|
||||
msgid ""
|
||||
"Show off your Google calendar in grid (month) or list view, in a post, page "
|
||||
"or widget, and in a style that matches your site."
|
||||
msgstr ""
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "Moonstone Media"
|
||||
msgstr ""
|
||||
|
||||
#. Author URI of the plugin/theme
|
||||
msgid "http://moonstonemediagroup.com"
|
||||
msgstr ""
|
||||
|
||||
#: includes/class-gce-event.php:562
|
||||
msgctxt "human_time_diff"
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:118
|
||||
msgctxt "Use the calendar default setting"
|
||||
msgid "Calendar default"
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:119
|
||||
msgctxt "Use this site default setting"
|
||||
msgid "Site default"
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:231
|
||||
msgctxt "separator between custom date range fields"
|
||||
msgid "to"
|
||||
msgstr "à"
|
||||
|
||||
#~ msgid "Helpful Links"
|
||||
#~ msgstr "Links úteis"
|
||||
|
||||
#~ msgid "Set a specific range of events to retrieve."
|
||||
#~ msgstr "Definir um intervalo específico de eventos para coletar."
|
||||
|
||||
#~ msgid "Documentation & getting started"
|
||||
#~ msgstr "Documentação & Primeiros passos"
|
||||
|
||||
#~ msgid "View our roadmap & vote"
|
||||
#~ msgstr "Veja nossos planos & vote"
|
||||
Binary file not shown.
@@ -3,8 +3,9 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Google Calendar Events\n"
|
||||
"Report-Msgid-Bugs-To: http://support.codelayer.org\n"
|
||||
"POT-Creation-Date: 2015-03-24 01:49-0300\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/pderksen/WP-Google-Calendar-Events/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2015-08-07 18:22:35+00:00\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Vadim Rc <0xrcva@gmail.com>\n"
|
||||
"Language-Team: rcva <0xrcva@gmail.com>\n"
|
||||
@@ -23,42 +24,73 @@ msgstr ""
|
||||
"X-Generator: Poedit 1.7.6\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
|
||||
#: class-google-calendar-events-admin.php:126
|
||||
#: class-google-calendar-events-admin.php:127
|
||||
#: class-google-calendar-events-admin.php:218
|
||||
#: includes/register-settings.php:66
|
||||
#: class-google-calendar-events-admin.php:138
|
||||
#: class-google-calendar-events-admin.php:139
|
||||
#: class-google-calendar-events-admin.php:235
|
||||
#: includes/register-settings.php:68
|
||||
msgid "General Settings"
|
||||
msgstr "Основные настройки"
|
||||
|
||||
#: class-google-calendar-events-admin.php:206 views/widgets.php:27
|
||||
#. Plugin Name of the plugin/theme
|
||||
msgid "Google Calendar Events"
|
||||
msgstr "Google Calendar Events"
|
||||
|
||||
#: class-google-calendar-events-admin.php:219
|
||||
#: class-google-calendar-events-admin.php:236
|
||||
msgid "Feeds"
|
||||
msgstr "Каналы"
|
||||
|
||||
#: class-google-calendar-events.php:90
|
||||
#: class-google-calendar-events-admin.php:254
|
||||
#: class-google-calendar-events-admin.php:289
|
||||
#, fuzzy
|
||||
msgid "Add Calendar"
|
||||
msgstr "Идентификатор (ID) Google Calendar"
|
||||
|
||||
#: class-google-calendar-events-admin.php:290
|
||||
msgid "Add a calendar feed to your post."
|
||||
msgstr ""
|
||||
|
||||
#: class-google-calendar-events-admin.php:300
|
||||
#, fuzzy
|
||||
msgid "Insert Calendar"
|
||||
msgstr "Идентификатор (ID) Google Calendar"
|
||||
|
||||
#: class-google-calendar-events-admin.php:302
|
||||
msgid "Could not find any calendars to add to this post."
|
||||
msgstr ""
|
||||
|
||||
#: class-google-calendar-events-admin.php:303
|
||||
#, fuzzy
|
||||
msgid "Please add a new calendar feed first."
|
||||
msgstr "Пожалуйста, убедитесь что идентификатор (ID) календаря корректен"
|
||||
|
||||
#: class-google-calendar-events.php:88
|
||||
msgid "Loading..."
|
||||
msgstr "Загрузка..."
|
||||
|
||||
#: google-calendar-events.php:34
|
||||
msgid ""
|
||||
"Google Events Calendar requires PHP %1$s and WordPress %2$s to function "
|
||||
"properly. PHP version found: %3$s. WordPress installed version: %4$s. Please "
|
||||
"upgrade to meet the minimum requirements."
|
||||
msgstr ""
|
||||
|
||||
#: includes/admin/admin-functions.php:20
|
||||
msgid "Cache has been cleared for this feed."
|
||||
msgstr "Кэш этого потока очищен."
|
||||
|
||||
#: includes/admin/admin-functions.php:35 includes/admin/admin-functions.php:55
|
||||
#: includes/admin/admin-functions.php:35 includes/admin/admin-functions.php:56
|
||||
msgid "Starts:"
|
||||
msgstr "Начало:"
|
||||
|
||||
#: includes/admin/admin-functions.php:36 includes/admin/admin-functions.php:57
|
||||
#: includes/admin/admin-functions.php:36 includes/admin/admin-functions.php:58
|
||||
msgid "Ends:"
|
||||
msgstr "Конец:"
|
||||
|
||||
#: includes/admin/admin-functions.php:37 includes/admin/admin-functions.php:59
|
||||
#: includes/admin/admin-functions.php:37 includes/admin/admin-functions.php:60
|
||||
msgid "Location:"
|
||||
msgstr "Место:"
|
||||
|
||||
#: includes/admin/admin-functions.php:38 includes/admin/admin-functions.php:60
|
||||
#: includes/admin/admin-functions.php:38 includes/admin/admin-functions.php:61
|
||||
msgid "Description:"
|
||||
msgstr "Описание:"
|
||||
|
||||
@@ -66,11 +98,12 @@ msgstr "Описание:"
|
||||
msgid "More details..."
|
||||
msgstr "Подробнее..."
|
||||
|
||||
#: includes/admin/admin-functions.php:62
|
||||
#: includes/admin/admin-functions.php:63
|
||||
msgid "More Details"
|
||||
msgstr "Подробнее"
|
||||
|
||||
#: includes/admin/admin-functions.php:76 includes/gce-feed-cpt.php:291
|
||||
#: includes/admin/admin-functions.php:77 includes/gce-feed-cpt.php:328
|
||||
#: includes/gce-feed-cpt.php:381
|
||||
msgid "Clear Cache"
|
||||
msgstr "Очистить кеш"
|
||||
|
||||
@@ -108,84 +141,74 @@ msgstr "Настроить каналы GCal"
|
||||
msgid "Hide this"
|
||||
msgstr "Скрыть"
|
||||
|
||||
#: includes/class-gce-display.php:179 includes/class-gce-display.php:289
|
||||
#: includes/class-gce-display.php:193 includes/class-gce-display.php:303
|
||||
msgid "Back"
|
||||
msgstr "Назад"
|
||||
|
||||
#: includes/class-gce-display.php:183 includes/class-gce-display.php:290
|
||||
#: includes/class-gce-display.php:197 includes/class-gce-display.php:304
|
||||
#: includes/class-gce-display.php:310 includes/php-calendar.php:61
|
||||
#: includes/php-calendar.php:63
|
||||
msgid "Next"
|
||||
msgstr "Вперед"
|
||||
|
||||
#: includes/class-gce-display.php:392
|
||||
#: includes/class-gce-display.php:309 includes/php-calendar.php:55
|
||||
#: includes/php-calendar.php:57
|
||||
msgid "Previous"
|
||||
msgstr ""
|
||||
|
||||
#: includes/class-gce-display.php:406
|
||||
msgid "No events to display."
|
||||
msgstr "События отсутствуют"
|
||||
|
||||
#: includes/class-gce-event.php:522
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:529
|
||||
msgid "%s year"
|
||||
msgstr "%s год"
|
||||
|
||||
#: includes/class-gce-event.php:522
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:529
|
||||
msgid "%s years"
|
||||
msgstr "%s лет"
|
||||
|
||||
#: includes/class-gce-event.php:523
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:530
|
||||
msgid "%s month"
|
||||
msgstr "%s месяц"
|
||||
|
||||
#: includes/class-gce-event.php:523
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:530
|
||||
msgid "%s months"
|
||||
msgstr "%s месяцев"
|
||||
|
||||
#: includes/class-gce-event.php:524
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:531
|
||||
msgid "%s week"
|
||||
msgstr "%s неделя"
|
||||
|
||||
#: includes/class-gce-event.php:524
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:531
|
||||
msgid "%s weeks"
|
||||
msgstr "%s недель"
|
||||
|
||||
#: includes/class-gce-event.php:525
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:532
|
||||
msgid "%s day"
|
||||
msgstr "%s день"
|
||||
|
||||
#: includes/class-gce-event.php:525
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:532
|
||||
msgid "%s days"
|
||||
msgstr "%s дней"
|
||||
|
||||
#: includes/class-gce-event.php:526
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:533
|
||||
msgid "%s hour"
|
||||
msgstr "%s час"
|
||||
|
||||
#: includes/class-gce-event.php:526
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:533
|
||||
msgid "%s hours"
|
||||
msgstr "%s часов"
|
||||
|
||||
#: includes/class-gce-event.php:527
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:534
|
||||
msgid "%s min"
|
||||
msgstr "%s минута"
|
||||
|
||||
#: includes/class-gce-event.php:527
|
||||
#, php-format
|
||||
#: includes/class-gce-event.php:534
|
||||
msgid "%s mins"
|
||||
msgstr "%s минут"
|
||||
|
||||
#: includes/class-gce-event.php:555
|
||||
msgctxt "human_time_diff"
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: includes/class-gce-feed.php:93
|
||||
#: includes/class-gce-feed.php:94
|
||||
msgid ""
|
||||
"The Google Calendar ID has not been set. Please make sure to set it "
|
||||
"correctly in the Feed settings."
|
||||
@@ -193,7 +216,7 @@ msgstr ""
|
||||
"Не указан идентификатор (ID) от Google Calendar. Пожалуйста, убедитесь, что "
|
||||
"вы указали его в пункте \"Каналы\"."
|
||||
|
||||
#: includes/class-gce-feed.php:197
|
||||
#: includes/class-gce-feed.php:192
|
||||
msgid ""
|
||||
"Some data was retrieved, but could not be parsed successfully. Please ensure "
|
||||
"your feed settings are correct."
|
||||
@@ -201,11 +224,11 @@ msgstr ""
|
||||
"Часть данных была загружен, но не была успешно распознана. Пожалуйста, "
|
||||
"убедитесь что настройки верны."
|
||||
|
||||
#: includes/class-gce-feed.php:200
|
||||
#: includes/class-gce-feed.php:195
|
||||
msgid "An error has occured."
|
||||
msgstr "Произошла ошибка."
|
||||
|
||||
#: includes/class-gce-feed.php:205
|
||||
#: includes/class-gce-feed.php:200
|
||||
msgid " Please ensure your calendar ID is correct."
|
||||
msgstr "Пожалуйста, убедитесь что идентификатор (ID) календаря корректен"
|
||||
|
||||
@@ -263,72 +286,74 @@ msgid "feed"
|
||||
msgstr "канал"
|
||||
|
||||
#: includes/gce-feed-cpt.php:75 includes/gce-feed-cpt.php:76
|
||||
#, php-format
|
||||
msgid "%4$s updated. %1$sView %2$s%3$s"
|
||||
msgstr "%4$s обновлено. %1$sПросмотреть %2$s%3$s"
|
||||
|
||||
#: includes/gce-feed-cpt.php:77
|
||||
#, php-format
|
||||
msgid "%4$s published. %1$sView %2$s%3$s"
|
||||
msgstr "%4$s опубликовано. %1$sПросмотреть %2$s%3$s"
|
||||
|
||||
#: includes/gce-feed-cpt.php:78
|
||||
#, php-format
|
||||
msgid "%4$s saved. %1$sView %2$s%3$s"
|
||||
msgstr "%4$s сохранено. %1$sПросмотреть %2$s%3$s"
|
||||
|
||||
#: includes/gce-feed-cpt.php:79
|
||||
#, php-format
|
||||
msgid "%4$s submitted. %1$sView %2$s%3$s"
|
||||
msgstr "%4$s отправлено. %1$sПросмотреть %2$s%3$s"
|
||||
|
||||
#: includes/gce-feed-cpt.php:80
|
||||
#, php-format
|
||||
msgid "%4$s draft updated. %1$sView %2$s%3$s"
|
||||
msgstr "%4$s черновиков обновлено. %1$sView %2$s%3$s"
|
||||
|
||||
#: includes/gce-feed-cpt.php:94
|
||||
#: includes/gce-feed-cpt.php:95
|
||||
msgid "Feed Settings"
|
||||
msgstr "Настройки канала"
|
||||
|
||||
#: includes/gce-feed-cpt.php:97
|
||||
msgid "Helpful Links"
|
||||
msgstr "Полезные ссылки"
|
||||
msgid "Resources"
|
||||
msgstr ""
|
||||
|
||||
#: includes/gce-feed-cpt.php:99
|
||||
#: includes/gce-feed-cpt.php:98
|
||||
msgid "Display Options"
|
||||
msgstr "Настройки отображения"
|
||||
|
||||
#: includes/gce-feed-cpt.php:241
|
||||
#: includes/gce-feed-cpt.php:269
|
||||
msgid "Feed ID"
|
||||
msgstr "Идентификатор (ID) канала"
|
||||
|
||||
#: includes/gce-feed-cpt.php:242 views/admin/gce-feed-meta-display.php:87
|
||||
#: includes/gce-feed-cpt.php:270 views/admin/gce-feed-meta-display.php:79
|
||||
msgid "Feed Shortcode"
|
||||
msgstr "Шорткод канала"
|
||||
|
||||
#: includes/gce-feed-cpt.php:243
|
||||
#: includes/gce-feed-cpt.php:271
|
||||
msgid "Display Type"
|
||||
msgstr "Тип отображения"
|
||||
|
||||
#: includes/gce-feed-cpt.php:270
|
||||
#: includes/gce-feed-cpt.php:306
|
||||
msgid "Grid"
|
||||
msgstr "Сетка"
|
||||
|
||||
#: includes/gce-feed-cpt.php:272 views/admin/gce-feed-meta-display.php:137
|
||||
#: includes/gce-feed-cpt.php:308 views/admin/gce-feed-meta-display.php:155
|
||||
#: views/widgets.php:295
|
||||
msgid "List"
|
||||
msgstr "Список"
|
||||
|
||||
#: includes/gce-feed-cpt.php:274 views/admin/gce-feed-meta-display.php:138
|
||||
#: includes/gce-feed-cpt.php:310 views/admin/gce-feed-meta-display.php:156
|
||||
#: views/widgets.php:296
|
||||
msgid "Grouped List"
|
||||
msgstr "Группированный список"
|
||||
|
||||
#: includes/gce-feed-cpt.php:276
|
||||
#: includes/gce-feed-cpt.php:312
|
||||
msgid "Custom Date Range"
|
||||
msgstr "Установленный промежуток времени"
|
||||
|
||||
#: includes/gce-feed-cpt.php:469
|
||||
msgid "Feed cache cleared."
|
||||
msgid_plural "Cleared cache for %s feeds."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[2] ""
|
||||
|
||||
#: includes/register-settings.php:29
|
||||
msgid "Google API Key"
|
||||
msgstr "Ключ Google API"
|
||||
@@ -349,7 +374,6 @@ msgstr ""
|
||||
"Сейчас общий ключ ограничен 500,000 запросов в сутки и 5 запросами в секунду."
|
||||
|
||||
#: includes/register-settings.php:32
|
||||
#, php-format
|
||||
msgid ""
|
||||
"To avoid these limits <a href=\"%s\" target=\"_blank\">click here for "
|
||||
"instructions on how to generate and use your own Google API key.</a>"
|
||||
@@ -361,29 +385,43 @@ msgstr ""
|
||||
msgid "Always Enqueue Scripts & Styles"
|
||||
msgstr "Всегда подключать стили и скрипты"
|
||||
|
||||
#: includes/register-settings.php:45
|
||||
#: includes/register-settings.php:40
|
||||
msgid "Enqueue this plugin's scripts and styles on every post and page."
|
||||
msgstr ""
|
||||
|
||||
#: includes/register-settings.php:41
|
||||
msgid "Useful if using shortcodes in widgets or other non-standard locations."
|
||||
msgstr ""
|
||||
|
||||
#: includes/register-settings.php:46
|
||||
msgid "Disable Plugin CSS"
|
||||
msgstr "Отключить CSS плагина"
|
||||
|
||||
#: includes/register-settings.php:46
|
||||
#: includes/register-settings.php:47
|
||||
msgid ""
|
||||
"If this option is checked, this plugin's CSS file will not be referenced."
|
||||
msgstr "Если эта опция активна, CSS-файлы плагина будут проигнорированы."
|
||||
|
||||
#: includes/register-settings.php:51
|
||||
#: includes/register-settings.php:52
|
||||
msgid "Save Settings"
|
||||
msgstr "Сохранить настройки"
|
||||
|
||||
#: includes/register-settings.php:52
|
||||
msgid ""
|
||||
"Save your settings when uninstalling this plugin. Useful when upgrading or "
|
||||
"re-installing."
|
||||
#: includes/register-settings.php:53
|
||||
#, fuzzy
|
||||
msgid "Save your settings when uninstalling this plugin."
|
||||
msgstr ""
|
||||
"Сохранить настройки при удалении плагина. Полезно при обновлении и при "
|
||||
"переустановке."
|
||||
|
||||
#: includes/register-settings.php:181
|
||||
#, fuzzy, php-format
|
||||
#: includes/register-settings.php:54
|
||||
#, fuzzy
|
||||
msgid "Useful when upgrading or re-installing."
|
||||
msgstr ""
|
||||
"Сохранить настройки при удалении плагина. Полезно при обновлении и при "
|
||||
"переустановке."
|
||||
|
||||
#: includes/register-settings.php:182
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"The callback function used for the <strong>%s</strong> setting is missing."
|
||||
msgstr ""
|
||||
@@ -529,15 +567,15 @@ msgstr "Открывать ссылку в новом окне / вкладке?
|
||||
msgid "The link text to be displayed."
|
||||
msgstr "Ссылка, которая будут показана."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:77
|
||||
#: views/admin/gce-feed-meta-display.php:69
|
||||
msgid "Want to be in the know?"
|
||||
msgstr "Хотите быть в курсе?"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:80
|
||||
#: views/admin/gce-feed-meta-display.php:72
|
||||
msgid "Get notified when new features are released"
|
||||
msgstr "Получать уведомление о новых функциях"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:91
|
||||
#: views/admin/gce-feed-meta-display.php:90
|
||||
msgid ""
|
||||
"Copy and paste this shortcode to display this Google Calendar feed on any "
|
||||
"post or page."
|
||||
@@ -545,7 +583,7 @@ msgstr ""
|
||||
"Скопируйте этот шорткод чтобы добавлять этот Google Calendar на любую "
|
||||
"страницу или в запись."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:92
|
||||
#: views/admin/gce-feed-meta-display.php:91
|
||||
msgid ""
|
||||
"To avoid display issues, make sure to paste the shortcode in the Text tab of "
|
||||
"the post editor."
|
||||
@@ -553,39 +591,47 @@ msgstr ""
|
||||
"Чтобы избежать проблем с отображением, убедитесь что вы вставили шорткод в "
|
||||
"текстовое представление редактора"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:97
|
||||
#: views/admin/gce-feed-meta-display.php:96
|
||||
msgid "Google Calendar ID"
|
||||
msgstr "Идентификатор (ID) Google Calendar"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:101
|
||||
#: views/admin/gce-feed-meta-display.php:100
|
||||
msgid "The Google Calendar ID."
|
||||
msgstr "Идентификатор (ID) Google Calendar"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:101
|
||||
#: views/admin/gce-feed-meta-display.php:100
|
||||
msgid "Example"
|
||||
msgstr "Пример"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:103
|
||||
#: views/admin/gce-feed-meta-display.php:102
|
||||
msgid "How to find your Google Calendar ID"
|
||||
msgstr "Как найти идентификатор вашего Google Calendar"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:109
|
||||
#: views/admin/gce-feed-meta-display.php:115
|
||||
msgid "Timezone"
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:122
|
||||
msgid "It is recommended to use the calendar default timezone."
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:127
|
||||
msgid "Search Query"
|
||||
msgstr "Строка поиска"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:112
|
||||
#: views/admin/gce-feed-meta-display.php:130
|
||||
msgid "Find and show events based on a search query."
|
||||
msgstr "Найти и показать события, опираясь на поисковую строку."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:117
|
||||
#: views/admin/gce-feed-meta-display.php:135
|
||||
msgid "Expand Recurring Events?"
|
||||
msgstr "Отображать цикличные события?"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:119
|
||||
#: views/admin/gce-feed-meta-display.php:137
|
||||
msgid "Yes"
|
||||
msgstr "Да"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:120
|
||||
#: views/admin/gce-feed-meta-display.php:138
|
||||
msgid ""
|
||||
"Display recurring events each time they occur. If disabled, events will be "
|
||||
"displayed only the first time they occur."
|
||||
@@ -593,15 +639,15 @@ msgstr ""
|
||||
"Отображать каждое повторение цикличного события. Если выключено, будет "
|
||||
"показано только первое повторение."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:125
|
||||
#: views/admin/gce-feed-meta-display.php:143
|
||||
msgid "Multiple Day Events"
|
||||
msgstr "Многодневные события"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:127
|
||||
#: views/admin/gce-feed-meta-display.php:145
|
||||
msgid "Show on each day"
|
||||
msgstr "Показывать все дни"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:128
|
||||
#: views/admin/gce-feed-meta-display.php:146
|
||||
msgid ""
|
||||
"Display multiple day events on each day that they span. If disabled, "
|
||||
"multiple day events will be displayed only on the first day they occur."
|
||||
@@ -610,65 +656,65 @@ msgstr ""
|
||||
"происходят. Если отключено, многодневные события будут показаны только в "
|
||||
"день своего начала."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:133
|
||||
#: views/admin/gce-feed-meta-display.php:151
|
||||
msgid "Display Mode"
|
||||
msgstr "Режим отображения"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:136 views/widgets.php:294
|
||||
#: views/admin/gce-feed-meta-display.php:154 views/widgets.php:294
|
||||
msgid "Grid (Month view)"
|
||||
msgstr "Сетка (по месяцам)"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:139 views/widgets.php:297
|
||||
#: views/admin/gce-feed-meta-display.php:157 views/widgets.php:297
|
||||
msgid "Custom Date Range (List)"
|
||||
msgstr "В рамках определенного промежутка (список)"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:140 views/widgets.php:298
|
||||
#: views/admin/gce-feed-meta-display.php:158 views/widgets.php:298
|
||||
msgid "Custom Date Range (Grid)"
|
||||
msgstr "В рамках определенного промежутка (сетка)"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:142
|
||||
#: views/admin/gce-feed-meta-display.php:160
|
||||
msgid "Select how to display this feed."
|
||||
msgstr "Выберите, в каком режиме показывать этот канал."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:147
|
||||
#: views/admin/gce-feed-meta-display.php:165
|
||||
msgid "Events per Page"
|
||||
msgstr "Событий в день"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:150 views/widgets.php:313
|
||||
#: views/admin/gce-feed-meta-display.php:168 views/widgets.php:313
|
||||
msgid "Number of Days"
|
||||
msgstr "Количество дней"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:151 views/widgets.php:314
|
||||
#: views/admin/gce-feed-meta-display.php:169 views/widgets.php:314
|
||||
msgid "Number of Events"
|
||||
msgstr "Количество событий"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:152 views/widgets.php:315
|
||||
#: views/admin/gce-feed-meta-display.php:170 views/widgets.php:315
|
||||
msgid "One Week"
|
||||
msgstr "Одна неделя"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:153 views/widgets.php:316
|
||||
#: views/admin/gce-feed-meta-display.php:171 views/widgets.php:316
|
||||
msgid "One Month"
|
||||
msgstr "Один месяц"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:158
|
||||
#: views/admin/gce-feed-meta-display.php:176
|
||||
msgid "How many events to display per page (List View only)."
|
||||
msgstr "Как много событий отображать на каждой странице (только для списка)."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:163
|
||||
#: views/admin/gce-feed-meta-display.php:181
|
||||
msgid "Display Start Date Offset"
|
||||
msgstr "Показывать смещение даты начала"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:166
|
||||
#: views/admin/gce-feed-meta-display.php:178 views/widgets.php:330
|
||||
#: views/admin/gce-feed-meta-display.php:184
|
||||
#: views/admin/gce-feed-meta-display.php:196 views/widgets.php:330
|
||||
msgid "Number of Days Back"
|
||||
msgstr "Количество дней до"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:167
|
||||
#: views/admin/gce-feed-meta-display.php:193 views/widgets.php:331
|
||||
#: views/admin/gce-feed-meta-display.php:185
|
||||
#: views/admin/gce-feed-meta-display.php:215 views/widgets.php:331
|
||||
msgid "Number of Days Forward"
|
||||
msgstr "Количество дней после"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:170 views/widgets.php:335
|
||||
#: views/admin/gce-feed-meta-display.php:188 views/widgets.php:335
|
||||
msgid ""
|
||||
"Change to initially display events on a date other than today (List View "
|
||||
"only)."
|
||||
@@ -676,98 +722,100 @@ msgstr ""
|
||||
"Измените чтобы изнчально показывать события на дни, отличные от текущего "
|
||||
"(только для списка)."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:175
|
||||
#: views/admin/gce-feed-meta-display.php:193
|
||||
msgid "Earliest Feed Event Date"
|
||||
msgstr "Дата самого раннего события"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:179
|
||||
#: views/admin/gce-feed-meta-display.php:197
|
||||
#, fuzzy
|
||||
msgid "Number of Months Back"
|
||||
msgstr "Количество прошедших месяцев"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:180
|
||||
#: views/admin/gce-feed-meta-display.php:198
|
||||
#, fuzzy
|
||||
msgid "Number of Years Back"
|
||||
msgstr "Количество прошедших лет"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:185
|
||||
#: views/admin/gce-feed-meta-display.php:204
|
||||
#, fuzzy
|
||||
msgid "Set how far back to retrieve events regardless of initial display."
|
||||
msgstr "Укажите, насколько давние события загружать."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:190
|
||||
#: views/admin/gce-feed-meta-display.php:206
|
||||
msgid ""
|
||||
"<strong>Note:</strong> Total events are currently limited to 2,500 by the "
|
||||
"Google Calendar API."
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:212
|
||||
msgid "Latest Feed Event Date"
|
||||
msgstr "Дата самого позднего события"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:194
|
||||
#: views/admin/gce-feed-meta-display.php:216
|
||||
#, fuzzy
|
||||
msgid "Number of Months Forward"
|
||||
msgstr "Количество грядущих месяцев"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:195
|
||||
#: views/admin/gce-feed-meta-display.php:217
|
||||
#, fuzzy
|
||||
msgid "Number of Years Forward"
|
||||
msgstr "Количество грядущих лет"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:200
|
||||
#: views/admin/gce-feed-meta-display.php:222
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Set how far in the future to retrieve events regardless of initial display."
|
||||
msgstr "Укажите, насколько будущие события загружать."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:205
|
||||
#: views/admin/gce-feed-meta-display.php:227
|
||||
msgid "Use Custom Date Range"
|
||||
msgstr "Использовать определенный промежуток"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:209
|
||||
msgctxt "separator between custom date range fields"
|
||||
msgid "to"
|
||||
msgstr "по"
|
||||
#: views/admin/gce-feed-meta-display.php:233
|
||||
msgid ""
|
||||
"Set a specific range of events to retrieve. Leaving either field blank will "
|
||||
"set the date to the current day."
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:211
|
||||
msgid "Set a specific range of events to retrieve."
|
||||
msgstr "Укажите промежуток для отбора событий."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:217 views/widgets.php:345
|
||||
#: views/admin/gce-feed-meta-display.php:239 views/widgets.php:345
|
||||
msgid "Show Paging Links"
|
||||
msgstr "Показать ссылки перехода со страницы на страницу"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:220
|
||||
#: views/admin/gce-feed-meta-display.php:242
|
||||
msgid "Display Next and Back navigation links."
|
||||
msgstr "Показывать навигационные ссылки \"Назад\" и \"Вперед\"."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:225 views/widgets.php:348
|
||||
#: views/admin/gce-feed-meta-display.php:247 views/widgets.php:348
|
||||
msgid "Show Tooltips"
|
||||
msgstr "Показывать подсказки"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:228
|
||||
#: views/admin/gce-feed-meta-display.php:250
|
||||
msgid "Display tooltips when hovering over events (Grid View only)."
|
||||
msgstr "Показывать всплывающие подсказки над событиями (только для сетки)."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:233
|
||||
#: views/admin/gce-feed-meta-display.php:255
|
||||
msgid "Date Format"
|
||||
msgstr "Формат даты"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:237
|
||||
#: views/admin/gce-feed-meta-display.php:248
|
||||
#, php-format
|
||||
#: views/admin/gce-feed-meta-display.php:259
|
||||
#: views/admin/gce-feed-meta-display.php:270
|
||||
msgid "Use %sPHP date formatting%s."
|
||||
msgstr "Используете правила %sформатирования даты в PHP%s."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:238
|
||||
#: views/admin/gce-feed-meta-display.php:249
|
||||
#: views/admin/gce-feed-meta-display.php:260
|
||||
#: views/admin/gce-feed-meta-display.php:271
|
||||
msgid "Leave blank to use the default."
|
||||
msgstr "Оставьте незаполненным чтобы использовать значение по умолчанию."
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:244
|
||||
#: views/admin/gce-feed-meta-display.php:266
|
||||
msgid "Time Format"
|
||||
msgstr "Формат времени"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:255
|
||||
#: views/admin/gce-feed-meta-display.php:277
|
||||
msgid "Cache Duration"
|
||||
msgstr "Время жизни кеша"
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:258
|
||||
#: views/admin/gce-feed-meta-display.php:280
|
||||
msgid ""
|
||||
"The length of time, in seconds, to cache the feed (43200 = 12 hours). If "
|
||||
"this feed changes regularly, you may want to reduce the cache duration."
|
||||
@@ -776,25 +824,27 @@ msgstr ""
|
||||
"изменяется регулярно, возможно вы захотите уменьшить время жизни кеша."
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:6
|
||||
msgid "Documentation & getting started"
|
||||
msgstr "Документация и краткая инструкция"
|
||||
#, fuzzy
|
||||
msgid "Documentation"
|
||||
msgstr "Место"
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:11
|
||||
msgid "Community support forums"
|
||||
msgstr "Форумы поддержки сообщества"
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:16
|
||||
msgid "Rate this plugin"
|
||||
msgstr "Оцените этот плагин"
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:21
|
||||
msgid "View our roadmap & vote"
|
||||
msgstr "Посмотрите наши планы развития и проголосуйте"
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:26
|
||||
msgid "Get notified of new features"
|
||||
msgstr "Получать уведомления о новых функциях"
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:21
|
||||
msgid "Your review helps more folks find our plugin. Thanks so much!"
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-sidebar-help.php:25
|
||||
#, fuzzy
|
||||
msgid "Review this Plugin Now"
|
||||
msgstr "Оцените этот плагин"
|
||||
|
||||
#: views/widgets.php:28
|
||||
msgid ""
|
||||
"Display a list or calendar grid of events from one or more Google Calendar "
|
||||
@@ -886,3 +936,53 @@ msgid ""
|
||||
msgstr ""
|
||||
"Показывать название на всплывающей подсказке / элементе списка (например, "
|
||||
"'События на 7ое марта'). В группированном списке названия выводятся всегда."
|
||||
|
||||
#. Plugin URI of the plugin/theme
|
||||
msgid "https://wordpress.org/plugins/google-calendar-events/"
|
||||
msgstr ""
|
||||
|
||||
#. Description of the plugin/theme
|
||||
msgid ""
|
||||
"Show off your Google calendar in grid (month) or list view, in a post, page "
|
||||
"or widget, and in a style that matches your site."
|
||||
msgstr ""
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "Moonstone Media"
|
||||
msgstr ""
|
||||
|
||||
#. Author URI of the plugin/theme
|
||||
msgid "http://moonstonemediagroup.com"
|
||||
msgstr ""
|
||||
|
||||
#: includes/class-gce-event.php:562
|
||||
msgctxt "human_time_diff"
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:118
|
||||
msgctxt "Use the calendar default setting"
|
||||
msgid "Calendar default"
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:119
|
||||
msgctxt "Use this site default setting"
|
||||
msgid "Site default"
|
||||
msgstr ""
|
||||
|
||||
#: views/admin/gce-feed-meta-display.php:231
|
||||
msgctxt "separator between custom date range fields"
|
||||
msgid "to"
|
||||
msgstr "по"
|
||||
|
||||
#~ msgid "Helpful Links"
|
||||
#~ msgstr "Полезные ссылки"
|
||||
|
||||
#~ msgid "Set a specific range of events to retrieve."
|
||||
#~ msgstr "Укажите промежуток для отбора событий."
|
||||
|
||||
#~ msgid "Documentation & getting started"
|
||||
#~ msgstr "Документация и краткая инструкция"
|
||||
|
||||
#~ msgid "View our roadmap & vote"
|
||||
#~ msgstr "Посмотрите наши планы развития и проголосуйте"
|
||||
Binary file not shown.
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File renamed without changes.
@@ -3,9 +3,8 @@ Contributors: pderksen, nickyoung87, nekojira, rosshanney
|
||||
Tags: google calendar, google, calendar, events, gcal
|
||||
Requires at least: 3.9
|
||||
Tested up to: 4.3
|
||||
Stable tag: 2.2.6
|
||||
Stable tag: 2.2.8
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget.
|
||||
|
||||
@@ -28,7 +27,7 @@ Parses Google Calendar feeds and displays the events as a calendar grid or list
|
||||
###Updates###
|
||||
|
||||
* [Get notified when new features are released](http://eepurl.com/0_VsT)
|
||||
* [Follow this project on Github](https://github.com/pderksen/WP-Google-Calendar-Events)
|
||||
* [Follow this project on Github](https://github.com/moonstonemedia/WP-Google-Calendar-Events)
|
||||
|
||||
This plugin was originally created by [Ross Hanney](http://www.rhanney.co.uk), a web developer based in the UK specialising in WordPress and PHP.
|
||||
|
||||
@@ -54,7 +53,7 @@ There are three ways to install this plugin.
|
||||
1. In your Admin, go to menu Plugins > Add.
|
||||
1. Search for `Google Calendar`.
|
||||
1. Find the plugin that's labeled `Google Calendar Events`.
|
||||
1. Look for the author name `Phil Derksen` on the plugin.
|
||||
1. Look for the author name `Moonstone Media` on the plugin.
|
||||
1. Click to install.
|
||||
1. Activate the plugin.
|
||||
1. A new menu item `GCal Events` will appear in the main menu.
|
||||
@@ -90,6 +89,22 @@ There are three ways to install this plugin.
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 2.2.8 - August 7, 2015 =
|
||||
|
||||
* Fix: Improved security when saving plugin settings.
|
||||
* Fix: Added URL encoding to fix some issues with API keys containing special characters.
|
||||
* Tweak: Use calendar feed timezone or website timezone (default calendar).
|
||||
|
||||
= 2.2.7 - July 31, 2015 =
|
||||
|
||||
* Feature: Added an 'Add Calendar' button to quickly add a shortcode in posts.
|
||||
* Fix: Reverted register scripts hook to init.
|
||||
* Translations: Updated French translations
|
||||
* Tweak: Flush permalinks on plugin activation and deactivation.
|
||||
* Tweak: Added `[if-not-location]` event builder conditional shortcode.
|
||||
* Tweak: Added a 'gce_no_events_message_text' filter when no events are found.
|
||||
* Tweak: Added a clear cache bulk action for clearing caches of multiple feeds.
|
||||
|
||||
= 2.2.6 - July 16, 2015 =
|
||||
|
||||
* Plugin performs a requirements check to ensure users are running a recent version of WordPress.
|
||||
@@ -445,4 +460,4 @@ There are three ways to install this plugin.
|
||||
|
||||
= 2.1.0 =
|
||||
|
||||
Updated to use Google Calendar API version 3. Version 2 deprecated on Nov. 17, 2014.
|
||||
Updated to use Google Calendar API version 3. Version 2 deprecated on Nov. 17, 2014.
|
||||
@@ -10,14 +10,14 @@
|
||||
*/
|
||||
|
||||
global $post;
|
||||
|
||||
|
||||
$post_id = $post->ID;
|
||||
|
||||
|
||||
// Clear the cache if the button was clicked to do so
|
||||
if( isset( $_GET['clear_cache'] ) && $_GET['clear_cache'] == 1 ) {
|
||||
gce_clear_cache( $post_id );
|
||||
}
|
||||
|
||||
|
||||
// Load up all post meta data
|
||||
$gce_feed_url = get_post_meta( $post->ID, 'gce_feed_url', true );
|
||||
$gce_date_format = get_post_meta( $post->ID, 'gce_date_format', true );
|
||||
@@ -38,10 +38,10 @@
|
||||
$gce_feed_end_num = get_post_meta( $post->ID, 'gce_feed_end_num', true );
|
||||
$gce_feed_range_start = get_post_meta( $post->ID, 'gce_feed_range_start', true );
|
||||
$gce_feed_range_end = get_post_meta( $post->ID, 'gce_feed_range_end', true );
|
||||
|
||||
|
||||
$range = selected( $gce_display_mode, 'date-range-list', false ) || selected( $gce_display_mode, 'date-range-grid', false );
|
||||
$use_range = ( $range ? true : false );
|
||||
|
||||
|
||||
if( empty( $gce_events_per_page ) ) {
|
||||
$gce_events_per_page = 'days';
|
||||
}
|
||||
@@ -51,15 +51,15 @@
|
||||
if( empty( $gce_list_start_offset_num ) ) {
|
||||
$gce_list_start_offset_num = 0;
|
||||
}
|
||||
|
||||
|
||||
if( empty( $gce_feed_start ) ) {
|
||||
$gce_feed_start = 'years';
|
||||
}
|
||||
|
||||
|
||||
if( empty( $gce_feed_end ) ) {
|
||||
$gce_feed_end = 'years';
|
||||
}
|
||||
|
||||
|
||||
if( empty( $gce_per_page_num ) ) {
|
||||
$gce_per_page_num = 7;
|
||||
}
|
||||
@@ -78,7 +78,14 @@
|
||||
<tr>
|
||||
<th scope="row"><?php _e( 'Feed Shortcode', 'gce' ); ?></th>
|
||||
<td>
|
||||
<code>[gcal id="<?php echo $post_id; ?>"]</code>
|
||||
<input
|
||||
name="gce_shortcode"
|
||||
class="gce-shortcode"
|
||||
readonly="readonly"
|
||||
value='[gcal id="<?php echo $post_id; ?>"]'
|
||||
onclick="this.select();"
|
||||
/>
|
||||
<span class="gce-shortcode-copied"></span>
|
||||
<p class="description">
|
||||
<?php _e( 'Copy and paste this shortcode to display this Google Calendar feed on any post or page.', 'gce' ); ?>
|
||||
<?php _e( 'To avoid display issues, make sure to paste the shortcode in the Text tab of the post editor.', 'gce' ); ?>
|
||||
@@ -97,6 +104,25 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
$timezone_wordpress = gce_get_wp_timezone();
|
||||
$timezone_default = $timezone_wordpress ? $timezone_wordpress : 'UTC';
|
||||
$timezone_setting = esc_attr( get_post_meta( $post->ID, '_feed_timezone_setting', true ) );
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"><label for="gce_feed_url"><?php _e( 'Timezone', 'gce' ); ?></label></th>
|
||||
<td>
|
||||
<select name="_feed_timezone_setting" id="_feed_timezone_setting">
|
||||
<option value="use_calendar" <?php selected( 'use_calendar', $timezone_setting, true ); ?>><?php _ex( 'Calendar default', 'Use the calendar default setting', 'gce' ); ?></option>
|
||||
<option value="use_site" <?php selected( 'use_site', $timezone_setting, true ); ?>><?php printf( _x( 'Site default', 'Use this site default setting', 'gce' ) . ' (%s)', $timezone_default ); ?></option>
|
||||
</select>
|
||||
<p class="description">
|
||||
<?php _e( 'It is recommended to use the calendar default timezone.', 'gce' ); ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="gce_search_query"><?php _e( 'Search Query', 'gce' ); ?></label></th>
|
||||
<td>
|
||||
@@ -134,7 +160,7 @@
|
||||
<p class="description"><?php _e( 'Select how to display this feed.', 'gce' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="gce-display-option <?php echo ( $use_range == true ? 'gce-admin-hidden' : '' ); ?>">
|
||||
<th scope="row"><label for="gce_events_per_page"><?php _e( 'Events per Page', 'gce' ); ?></label></th>
|
||||
<td>
|
||||
@@ -150,7 +176,7 @@
|
||||
<p class="description"><?php _e( 'How many events to display per page (List View only).', 'gce' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="gce-display-option <?php echo ( $use_range == true ? 'gce-admin-hidden' : '' ); ?>">
|
||||
<th scope="row"><label for="gce_list_start_offset_num"><?php _e( 'Display Start Date Offset', 'gce' ); ?></label></th>
|
||||
<td>
|
||||
@@ -162,7 +188,7 @@
|
||||
<p class="description"><?php _e( 'Change to initially display events on a date other than today (List View only).', 'gce' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="gce-display-option <?php echo ( $use_range == true ? 'gce-admin-hidden' : '' ); ?>">
|
||||
<th scope="row"><label for="gce_feed_start"><?php _e( 'Earliest Feed Event Date', 'gce' ); ?></label></th>
|
||||
<td>
|
||||
@@ -179,9 +205,9 @@
|
||||
<br>
|
||||
<?php _e( '<strong>Note:</strong> Total events are currently limited to 2,500 by the Google Calendar API.', 'gce' ); ?>
|
||||
</p>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="gce-display-option <?php echo ( $use_range == true ? 'gce-admin-hidden' : '' ); ?>">
|
||||
<th scope="row"><label for="gce_feed_end"><?php _e( 'Latest Feed Event Date', 'gce' ); ?></label></th>
|
||||
<td>
|
||||
@@ -196,7 +222,7 @@
|
||||
<p class="description"><?php _e( 'Set how far in the future to retrieve events regardless of initial display.', 'gce' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="gce-custom-range <?php echo ( $use_range == true ? '' : 'gce-admin-hidden' ); ?>">
|
||||
<th scope="row"><label for="gce_feed_use_range"><?php _e( 'Use Custom Date Range', 'gce' ); ?></label></th>
|
||||
<td>
|
||||
@@ -208,7 +234,7 @@
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="gce-display-option <?php echo ( $use_range == true ? 'gce-admin-hidden' : '' ); ?>">
|
||||
<th scope="row"><label for="gce_paging"><?php _e( 'Show Paging Links', 'gce' ); ?></label></th>
|
||||
<td>
|
||||
@@ -216,7 +242,7 @@
|
||||
<?php _e( 'Display Next and Back navigation links.', 'gce' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="gce_show_tooltips"><?php _e( 'Show Tooltips', 'gce' ); ?></label></th>
|
||||
<td>
|
||||
@@ -224,7 +250,7 @@
|
||||
<?php _e( 'Display tooltips when hovering over events (Grid View only).', 'gce' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="gce_date_format"><?php _e( 'Date Format', 'gce' ); ?></label></th>
|
||||
<td>
|
||||
@@ -235,7 +261,7 @@
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="gce_time_format"><?php _e( 'Time Format', 'gce' ); ?></label></th>
|
||||
<td>
|
||||
@@ -246,7 +272,7 @@
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="gce_cache"><?php _e( 'Cache Duration', 'gce' ); ?></label></th>
|
||||
<td>
|
||||
@@ -254,7 +280,7 @@
|
||||
<p class="description"><?php _e( 'The length of time, in seconds, to cache the feed (43200 = 12 hours). If this feed changes regularly, you may want to reduce the cache duration.', 'gce' ); ?></p>
|
||||
<td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="button" class="button button-primary button-large gce-feed-update-button" value="Save Changes">
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<?php _e( 'Your review helps more folks find our plugin. Thanks so much!', 'gced' ); ?>
|
||||
<?php _e( 'Your review helps more folks find our plugin. Thanks so much!', 'gce' ); ?>
|
||||
</p>
|
||||
<div class="centered">
|
||||
<a href="https://wordpress.org/support/view/plugin-reviews/google-calendar-events#postform" class="button-primary" target="_blank">
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
/**
|
||||
* @author zhixin wen <wenzhixin2010@gmail.com>
|
||||
*/
|
||||
|
||||
.ms-parent {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.ms-choice {
|
||||
display: block;
|
||||
height: 26px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
border: 1px solid #aaa;
|
||||
white-space: nowrap;
|
||||
line-height: 26px;
|
||||
color: #444;
|
||||
text-decoration: none;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.ms-choice.disabled {
|
||||
background-color: #f4f4f4;
|
||||
background-image: none;
|
||||
border: 1px solid #ddd;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.ms-choice > span {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: block;
|
||||
float: left;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
.ms-choice > span.placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.ms-choice > div {
|
||||
float: right;
|
||||
width: 20px;
|
||||
height: 25px;
|
||||
background: url('multiple-select.png') right top no-repeat;
|
||||
}
|
||||
|
||||
.ms-choice > div.open {
|
||||
background: url('multiple-select.png') left top no-repeat;
|
||||
}
|
||||
|
||||
.ms-drop {
|
||||
overflow: hidden;
|
||||
display: none;
|
||||
margin-top: -1px;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
top: 100%;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
||||
-moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
||||
box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
|
||||
.ms-search {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
min-height: 26px;
|
||||
padding: 4px;
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
.ms-search input {
|
||||
width: 100%;
|
||||
height: auto !important;
|
||||
min-height: 24px;
|
||||
padding: 0 20px 0 5px;
|
||||
margin: 0;
|
||||
outline: 0;
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
background: #fff url('multiple-select.png') no-repeat 100% -22px;
|
||||
background: url('multiple-select.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
|
||||
background: url('multiple-select.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
||||
background: url('multiple-select.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
||||
background: url('multiple-select.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
|
||||
background: url('multiple-select.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
||||
background: url('multiple-select.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
||||
}
|
||||
|
||||
.ms-search, .ms-search input {
|
||||
-webkit-box-sizing: border-box;
|
||||
-khtml-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ms-drop ul {
|
||||
overflow: auto;
|
||||
margin: 0;
|
||||
padding: 5px 8px;
|
||||
}
|
||||
|
||||
.ms-drop ul > li {
|
||||
list-style: none;
|
||||
display: list-item;
|
||||
background-image: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.ms-drop ul > li .disabled {
|
||||
opacity: .35;
|
||||
filter: Alpha(Opacity=35);
|
||||
}
|
||||
|
||||
.ms-drop ul > li.multiple {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.ms-drop ul > li.group {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.ms-drop ul > li.multiple label {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.ms-drop ul > li label.optgroup {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ms-drop input[type="checkbox"] {
|
||||
vertical-align: middle;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
@@ -40,8 +40,9 @@ class URE_Ajax_Processor {
|
||||
}
|
||||
|
||||
}
|
||||
// end of ajax_check_permissions()
|
||||
|
||||
|
||||
|
||||
protected function get_users_without_role() {
|
||||
global $wp_roles;
|
||||
|
||||
@@ -50,8 +51,10 @@ class URE_Ajax_Processor {
|
||||
$answer = array('result'=>'failure', 'message'=>'Provide new role');
|
||||
return $answer;
|
||||
}
|
||||
|
||||
$assign_role = $this->lib->get_assign_role();
|
||||
if ($new_role==='no_rights') {
|
||||
$this->lib->create_no_rights_role();
|
||||
$assign_role->create_no_rights_role();
|
||||
}
|
||||
|
||||
if (!isset($wp_roles)) {
|
||||
@@ -61,8 +64,9 @@ class URE_Ajax_Processor {
|
||||
$answer = array('result'=>'failure', 'message'=>'Selected new role does not exist');
|
||||
return $answer;
|
||||
}
|
||||
|
||||
$users = $assign_role->get_users_without_role($new_role);
|
||||
|
||||
$users = $this->lib->get_users_without_role();
|
||||
$answer = array('result'=>'success', 'users'=>$users, 'new_role'=>$new_role, 'message'=>'success');
|
||||
|
||||
return $answer;
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* Project: User Role Editor plugin
|
||||
* Author: Vladimir Garagulya
|
||||
* Author email: support@role-editor.com
|
||||
* Author URI: https://www.role-editor.com
|
||||
* Greetings: some ideas and code samples for long runing cron job was taken from the "Broken Link Checker" plugin (Janis Elst).
|
||||
* License: GPL v2+
|
||||
*
|
||||
* Assign role to the users without role stuff
|
||||
*/
|
||||
class URE_Assign_Role {
|
||||
|
||||
const MAX_USERS_TO_PROCESS = 50;
|
||||
|
||||
protected $lib = null;
|
||||
|
||||
|
||||
function __construct($lib) {
|
||||
|
||||
$this->lib = $lib;
|
||||
}
|
||||
// end of __construct()
|
||||
|
||||
|
||||
public function create_no_rights_role() {
|
||||
global $wp_roles;
|
||||
|
||||
$role_id = 'no_rights';
|
||||
$role_name = 'No rights';
|
||||
|
||||
if (!isset($wp_roles)) {
|
||||
$wp_roles = new WP_Roles();
|
||||
}
|
||||
if (isset($wp_roles->roles[$role_id])) {
|
||||
return;
|
||||
}
|
||||
add_role($role_id, $role_name, array());
|
||||
|
||||
}
|
||||
// end of create_no_rights_role()
|
||||
|
||||
|
||||
private function get_where_condition() {
|
||||
global $wpdb;
|
||||
|
||||
$usermeta = $this->lib->get_usermeta_table_name();
|
||||
$id = get_current_blog_id();
|
||||
$blog_prefix = $wpdb->get_blog_prefix($id);
|
||||
$where = "where not exists (select user_id from {$usermeta}
|
||||
where user_id=users.ID and meta_key='{$blog_prefix}capabilities') or
|
||||
exists (select user_id from {$usermeta}
|
||||
where user_id=users.ID and meta_key='{$blog_prefix}capabilities' and meta_value='a:0:{}')";
|
||||
|
||||
return $where;
|
||||
}
|
||||
// end of get_where_condition()
|
||||
|
||||
|
||||
public function count_users_without_role() {
|
||||
|
||||
global $wpdb;
|
||||
|
||||
$where = $this->get_where_condition();
|
||||
$query = "select count(ID) from {$wpdb->users} users {$where}";
|
||||
$users_quant = $wpdb->get_var($query);
|
||||
|
||||
return $users_quant;
|
||||
}
|
||||
// end of count_users_without_role()
|
||||
|
||||
|
||||
public function get_users_without_role($new_role='') {
|
||||
|
||||
global $wpdb;
|
||||
|
||||
$top_limit = self::MAX_USERS_TO_PROCESS;
|
||||
$id = get_current_blog_id();
|
||||
$blog_prefix = $wpdb->get_blog_prefix($id);
|
||||
$where = $this->get_where_condition();
|
||||
$query = "select ID from {$wpdb->users} users
|
||||
{$where}
|
||||
limit 0, {$top_limit}";
|
||||
$users0 = $wpdb->get_col($query);
|
||||
|
||||
return $users0;
|
||||
}
|
||||
// end of get_users_without_role()
|
||||
|
||||
}
|
||||
// end of URE_Assign_Role class
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
class URE_Known_JS_CSS_Compatibility_Issues {
|
||||
|
||||
public static function fix($hook_suffix, $ure_hook_suffixes) {
|
||||
|
||||
$ure_hook_suffixes[] = 'users.php';
|
||||
$ure_hook_suffixes[] = 'profile.php';
|
||||
|
||||
if (!in_array($hook_suffix, $ure_hook_suffixes)) {
|
||||
return;
|
||||
}
|
||||
|
||||
self::unload_techgostore($hook_suffix);
|
||||
self::unload_musicplay($hook_suffix);
|
||||
self::unload_conflict_plugins_css($hook_suffix);
|
||||
|
||||
}
|
||||
// end of fix()
|
||||
|
||||
|
||||
/**
|
||||
* Unload WP TechGoStore theme JS and CSS to exclude compatibility issues with URE
|
||||
*/
|
||||
private static function unload_techgostore($hook_suffix) {
|
||||
|
||||
if (!defined('THEME_SLUG') || THEME_SLUG !== 'techgo_') {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_deregister_script('jqueryform');
|
||||
wp_deregister_script('tab');
|
||||
wp_deregister_script('shortcode_js');
|
||||
wp_deregister_script('fancybox_js');
|
||||
wp_deregister_script('bootstrap-colorpicker');
|
||||
wp_deregister_script('logo_upload');
|
||||
wp_deregister_script('js_wd_menu_backend');
|
||||
|
||||
wp_deregister_style('config_css');
|
||||
wp_deregister_style('fancybox_css');
|
||||
wp_deregister_style('colorpicker');
|
||||
wp_deregister_style('font-awesome');
|
||||
wp_deregister_style('css_wd_menu_backend');
|
||||
}
|
||||
// end of unload_techgostore()
|
||||
|
||||
|
||||
/**
|
||||
* Unload MusicPlay theme CSS to exclude compatibility issues with URE
|
||||
*
|
||||
*/
|
||||
private static function unload_musicplay($hook_suffix) {
|
||||
if (!in_array($hook_suffix, array('users.php', 'profile.php')) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (defined('THEMENAME') && THEMENAME!=='MusicPlay') {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_deregister_style('atpadmin');
|
||||
wp_deregister_style('appointment-style');
|
||||
wp_deregister_style('atp-chosen');
|
||||
wp_deregister_style('atp_plupload');
|
||||
wp_deregister_style('atp-jquery-timepicker-addon');
|
||||
wp_deregister_style('atp-jquery-ui');
|
||||
|
||||
}
|
||||
// end of unload_music_play()
|
||||
|
||||
|
||||
private static function unload_conflict_plugins_css($hook_suffix) {
|
||||
global $wp_styles;
|
||||
|
||||
if (!in_array($hook_suffix, array('users.php', 'profile.php')) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// remove conflict CSS from responsive-admin-maintenance-pro plugin
|
||||
if (isset($wp_styles->registered['admin-page-css'])) {
|
||||
wp_deregister_style('admin-page-css');
|
||||
}
|
||||
}
|
||||
// end of unload_conflict_plugins_css()
|
||||
|
||||
|
||||
|
||||
}
|
||||
// end of URE_Fix_Known_JS_CSS_Compatibility_Issues
|
||||
@@ -33,17 +33,19 @@ class Ure_Lib extends Garvs_WP_Lib {
|
||||
protected $role_select_html = '';
|
||||
protected $role_delete_html = '';
|
||||
protected $capability_remove_html = '';
|
||||
protected $advert = null;
|
||||
protected $advert = null;
|
||||
public $debug = false;
|
||||
|
||||
|
||||
/** class constructor
|
||||
*
|
||||
* @param string $option_name
|
||||
* @param string $options_id
|
||||
*
|
||||
*/
|
||||
public function __construct($options_id) {
|
||||
|
||||
parent::__construct($options_id);
|
||||
$this->debug = defined('URE_DEBUG') && (URE_DEBUG==1 || URE_DEBUG==true);
|
||||
|
||||
$this->upgrade();
|
||||
}
|
||||
@@ -651,6 +653,16 @@ class Ure_Lib extends Garvs_WP_Lib {
|
||||
// end of get_last_role_id()
|
||||
|
||||
|
||||
public function get_usermeta_table_name() {
|
||||
global $wpdb;
|
||||
|
||||
$table_name = (!$this->multisite && defined('CUSTOM_USER_META_TABLE')) ? CUSTOM_USER_META_TABLE : $wpdb->usermeta;
|
||||
|
||||
return $table_name;
|
||||
}
|
||||
// end of get_usermeta_table_name()
|
||||
|
||||
|
||||
/**
|
||||
* Check if user has "Administrator" role assigned
|
||||
*
|
||||
@@ -665,7 +677,7 @@ class Ure_Lib extends Garvs_WP_Lib {
|
||||
return false;
|
||||
}
|
||||
|
||||
$table_name = (!$this->multisite && defined('CUSTOM_USER_META_TABLE')) ? CUSTOM_USER_META_TABLE : $wpdb->usermeta;
|
||||
$table_name = $this->get_usermeta_table_name();
|
||||
$meta_key = $wpdb->prefix . 'capabilities';
|
||||
$query = "SELECT count(*)
|
||||
FROM $table_name
|
||||
@@ -878,15 +890,12 @@ class Ure_Lib extends Garvs_WP_Lib {
|
||||
* @global wpdb $wpdb - WP database object
|
||||
* @return array
|
||||
*/
|
||||
protected function get_roles_can_delete()
|
||||
{
|
||||
global $wpdb;
|
||||
protected function get_roles_can_delete() {
|
||||
|
||||
$table_name = (!$this->multisite && defined('CUSTOM_USER_META_TABLE')) ? CUSTOM_USER_META_TABLE : $wpdb->usermeta;
|
||||
$meta_key = $wpdb->prefix . 'capabilities';
|
||||
$default_role = get_option('default_role');
|
||||
$standard_roles = array('administrator', 'editor', 'author', 'contributor', 'subscriber');
|
||||
$roles_can_delete = array();
|
||||
$users = count_users();
|
||||
foreach ($this->roles as $key => $role) {
|
||||
$can_delete = true;
|
||||
// check if it is default role for new users
|
||||
@@ -902,27 +911,8 @@ class Ure_Lib extends Garvs_WP_Lib {
|
||||
if ($this->role_contains_caps_not_allowed_for_simple_admin($key)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// check if user with such role exists
|
||||
$query = "SELECT DISTINCT meta_value
|
||||
FROM $table_name
|
||||
WHERE meta_key='$meta_key' AND meta_value like '%$key%'";
|
||||
$roles_used = $wpdb->get_results($query);
|
||||
if ($roles_used && count($roles_used > 0)) {
|
||||
foreach ($roles_used as $role_used) {
|
||||
$role_name = unserialize($role_used->meta_value);
|
||||
foreach ($role_name as $key1 => $value1) {
|
||||
if ($key == $key1) {
|
||||
$can_delete = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$can_delete) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($can_delete) {
|
||||
|
||||
if (!isset($users['avail_roles'][$key])) {
|
||||
$roles_can_delete[$key] = $role['name'] . ' (' . $key . ')';
|
||||
}
|
||||
}
|
||||
@@ -1011,6 +1001,8 @@ class Ure_Lib extends Garvs_WP_Lib {
|
||||
$caps['manage_network_options'] = 1;
|
||||
}
|
||||
|
||||
$caps = apply_filters('ure_built_in_wp_caps', $caps);
|
||||
|
||||
return $caps;
|
||||
}
|
||||
// end of get_built_in_wp_caps()
|
||||
@@ -1664,6 +1656,9 @@ class Ure_Lib extends Garvs_WP_Lib {
|
||||
|
||||
unset($this->built_in_wp_caps);
|
||||
asort($this->full_capabilities);
|
||||
|
||||
$this->full_capabilities = apply_filters('ure_full_capabilites', $this->full_capabilities);
|
||||
|
||||
}
|
||||
// end of init_full_capabilities()
|
||||
|
||||
@@ -1848,7 +1843,7 @@ class Ure_Lib extends Garvs_WP_Lib {
|
||||
*/
|
||||
protected function multisite_update_roles() {
|
||||
|
||||
if (defined('URE_DEBUG') && URE_DEBUG) {
|
||||
if ($this->debug) {
|
||||
$time_shot = microtime();
|
||||
}
|
||||
|
||||
@@ -1858,7 +1853,7 @@ class Ure_Lib extends Garvs_WP_Lib {
|
||||
$result = $this->wp_api_network_roles_update();
|
||||
}
|
||||
|
||||
if (defined('URE_DEBUG') && URE_DEBUG) {
|
||||
if ($this->debug) {
|
||||
echo '<div class="updated fade below-h2">Roles updated for ' . ( microtime() - $time_shot ) . ' milliseconds</div>';
|
||||
}
|
||||
|
||||
@@ -2437,42 +2432,6 @@ class Ure_Lib extends Garvs_WP_Lib {
|
||||
// end of remove_capability()
|
||||
|
||||
|
||||
/**
|
||||
* Returns list of user roles, except 1st one, and bbPress assigned as they are shown by WordPress and bbPress theirselves.
|
||||
*
|
||||
* @param type $user WP_User from wp-includes/capabilities.php
|
||||
* @return array
|
||||
*/
|
||||
public function other_user_roles($user) {
|
||||
|
||||
global $wp_roles;
|
||||
|
||||
if (!is_array($user->roles) || count($user->roles) <= 1) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// get bbPress assigned user role
|
||||
if (function_exists('bbp_filter_blog_editable_roles')) {
|
||||
$bb_press_role = bbp_get_user_role($user->ID);
|
||||
} else {
|
||||
$bb_press_role = '';
|
||||
}
|
||||
|
||||
$roles = array();
|
||||
foreach ($user->roles as $key => $value) {
|
||||
if (!empty($bb_press_role) && $bb_press_role === $value) {
|
||||
// exclude bbPress assigned role
|
||||
continue;
|
||||
}
|
||||
$roles[] = $value;
|
||||
}
|
||||
array_shift($roles); // exclude primary role which is shown by WordPress itself
|
||||
|
||||
return $roles;
|
||||
}
|
||||
// end of ure_other_user_roles()
|
||||
|
||||
|
||||
/**
|
||||
* Returns text presentation of user roles
|
||||
*
|
||||
@@ -2714,44 +2673,7 @@ class Ure_Lib extends Garvs_WP_Lib {
|
||||
|
||||
}
|
||||
// end of show_other_default_roles()
|
||||
|
||||
|
||||
public function create_no_rights_role() {
|
||||
global $wp_roles;
|
||||
|
||||
$role_id = 'no_rights';
|
||||
$role_name = 'No rights';
|
||||
|
||||
if (!isset($wp_roles)) {
|
||||
$wp_roles = new WP_Roles();
|
||||
}
|
||||
if (isset($wp_roles->roles[$role_name])) {
|
||||
return;
|
||||
}
|
||||
add_role($role_id, $role_name, array());
|
||||
|
||||
}
|
||||
// end of create_no_rights_role()
|
||||
|
||||
|
||||
public function get_users_without_role() {
|
||||
|
||||
global $wpdb;
|
||||
|
||||
$id = get_current_blog_id();
|
||||
$blog_prefix = $wpdb->get_blog_prefix($id);
|
||||
$query = "select ID from {$wpdb->users} users
|
||||
where not exists (select user_id from {$wpdb->usermeta}
|
||||
where user_id=users.ID and meta_key='{$blog_prefix}capabilities') or
|
||||
exists (select user_id from {$wpdb->usermeta}
|
||||
where user_id=users.ID and meta_key='{$blog_prefix}capabilities' and meta_value='a:0:{}') ;";
|
||||
$users = $wpdb->get_col($query);
|
||||
|
||||
return $users;
|
||||
|
||||
}
|
||||
// end of get_users_without_role()
|
||||
|
||||
|
||||
|
||||
public function get_current_role() {
|
||||
|
||||
@@ -2772,5 +2694,48 @@ class Ure_Lib extends Garvs_WP_Lib {
|
||||
}
|
||||
// end of get_edit_user_caps_mode()
|
||||
|
||||
|
||||
/**
|
||||
* Returns comma separated string of capabilities directly (not through the roles) assigned to the user
|
||||
*
|
||||
* @global WP_Roles $wp_roles
|
||||
* @param object $user
|
||||
* @return string
|
||||
*/
|
||||
public function get_edited_user_caps($user) {
|
||||
global $wp_roles;
|
||||
|
||||
$output = '';
|
||||
foreach ($user->caps as $cap => $value) {
|
||||
if (!$wp_roles->is_role($cap)) {
|
||||
if ('' != $output) {
|
||||
$output .= ', ';
|
||||
}
|
||||
$output .= $value ? $cap : sprintf(__('Denied: %s'), $cap);
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
// end of get_edited_user_caps()
|
||||
|
||||
|
||||
public function is_user_profile_extention_allowed() {
|
||||
// Check if we are not at the network admin center
|
||||
$result = stripos($_SERVER['REQUEST_URI'], 'network/user-edit.php') == false;
|
||||
|
||||
return $result;
|
||||
}
|
||||
// end of is_user_profile_extention_allowed()
|
||||
|
||||
|
||||
// create assign_role object
|
||||
public function get_assign_role() {
|
||||
$assign_role = new URE_Assign_Role($this);
|
||||
|
||||
return $assign_role;
|
||||
}
|
||||
// end of get_assign_role()
|
||||
|
||||
}
|
||||
// end of URE_Lib class
|
||||
@@ -0,0 +1,341 @@
|
||||
<?php
|
||||
/*
|
||||
* Project: User Role Editor WordPress plugin
|
||||
* Class for Assigning to a user multiple roles
|
||||
* Author: Vladimir Garagulya
|
||||
* Author email: support@role-editor.com
|
||||
* Author URI: https://www.role-editor.com
|
||||
* License: GPL v2+
|
||||
*
|
||||
*/
|
||||
|
||||
class URE_User_Other_Roles {
|
||||
|
||||
protected $lib = null;
|
||||
|
||||
|
||||
function __construct(Ure_Lib $lib) {
|
||||
|
||||
$this->lib = $lib;
|
||||
|
||||
}
|
||||
// end of $lib
|
||||
|
||||
|
||||
public function set_hooks() {
|
||||
|
||||
add_filter( 'additional_capabilities_display', array($this, 'additional_capabilities_display'), 10, 1);
|
||||
|
||||
add_action( 'admin_print_styles-user-edit.php', array($this, 'load_css') );
|
||||
add_action( 'admin_print_styles-user-new.php', array($this, 'load_css') );
|
||||
add_action( 'admin_enqueue_scripts', array($this, 'load_js' ) );
|
||||
add_action( 'edit_user_profile', array($this, 'edit_user_profile_html'), 10, 1 );
|
||||
add_action( 'user_new_form', array($this, 'user_new_form'), 10, 1 );
|
||||
add_filter( 'manage_users_columns', array($this, 'user_role_column'), 10, 1 );
|
||||
add_filter( 'manage_users_custom_column', array($this, 'user_role_row'), 10, 3 );
|
||||
add_action( 'profile_update', array($this, 'update'), 10 );
|
||||
if ($this->lib->multisite) {
|
||||
add_action( 'wpmu_activate_user', array($this, 'add_other_roles'), 10, 1 );
|
||||
} else {
|
||||
add_action( 'user_register', array($this, 'add_other_roles'), 10, 1 );
|
||||
}
|
||||
}
|
||||
// end of set_hooks()
|
||||
|
||||
|
||||
public function additional_capabilities_display($display) {
|
||||
|
||||
$display = false;
|
||||
|
||||
return $display;
|
||||
|
||||
}
|
||||
// end of additional_capabilities_display()
|
||||
|
||||
|
||||
/*
|
||||
* Load CSS for the user profile edit page
|
||||
*/
|
||||
public function load_css() {
|
||||
|
||||
wp_enqueue_style('wp-jquery-ui-dialog');
|
||||
wp_enqueue_style('ure-jquery-multiple-select', plugins_url('/css/multiple-select.css', URE_PLUGIN_FULL_PATH), array(), false, 'screen');
|
||||
|
||||
}
|
||||
// end of load_css()
|
||||
|
||||
|
||||
public function load_js($hook_suffix) {
|
||||
|
||||
if (!in_array($hook_suffix, array('user-edit.php', 'user-new.php'))) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_enqueue_script('jquery-ui-dialog', false, array('jquery-ui-core', 'jquery-ui-button', 'jquery'));
|
||||
wp_register_script('ure-jquery-multiple-select', plugins_url('/js/jquery.multiple.select.js', URE_PLUGIN_FULL_PATH));
|
||||
wp_enqueue_script('ure-jquery-multiple-select');
|
||||
wp_register_script('ure-user-profile-other-roles', plugins_url('/js/ure-user-profile-other-roles.js', URE_PLUGIN_FULL_PATH));
|
||||
wp_enqueue_script('ure-user-profile-other-roles');
|
||||
wp_localize_script('ure-user-profile-other-roles', 'ure_data_user_profile_other_roles', array(
|
||||
'wp_nonce' => wp_create_nonce('user-role-editor'),
|
||||
'other_roles' => esc_html__('Other Roles', 'ure'),
|
||||
'select_roles' => esc_html__('Select additional roles for this user', 'ure')
|
||||
));
|
||||
}
|
||||
// end of load_js()
|
||||
|
||||
|
||||
/**
|
||||
* Returns list of user roles, except 1st one, and bbPress assigned as they are shown by WordPress and bbPress theirselves.
|
||||
*
|
||||
* @param type $user WP_User from wp-includes/capabilities.php
|
||||
* @return array
|
||||
*/
|
||||
public function get_roles_array($user) {
|
||||
|
||||
if (!is_array($user->roles) || count($user->roles) <= 1) {
|
||||
return array();
|
||||
}
|
||||
|
||||
// get bbPress assigned user role
|
||||
if (function_exists('bbp_filter_blog_editable_roles')) {
|
||||
$bb_press_role = bbp_get_user_role($user->ID);
|
||||
} else {
|
||||
$bb_press_role = '';
|
||||
}
|
||||
|
||||
$roles = array();
|
||||
foreach ($user->roles as $key => $value) {
|
||||
if (!empty($bb_press_role) && $bb_press_role === $value) {
|
||||
// exclude bbPress assigned role
|
||||
continue;
|
||||
}
|
||||
$roles[] = $value;
|
||||
}
|
||||
array_shift($roles); // exclude primary role which is shown by WordPress itself
|
||||
|
||||
return $roles;
|
||||
}
|
||||
// end of get_roles_array()
|
||||
|
||||
|
||||
private function roles_select_html($user) {
|
||||
|
||||
global $wp_roles;
|
||||
|
||||
$user_roles = $user->roles;
|
||||
$primary_role = array_shift($user_roles);
|
||||
$roles = apply_filters('editable_roles', $wp_roles->roles); // exclude restricted roles if any
|
||||
if (isset($roles[$primary_role])) { // exclude role assigned to the user as a primary role
|
||||
unset($roles[$primary_role]);
|
||||
}
|
||||
$other_roles = $this->get_roles_array($user);
|
||||
|
||||
echo '<select multiple="multiple" id="ure_select_other_roles" name="ure_select_other_roles" style="width: 500px;" >'."\n";
|
||||
foreach($roles as $key=>$role) {
|
||||
echo '<option value="'.$key.'" >'.$role['name'].'</option>'."\n";
|
||||
} // foreach()
|
||||
echo '</select><br>'."\n";
|
||||
|
||||
if (is_array($other_roles) && count($other_roles) > 0) {
|
||||
$other_roles_str = implode(',', $other_roles);
|
||||
} else {
|
||||
$other_roles_str = '';
|
||||
}
|
||||
echo '<input type="hidden" name="ure_other_roles" id="ure_other_roles" value="' . $other_roles_str . '" />';
|
||||
|
||||
|
||||
$output = $this->lib->roles_text($other_roles);
|
||||
echo '<span id="ure_other_roles_list">'. $output .'</span>';
|
||||
}
|
||||
// end of roles_select()
|
||||
|
||||
|
||||
private function user_profile_capabilities($user) {
|
||||
global $current_user;
|
||||
|
||||
$user_caps = $this->lib->get_edited_user_caps($user);
|
||||
?>
|
||||
<tr>
|
||||
<th>
|
||||
<?php esc_html_e('Capabilities', 'ure'); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php
|
||||
echo $user_caps .'<br/>';
|
||||
if ($this->lib->user_is_admin($current_user->ID)) {
|
||||
echo '<a href="' . wp_nonce_url("users.php?page=users-".URE_PLUGIN_FILE."&object=user&user_id={$user->ID}", "ure_user_{$user->ID}") . '">' .
|
||||
esc_html__('Edit', 'ure') . '</a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
// end of user_profile_capabilities()
|
||||
|
||||
|
||||
private function display($user, $context) {
|
||||
?>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th scope="row"><?php esc_html_e('Other Roles', 'ure'); ?></th>
|
||||
<td>
|
||||
<?php
|
||||
$this->roles_select_html($user);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($context=='user-edit') {
|
||||
$this->user_profile_capabilities($user);
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
}
|
||||
// end of display()
|
||||
|
||||
|
||||
/**
|
||||
* Add URE stuff to the edit user profile page
|
||||
*
|
||||
* @global object $current_user
|
||||
* @param object $user
|
||||
* @return void
|
||||
*/
|
||||
public function edit_user_profile_html($user) {
|
||||
|
||||
if (!$this->lib->is_user_profile_extention_allowed()) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<h3><?php esc_html_e('Additional Capabilities', 'ure'); ?></h3>
|
||||
<?php
|
||||
$this->display($user, 'user-edit');
|
||||
}
|
||||
// end of edit_user_profile()
|
||||
|
||||
|
||||
public function user_new_form($context) {
|
||||
$user = new WP_User();
|
||||
?>
|
||||
<table>
|
||||
<?php
|
||||
$this->display($user, $context);
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
// end of edit_user_profile_html()
|
||||
|
||||
|
||||
/**
|
||||
* add 'Other Roles' column to WordPress users list table
|
||||
*
|
||||
* @param array $columns WordPress users list table columns list
|
||||
* @return array
|
||||
*/
|
||||
public function user_role_column($columns = array()) {
|
||||
|
||||
$columns['ure_roles'] = esc_html__('Other Roles', 'ure');
|
||||
|
||||
return $columns;
|
||||
}
|
||||
// end of user_role_column()
|
||||
|
||||
|
||||
/**
|
||||
* Return user's roles list for display in the WordPress Users list table
|
||||
*
|
||||
* @param string $retval
|
||||
* @param string $column_name
|
||||
* @param int $user_id
|
||||
*
|
||||
* @return string all user roles
|
||||
*/
|
||||
public function user_role_row($retval = '', $column_name = '', $user_id = 0) {
|
||||
|
||||
// Only looking for User Role Editor other user roles column
|
||||
if ('ure_roles' == $column_name) {
|
||||
$user = get_userdata($user_id);
|
||||
// Get the users roles
|
||||
$roles = $this->get_roles_array($user);
|
||||
$retval = $this->lib->roles_text($roles);
|
||||
}
|
||||
|
||||
// Pass retval through
|
||||
return $retval;
|
||||
}
|
||||
// end of user_role_row()
|
||||
|
||||
|
||||
// save additional user roles when user profile is updated, as WordPress itself doesn't know about them
|
||||
public function update($user_id) {
|
||||
|
||||
if (!current_user_can('edit_user', $user_id)) {
|
||||
return false;
|
||||
}
|
||||
$user = get_userdata($user_id);
|
||||
|
||||
if (empty($_POST['ure_other_roles'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$ure_other_roles = explode(',', str_replace(' ', '', $_POST['ure_other_roles']));
|
||||
$new_roles = array_intersect($user->roles, $ure_other_roles);
|
||||
$skip_roles = array();
|
||||
foreach ($new_roles as $role) {
|
||||
$skip_roles['$role'] = 1;
|
||||
}
|
||||
unset($new_roles);
|
||||
foreach ($ure_other_roles as $role) {
|
||||
if (!isset($skip_roles[$role])) {
|
||||
$user->add_role($role);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
// end of update()
|
||||
|
||||
|
||||
private function add_default_other_roles($user_id) {
|
||||
$user = get_user_by('id', $user_id);
|
||||
if (empty($user->ID)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get default roles if any
|
||||
$other_default_roles = $this->lib->get_option('other_default_roles', array());
|
||||
if (count($other_default_roles) == 0) {
|
||||
return;
|
||||
}
|
||||
foreach ($other_default_roles as $role) {
|
||||
$user->add_role($role);
|
||||
}
|
||||
}
|
||||
|
||||
// end of add_default_other_roles()
|
||||
|
||||
|
||||
public function add_other_roles($user_id) {
|
||||
|
||||
if (empty($user_id)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$result = $this->update($user_id);
|
||||
if ($result) { // roles were assigned manually
|
||||
return;
|
||||
}
|
||||
|
||||
$this->add_default_other_roles($user_id);
|
||||
}
|
||||
// end of add_other_roles()
|
||||
|
||||
|
||||
|
||||
}
|
||||
// end of URE_User_Other_Roles class
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* main class of User Role Editor WordPress plugin
|
||||
* Main class of User Role Editor WordPress plugin
|
||||
* Author: Vladimir Garagulya
|
||||
* Author email: support@role-editor.com
|
||||
* Author URI: https://www.role-editor.com
|
||||
@@ -9,9 +9,12 @@
|
||||
*/
|
||||
|
||||
class User_Role_Editor {
|
||||
// common code staff, including options data processor
|
||||
// plugin specific library object: common code stuff, including options data processor
|
||||
protected $lib = null;
|
||||
|
||||
// work with user multiple roles class
|
||||
protected $user_other_roles = null;
|
||||
|
||||
// plugin's Settings page reference, we've got it from add_options_pages() call
|
||||
protected $setting_page_hook = null;
|
||||
// URE's key capability
|
||||
@@ -25,8 +28,9 @@ class User_Role_Editor {
|
||||
*/
|
||||
function __construct($library) {
|
||||
|
||||
// get plugin specific library object
|
||||
$this->lib = $library;
|
||||
$this->lib = $library;
|
||||
$this->user_other_roles = new URE_User_Other_Roles($this->lib);
|
||||
|
||||
if ($this->lib->is_pro()) {
|
||||
$this->ure_hook_suffixes = array('settings_page_settings-user-role-editor-pro', 'users_page_users-user-role-editor-pro');
|
||||
} else {
|
||||
@@ -39,7 +43,7 @@ class User_Role_Editor {
|
||||
// deactivation action
|
||||
register_deactivation_hook(URE_PLUGIN_FULL_PATH, array($this, 'cleanup'));
|
||||
|
||||
// Who may use this plugin
|
||||
// Who can use this plugin
|
||||
$this->key_capability = $this->lib->get_key_capability();
|
||||
|
||||
if ($this->lib->multisite) {
|
||||
@@ -68,13 +72,23 @@ class User_Role_Editor {
|
||||
|
||||
// add a Settings link in the installed plugins page
|
||||
add_filter('plugin_action_links_'. URE_PLUGIN_BASE_NAME, array($this, 'plugin_action_links'), 10, 1);
|
||||
|
||||
add_filter('plugin_row_meta', array($this, 'plugin_row_meta'), 10, 2);
|
||||
add_filter('plugin_row_meta', array($this, 'plugin_row_meta'), 10, 2);
|
||||
|
||||
}
|
||||
// end of __construct()
|
||||
|
||||
|
||||
/**
|
||||
* True - if it's an instance of Pro version, false - for free version
|
||||
* @return boolean
|
||||
*/
|
||||
public function is_pro() {
|
||||
|
||||
return $this->lib->is_pro();
|
||||
}
|
||||
// end of is_pro()
|
||||
|
||||
|
||||
/**
|
||||
* Plugin initialization
|
||||
*
|
||||
@@ -102,18 +116,14 @@ class User_Role_Editor {
|
||||
// do not show 'Administrator (s)' view above users list
|
||||
add_filter('views_users', array($this, 'exclude_admins_view' ) );
|
||||
}
|
||||
|
||||
|
||||
add_action( 'admin_enqueue_scripts', array($this, 'admin_load_js' ) );
|
||||
add_action( 'user_row_actions', array($this, 'user_row'), 10, 2 );
|
||||
add_action( 'edit_user_profile', array($this, 'edit_user_profile'), 10, 2 );
|
||||
add_filter( 'manage_users_columns', array($this, 'user_role_column'), 10, 1 );
|
||||
add_filter( 'manage_users_custom_column', array($this, 'user_role_row'), 10, 3 );
|
||||
add_action( 'profile_update', array($this, 'user_profile_update'), 10 );
|
||||
add_action( 'user_row_actions', array($this, 'user_row'), 10, 2 );
|
||||
add_filter( 'all_plugins', array($this, 'exclude_from_plugins_list' ) );
|
||||
|
||||
$this->user_other_roles->set_hooks();
|
||||
|
||||
if ($this->lib->multisite) {
|
||||
add_action( 'wpmu_activate_user', array($this, 'add_other_default_roles'), 10, 1 );
|
||||
|
||||
$allow_edit_users_to_not_super_admin = $this->lib->get_option('allow_edit_users_to_not_super_admin', 0);
|
||||
if ($allow_edit_users_to_not_super_admin) {
|
||||
add_filter( 'map_meta_cap', array($this, 'restore_users_edit_caps'), 1, 4 );
|
||||
@@ -124,8 +134,7 @@ class User_Role_Editor {
|
||||
add_filter( 'site_option_site_admins', array($this, 'allow_add_user_as_superadmin') );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
add_action( 'user_register', array($this, 'add_other_default_roles'), 10, 1 );
|
||||
} else {
|
||||
$count_users_without_role = $this->lib->get_option('count_users_without_role', 0);
|
||||
if ($count_users_without_role) {
|
||||
add_action( 'restrict_manage_users', array($this, 'move_users_from_no_role_button') );
|
||||
@@ -176,25 +185,17 @@ class User_Role_Editor {
|
||||
|
||||
|
||||
public function move_users_from_no_role_button() {
|
||||
|
||||
global $wpdb;
|
||||
|
||||
|
||||
if ( stripos($_SERVER['REQUEST_URI'], 'wp-admin/users.php')===false ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$id = get_current_blog_id();
|
||||
$blog_prefix = $wpdb->get_blog_prefix($id);
|
||||
$query = "select count(ID) from {$wpdb->users} users
|
||||
where not exists (select user_id from {$wpdb->usermeta}
|
||||
where user_id=users.ID and meta_key='{$blog_prefix}capabilities') or
|
||||
exists (select user_id from {$wpdb->usermeta}
|
||||
where user_id=users.ID and meta_key='{$blog_prefix}capabilities' and meta_value='a:0:{}') ;";
|
||||
$users_count = $wpdb->get_var($query);
|
||||
if ($users_count>0) {
|
||||
$assign_role = $this->lib->get_assign_role();
|
||||
$users_quant = $assign_role->count_users_without_role();
|
||||
if ($users_quant>0) {
|
||||
?>
|
||||
<input type="button" name="move_from_no_role" id="move_from_no_role" class="button"
|
||||
value="Without role (<?php echo $users_count;?>)" onclick="ure_move_users_from_no_role_dialog()">
|
||||
value="Without role (<?php echo $users_quant;?>)" onclick="ure_move_users_from_no_role_dialog()">
|
||||
<div id="move_from_no_role_dialog" class="ure-dialog">
|
||||
<div id="move_from_no_role_content" style="padding: 10px;">
|
||||
To: <select name="ure_new_role" id="ure_new_role">
|
||||
@@ -240,27 +241,6 @@ class User_Role_Editor {
|
||||
// end of add_js_to_users_page()
|
||||
|
||||
|
||||
public function add_other_default_roles($user_id) {
|
||||
|
||||
if (empty($user_id)) {
|
||||
return;
|
||||
}
|
||||
$user = get_user_by('id', $user_id);
|
||||
if (empty($user->ID)) {
|
||||
return;
|
||||
}
|
||||
$other_default_roles = $this->lib->get_option('other_default_roles', array());
|
||||
if (count($other_default_roles)==0) {
|
||||
return;
|
||||
}
|
||||
foreach($other_default_roles as $role) {
|
||||
$user->add_role($role);
|
||||
}
|
||||
|
||||
}
|
||||
// end of add_other_default_roles()
|
||||
|
||||
|
||||
/**
|
||||
* restore edit_users, delete_users, create_users capabilities for non-superadmin users under multisite
|
||||
* (code is provided by http://wordpress.org/support/profile/sjobidoo)
|
||||
@@ -538,8 +518,7 @@ class User_Role_Editor {
|
||||
* Load plugin translation files - linked to the 'plugins_loaded' action
|
||||
*
|
||||
*/
|
||||
function load_translation()
|
||||
{
|
||||
function load_translation() {
|
||||
|
||||
load_plugin_textdomain('ure', '', dirname( plugin_basename( URE_PLUGIN_FULL_PATH ) ) .'/lang');
|
||||
|
||||
@@ -865,94 +844,24 @@ class User_Role_Editor {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* execute on plugin activation
|
||||
*/
|
||||
function setup() {
|
||||
|
||||
$this->convert_option('ure_caps_readable');
|
||||
$this->convert_option('ure_show_deprecated_caps');
|
||||
$this->convert_option('ure_hide_pro_banner');
|
||||
$this->lib->flush_options();
|
||||
|
||||
$this->lib->make_roles_backup();
|
||||
$this->lib->init_ure_caps();
|
||||
|
||||
|
||||
do_action('ure_activation');
|
||||
|
||||
}
|
||||
// end of setup()
|
||||
|
||||
|
||||
/**
|
||||
* Unload WP TechGoStore theme JS and CSS to exclude compatibility issues with URE
|
||||
* execute on plugin activation
|
||||
*/
|
||||
protected function unload_techgostore($hook_suffix) {
|
||||
|
||||
if (!defined('THEME_SLUG') || THEME_SLUG!=='techgo_') {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !in_array($hook_suffix, $this->ure_hook_suffixes) && !in_array($hook_suffix, array('users.php', 'profile.php')) ) {
|
||||
return;
|
||||
}
|
||||
wp_deregister_script('jqueryform');
|
||||
wp_deregister_script('tab');
|
||||
wp_deregister_script('shortcode_js');
|
||||
wp_deregister_script('fancybox_js');
|
||||
wp_deregister_script('bootstrap-colorpicker');
|
||||
wp_deregister_script('logo_upload');
|
||||
wp_deregister_script('js_wd_menu_backend');
|
||||
|
||||
wp_deregister_style('config_css');
|
||||
wp_deregister_style('fancybox_css');
|
||||
wp_deregister_style('colorpicker');
|
||||
wp_deregister_style('font-awesome');
|
||||
wp_deregister_style('css_wd_menu_backend');
|
||||
}
|
||||
function setup() {
|
||||
|
||||
// end of unload_techgostore()
|
||||
|
||||
|
||||
/**
|
||||
* Unload MusicPlay theme CSS to exclude compatibility issues with URE
|
||||
*
|
||||
*/
|
||||
protected function unload_musicplay($hook_suffix) {
|
||||
if ( !in_array($hook_suffix, $this->ure_hook_suffixes) && !in_array($hook_suffix, array('users.php', 'profile.php')) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (defined('THEMENAME') && THEMENAME!=='MusicPlay') {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_deregister_style('atpadmin');
|
||||
wp_deregister_style('appointment-style');
|
||||
wp_deregister_style('atp-chosen');
|
||||
wp_deregister_style('atp_plupload');
|
||||
wp_deregister_style('atp-jquery-timepicker-addon');
|
||||
wp_deregister_style('atp-jquery-ui');
|
||||
|
||||
$this->convert_option('ure_caps_readable');
|
||||
$this->convert_option('ure_show_deprecated_caps');
|
||||
$this->convert_option('ure_hide_pro_banner');
|
||||
$this->lib->flush_options();
|
||||
|
||||
$this->lib->make_roles_backup();
|
||||
$this->lib->init_ure_caps();
|
||||
|
||||
|
||||
do_action('ure_activation');
|
||||
}
|
||||
// end of unload_music_play()
|
||||
|
||||
|
||||
protected function unload_conflict_plugins_css($hook_suffix) {
|
||||
global $wp_styles;
|
||||
|
||||
if ( !in_array($hook_suffix, $this->ure_hook_suffixes) && !in_array($hook_suffix, array('users.php', 'profile.php')) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// remove conflict CSS from responsive-admin-maintenance-pro plugin
|
||||
if (isset($wp_styles->registered['admin-page-css'])) {
|
||||
wp_deregister_style('admin-page-css');
|
||||
}
|
||||
}
|
||||
// end of unload_conflict_plugins_css()
|
||||
|
||||
// end of setup()
|
||||
|
||||
|
||||
/**
|
||||
* Load plugin javascript stuff
|
||||
@@ -960,186 +869,73 @@ class User_Role_Editor {
|
||||
* @param string $hook_suffix
|
||||
*/
|
||||
public function admin_load_js($hook_suffix) {
|
||||
|
||||
$this->unload_techgostore($hook_suffix);
|
||||
$this->unload_musicplay($hook_suffix);
|
||||
$this->unload_conflict_plugins_css($hook_suffix);
|
||||
|
||||
if (in_array($hook_suffix, $this->ure_hook_suffixes)) {
|
||||
wp_enqueue_script('jquery-ui-dialog', false, array('jquery-ui-core', 'jquery-ui-button', 'jquery'));
|
||||
wp_enqueue_script('jquery-ui-tabs', false, array('jquery-ui-core', 'jquery'));
|
||||
wp_register_script('ure-js', plugins_url('/js/ure-js.js', URE_PLUGIN_FULL_PATH));
|
||||
wp_enqueue_script('ure-js');
|
||||
wp_localize_script('ure-js', 'ure_data', array(
|
||||
'wp_nonce' => wp_create_nonce('user-role-editor'),
|
||||
'page_url' => URE_WP_ADMIN_URL . URE_PARENT . '?page=users-' . URE_PLUGIN_FILE,
|
||||
'is_multisite' => is_multisite() ? 1 : 0,
|
||||
'select_all' => esc_html__('Select All', 'ure'),
|
||||
'unselect_all' => esc_html__('Unselect All', 'ure'),
|
||||
'reverse' => esc_html__('Reverse', 'ure'),
|
||||
'update' => esc_html__('Update', 'ure'),
|
||||
'confirm_submit' => esc_html__('Please confirm permissions update', 'ure'),
|
||||
'add_new_role_title' => esc_html__('Add New Role', 'ure'),
|
||||
'rename_role_title' => esc_html__('Rename Role', 'ure'),
|
||||
'role_name_required' => esc_html__(' Role name (ID) can not be empty!', 'ure'),
|
||||
'role_name_valid_chars' => esc_html__(' Role name (ID) must contain latin characters, digits, hyphens or underscore only!', 'ure'),
|
||||
'numeric_role_name_prohibited' => esc_html__(' WordPress does not support numeric Role name (ID). Add latin characters to it.', 'ure'),
|
||||
'add_role' => esc_html__('Add Role', 'ure'),
|
||||
'rename_role' => esc_html__('Rename Role', 'ure'),
|
||||
'delete_role' => esc_html__('Delete Role', 'ure'),
|
||||
'cancel' => esc_html__('Cancel', 'ure'),
|
||||
'add_capability' => esc_html__('Add Capability', 'ure'),
|
||||
'delete_capability' => esc_html__('Delete Capability', 'ure'),
|
||||
'reset' => esc_html__('Reset', 'ure'),
|
||||
'reset_warning' => esc_html__('DANGER! Resetting will restore default settings from WordPress Core.', 'ure') . "\n\n" .
|
||||
esc_html__('If any plugins have changed capabilities in any way upon installation (such as S2Member, WooCommerce, and many more), those capabilities will be DELETED!', 'ure') . "\n\n" .
|
||||
esc_html__('For more information on how to undo changes and restore plugin capabilities go to', 'ure') . "\n" .
|
||||
'http://role-editor.com/how-to-restore-deleted-wordpress-user-roles/' . "\n\n" .
|
||||
esc_html__('Continue?', 'ure'),
|
||||
'default_role' => esc_html__('Default Role', 'ure'),
|
||||
'set_new_default_role' => esc_html__('Set New Default Role', 'ure'),
|
||||
'delete_capability' => esc_html__('Delete Capability', 'ure'),
|
||||
'delete_capability_warning' => esc_html__('Warning! Be careful - removing critical capability could crash some plugin or other custom code', 'ure'),
|
||||
'capability_name_required' => esc_html__(' Capability name (ID) can not be empty!', 'ure'),
|
||||
'capability_name_valid_chars' => esc_html__(' Capability name (ID) must contain latin characters, digits, hyphens or underscore only!', 'ure'),
|
||||
));
|
||||
// load additional JS stuff for Pro version, if exists
|
||||
do_action('ure_load_js');
|
||||
URE_Known_JS_CSS_Compatibility_Issues::fix($hook_suffix, $this->ure_hook_suffixes);
|
||||
|
||||
if (!in_array($hook_suffix, $this->ure_hook_suffixes)) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_enqueue_script('jquery-ui-dialog', false, array('jquery-ui-core', 'jquery-ui-button', 'jquery'));
|
||||
wp_enqueue_script('jquery-ui-tabs', false, array('jquery-ui-core', 'jquery'));
|
||||
wp_register_script('ure-js', plugins_url('/js/ure-js.js', URE_PLUGIN_FULL_PATH));
|
||||
wp_enqueue_script('ure-js');
|
||||
wp_localize_script('ure-js', 'ure_data', array(
|
||||
'wp_nonce' => wp_create_nonce('user-role-editor'),
|
||||
'page_url' => URE_WP_ADMIN_URL . URE_PARENT . '?page=users-' . URE_PLUGIN_FILE,
|
||||
'is_multisite' => is_multisite() ? 1 : 0,
|
||||
'select_all' => esc_html__('Select All', 'ure'),
|
||||
'unselect_all' => esc_html__('Unselect All', 'ure'),
|
||||
'reverse' => esc_html__('Reverse', 'ure'),
|
||||
'update' => esc_html__('Update', 'ure'),
|
||||
'confirm_submit' => esc_html__('Please confirm permissions update', 'ure'),
|
||||
'add_new_role_title' => esc_html__('Add New Role', 'ure'),
|
||||
'rename_role_title' => esc_html__('Rename Role', 'ure'),
|
||||
'role_name_required' => esc_html__(' Role name (ID) can not be empty!', 'ure'),
|
||||
'role_name_valid_chars' => esc_html__(' Role name (ID) must contain latin characters, digits, hyphens or underscore only!', 'ure'),
|
||||
'numeric_role_name_prohibited' => esc_html__(' WordPress does not support numeric Role name (ID). Add latin characters to it.', 'ure'),
|
||||
'add_role' => esc_html__('Add Role', 'ure'),
|
||||
'rename_role' => esc_html__('Rename Role', 'ure'),
|
||||
'delete_role' => esc_html__('Delete Role', 'ure'),
|
||||
'cancel' => esc_html__('Cancel', 'ure'),
|
||||
'add_capability' => esc_html__('Add Capability', 'ure'),
|
||||
'delete_capability' => esc_html__('Delete Capability', 'ure'),
|
||||
'reset' => esc_html__('Reset', 'ure'),
|
||||
'reset_warning' => esc_html__('DANGER! Resetting will restore default settings from WordPress Core.', 'ure') . "\n\n" .
|
||||
esc_html__('If any plugins have changed capabilities in any way upon installation (such as S2Member, WooCommerce, and many more), those capabilities will be DELETED!', 'ure') . "\n\n" .
|
||||
esc_html__('For more information on how to undo changes and restore plugin capabilities go to', 'ure') . "\n" .
|
||||
'http://role-editor.com/how-to-restore-deleted-wordpress-user-roles/' . "\n\n" .
|
||||
esc_html__('Continue?', 'ure'),
|
||||
'default_role' => esc_html__('Default Role', 'ure'),
|
||||
'set_new_default_role' => esc_html__('Set New Default Role', 'ure'),
|
||||
'delete_capability' => esc_html__('Delete Capability', 'ure'),
|
||||
'delete_capability_warning' => esc_html__('Warning! Be careful - removing critical capability could crash some plugin or other custom code', 'ure'),
|
||||
'capability_name_required' => esc_html__(' Capability name (ID) can not be empty!', 'ure'),
|
||||
'capability_name_valid_chars' => esc_html__(' Capability name (ID) must contain latin characters, digits, hyphens or underscore only!', 'ure'),
|
||||
));
|
||||
|
||||
// load additional JS stuff for Pro version, if exists
|
||||
do_action('ure_load_js');
|
||||
|
||||
}
|
||||
// end of admin_load_js()
|
||||
|
||||
|
||||
protected function is_user_profile_extention_allowed() {
|
||||
// Check if we are not at the network admin center
|
||||
$result = stripos($_SERVER['REQUEST_URI'], 'network/user-edit.php') == false;
|
||||
|
||||
return $result;
|
||||
}
|
||||
// end of is_user_profile_extention_allowed()
|
||||
|
||||
|
||||
public function edit_user_profile($user) {
|
||||
|
||||
global $current_user;
|
||||
|
||||
if (!$this->is_user_profile_extention_allowed()) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<h3><?php _e('User Role Editor', 'ure'); ?></h3>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th scope="row"><?php _e('Other Roles', 'ure'); ?></th>
|
||||
<td>
|
||||
<?php
|
||||
$roles = $this->lib->other_user_roles($user);
|
||||
if (is_array($roles) && count($roles) > 0) {
|
||||
foreach ($roles as $role) {
|
||||
echo '<input type="hidden" name="ure_other_roles[]" value="' . $role . '" />';
|
||||
}
|
||||
}
|
||||
|
||||
$output = $this->lib->roles_text($roles);
|
||||
echo $output;
|
||||
if ($this->lib->user_is_admin($current_user->ID)) {
|
||||
echo ' >> <a href="' . wp_nonce_url("users.php?page=users-".URE_PLUGIN_FILE."&object=user&user_id={$user->ID}", "ure_user_{$user->ID}") . '">' .
|
||||
esc_html__('Edit', 'ure') . '</a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
// end of edit_user_profile()
|
||||
|
||||
|
||||
/**
|
||||
* add 'Other Roles' column to WordPress users list table
|
||||
*
|
||||
* @param array $columns WordPress users list table columns list
|
||||
* @return array
|
||||
*/
|
||||
public function user_role_column($columns = array()) {
|
||||
|
||||
$columns['ure_roles'] = esc_html__('Other Roles', 'ure');
|
||||
|
||||
return $columns;
|
||||
}
|
||||
// end of user_role_column()
|
||||
|
||||
|
||||
/**
|
||||
* Return user's roles list for display in the WordPress Users list table
|
||||
*
|
||||
* @param string $retval
|
||||
* @param string $column_name
|
||||
* @param int $user_id
|
||||
*
|
||||
* @return string all user roles
|
||||
*/
|
||||
public function user_role_row($retval = '', $column_name = '', $user_id = 0)
|
||||
{
|
||||
|
||||
// Only looking for User Role Editor other user roles column
|
||||
if ('ure_roles' == $column_name) {
|
||||
$user = get_userdata($user_id);
|
||||
// Get the users roles
|
||||
$roles = $this->lib->other_user_roles($user);
|
||||
$retval = $this->lib->roles_text($roles);
|
||||
}
|
||||
|
||||
// Pass retval through
|
||||
return $retval;
|
||||
}
|
||||
// end of user_role_row()
|
||||
|
||||
|
||||
// save additional user roles when user profile is updated, as WordPress itself doesn't know about them
|
||||
public function user_profile_update($user_id) {
|
||||
|
||||
if (!current_user_can('edit_user', $user_id)) {
|
||||
return;
|
||||
}
|
||||
$user = get_userdata($user_id);
|
||||
|
||||
if (isset($_POST['ure_other_roles'])) {
|
||||
$new_roles = array_intersect($user->roles, $_POST['ure_other_roles']);
|
||||
$skip_roles = array();
|
||||
foreach ($new_roles as $role) {
|
||||
$skip_roles['$role'] = 1;
|
||||
}
|
||||
unset($new_roles);
|
||||
foreach ($_POST['ure_other_roles'] as $role) {
|
||||
if (!isset($skip_roles[$role])) {
|
||||
$user->add_role($role);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// update_user_profile()
|
||||
|
||||
|
||||
|
||||
|
||||
public function ure_ajax() {
|
||||
|
||||
require_once(URE_PLUGIN_DIR . 'includes/class-ajax-processor.php');
|
||||
|
||||
$ajax_processor = new URE_Ajax_Processor($this->lib);
|
||||
$ajax_processor->dispatch();
|
||||
|
||||
}
|
||||
// end of ure_ajax()
|
||||
|
||||
|
||||
|
||||
// execute on plugin deactivation
|
||||
function cleanup()
|
||||
{
|
||||
function cleanup() {
|
||||
|
||||
}
|
||||
// end of setup()
|
||||
|
||||
|
||||
|
||||
}
|
||||
// end of User_Role_Editor
|
||||
@@ -28,4 +28,17 @@ if (class_exists('GFForms') ) { // if Gravity Forms is installed
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
if (!function_exists('ure_get_post_view_access_users')) {
|
||||
function ure_get_post_view_access_users($post_id) {
|
||||
if (!$GLOBALS['user_role_editor']->is_pro()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = $GLOBALS['user_role_editor']->get_post_view_access_users($post_id);
|
||||
|
||||
return $result;
|
||||
}
|
||||
// end of ure_get_post_view_users()
|
||||
|
||||
} // if (!function_exists('ure_get_post_view_users'))
|
||||
@@ -0,0 +1,332 @@
|
||||
/**
|
||||
* @author zhixin wen <wenzhixin2010@gmail.com>
|
||||
* @version 1.0.4
|
||||
*
|
||||
* http://wenzhixin.net.cn/p/multiple-select/
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
'use strict';
|
||||
|
||||
function MultipleSelect($el, options) {
|
||||
var that = this,
|
||||
elWidth = $el.width();
|
||||
|
||||
this.$el = $el.hide();
|
||||
this.options = options;
|
||||
|
||||
this.$parent = $('<div class="ms-parent"></div>');
|
||||
this.$choice = $('<div class="ms-choice"><span class="placeholder">' +
|
||||
options.placeholder + '</span><div></div></div>');
|
||||
this.$drop = $('<div class="ms-drop"></div>');
|
||||
this.$el.after(this.$parent);
|
||||
this.$parent.append(this.$choice);
|
||||
this.$parent.append(this.$drop);
|
||||
|
||||
if (this.$el.prop('disabled')) {
|
||||
this.$choice.addClass('disabled');
|
||||
}
|
||||
this.$choice.css('width', elWidth + 'px')
|
||||
.find('span').css('width', (elWidth - 28) + 'px');
|
||||
this.$drop.css({
|
||||
width: (options.width || elWidth) + 'px'
|
||||
});
|
||||
|
||||
$('body').click(function(e) {
|
||||
if ($(e.target)[0] === that.$choice[0] ||
|
||||
$(e.target).parents('.ms-choice')[0] === that.$choice[0]) {
|
||||
return;
|
||||
}
|
||||
if (($(e.target)[0] === that.$drop[0] ||
|
||||
$(e.target).parents('.ms-drop')[0] !== that.$drop[0]) &&
|
||||
that.options.isopen) {
|
||||
that.close();
|
||||
}
|
||||
});
|
||||
|
||||
if (this.options.isopen) {
|
||||
this.open();
|
||||
}
|
||||
}
|
||||
|
||||
MultipleSelect.prototype = {
|
||||
constructor : MultipleSelect,
|
||||
|
||||
init: function() {
|
||||
var that = this,
|
||||
html = [];
|
||||
if (this.options.filter) {
|
||||
html.push(
|
||||
'<div class="ms-search">',
|
||||
'<input type="text" autocomplete="off" autocorrect="off" autocapitilize="off" spellcheck="false">',
|
||||
'</div>'
|
||||
);
|
||||
}
|
||||
html.push('<ul>');
|
||||
if (this.options.selectAll) {
|
||||
html.push(
|
||||
'<li>',
|
||||
'<label>',
|
||||
'<input type="checkbox" name="selectAll" /> ',
|
||||
'[' + this.options.selectAllText + ']',
|
||||
'</label>',
|
||||
'</li>'
|
||||
);
|
||||
}
|
||||
$.each(this.$el.children(), function(i, elm) {
|
||||
html.push(that.optionToHtml(i, elm));
|
||||
});
|
||||
html.push('</ul>');
|
||||
this.$drop.html(html.join(''));
|
||||
this.$drop.find('ul').css('max-height', this.options.maxHeight + 'px');
|
||||
this.$drop.find('.multiple').css('width', this.options.multipleWidth + 'px');
|
||||
|
||||
this.$searchInput = this.$drop.find('.ms-search input');
|
||||
this.$selectAll = this.$drop.find('input[name="selectAll"]');
|
||||
this.$selectGroups = this.$drop.find('label.optgroup');
|
||||
this.$selectItems = this.$drop.find('input[name="selectItem"]:enabled');
|
||||
this.$disableItems = this.$drop.find('input[name="selectItem"]:disabled');
|
||||
this.events();
|
||||
this.update();
|
||||
},
|
||||
|
||||
optionToHtml: function(i, elm, group, groupDisabled) {
|
||||
var that = this,
|
||||
$elm = $(elm),
|
||||
html = [],
|
||||
multiple = this.options.multiple;
|
||||
if ($elm.is('option')) {
|
||||
var value = $elm.val(),
|
||||
text = $elm.text(),
|
||||
selected = $elm.prop('selected'),
|
||||
disabled = groupDisabled || $elm.prop('disabled');
|
||||
html.push(
|
||||
'<li' + (multiple ? ' class="multiple"' : '') + '>',
|
||||
'<label' + (disabled ? ' class="disabled"' : '') + '>',
|
||||
'<input type="checkbox" name="selectItem" value="' + value + '"' +
|
||||
(selected ? ' checked="checked"' : '') +
|
||||
(disabled ? ' disabled="disabled"' : '') +
|
||||
(group ? ' data-group="' + group + '"' : '') +
|
||||
'/> ',
|
||||
text,
|
||||
'</label>',
|
||||
'</li>'
|
||||
);
|
||||
} else if (!group && $elm.is('optgroup')) {
|
||||
var _group = 'group_' + i,
|
||||
label = $elm.attr('label'),
|
||||
disabled = $elm.prop('disabled');
|
||||
html.push(
|
||||
'<li class="group">',
|
||||
'<label class="optgroup' + (disabled ? ' disabled' : '') + '" data-group="' + _group + '">',
|
||||
label,
|
||||
'</label>',
|
||||
'</li>');
|
||||
$.each($elm.children(), function(i, elm) {
|
||||
html.push(that.optionToHtml(i, elm, _group, disabled));
|
||||
});
|
||||
}
|
||||
return html.join('');
|
||||
},
|
||||
|
||||
events: function() {
|
||||
var that = this;
|
||||
this.$choice.off('click').on('click', function() {
|
||||
that[that.options.isopen ? 'close' : 'open']();
|
||||
});
|
||||
this.$searchInput.off('keyup').on('keyup', function() {
|
||||
that.filter();
|
||||
});
|
||||
this.$selectAll.off('click').on('click', function() {
|
||||
var checked = $(this).prop('checked'),
|
||||
$items = that.$selectItems.filter(':visible');
|
||||
if ($items.length === that.$selectItems.length) {
|
||||
that[checked ? 'checkAll' : 'uncheckAll']();
|
||||
} else { // when the filter option is true
|
||||
$items.prop('checked', checked);
|
||||
that.update();
|
||||
}
|
||||
});
|
||||
this.$selectGroups.off('click').on('click', function() {
|
||||
var group = $(this).attr('data-group'),
|
||||
$items = that.$selectItems.filter(':visible'),
|
||||
$children = $items.filter('[data-group="' + group + '"]'),
|
||||
checked = $children.length !== $children.filter(':checked').length;
|
||||
$children.prop('checked', checked);
|
||||
that.updateSelectAll();
|
||||
that.update();
|
||||
that.options.onOptgroupClick({
|
||||
label: $(this).text(),
|
||||
checked: checked,
|
||||
children: $children.get()
|
||||
});
|
||||
});
|
||||
this.$selectItems.off('click').on('click', function() {
|
||||
that.updateSelectAll();
|
||||
that.update();
|
||||
that.options.onClick({
|
||||
label: $(this).parent().text(),
|
||||
value: $(this).val(),
|
||||
checked: $(this).prop('checked')
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
open: function() {
|
||||
if (this.$choice.hasClass('disabled')) {
|
||||
return;
|
||||
}
|
||||
this.options.isopen = true;
|
||||
this.$choice.find('>div').addClass('open');
|
||||
this.$drop.show();
|
||||
if (this.options.filter) {
|
||||
this.$searchInput.val('');
|
||||
this.filter();
|
||||
}
|
||||
this.options.onOpen();
|
||||
},
|
||||
|
||||
close: function() {
|
||||
this.options.isopen = false;
|
||||
this.$choice.find('>div').removeClass('open');
|
||||
this.$drop.hide();
|
||||
this.options.onClose();
|
||||
},
|
||||
|
||||
update: function() {
|
||||
var selects = this.getSelects('text'),
|
||||
$span = this.$choice.find('>span');
|
||||
if (selects.length) {
|
||||
$span.removeClass('placeholder').html(selects.join(','));
|
||||
} else {
|
||||
$span.addClass('placeholder').html(this.options.placeholder);
|
||||
}
|
||||
// set selects to select
|
||||
this.$el.val(this.getSelects());
|
||||
},
|
||||
|
||||
updateSelectAll: function() {
|
||||
var $items = this.$selectItems.filter(':visible');
|
||||
this.$selectAll.prop('checked', $items.length &&
|
||||
$items.length === $items.filter(':checked').length);
|
||||
},
|
||||
|
||||
//value or text, default: 'value'
|
||||
getSelects: function(type) {
|
||||
var values = [];
|
||||
this.$drop.find('input[name="selectItem"]:checked').each(function() {
|
||||
values.push(type === 'text' ? $(this).parent().text() : $(this).val());
|
||||
});
|
||||
return values;
|
||||
},
|
||||
|
||||
setSelects: function(values) {
|
||||
var that = this;
|
||||
this.$selectItems.prop('checked', false);
|
||||
$.each(values, function(i, value) {
|
||||
that.$selectItems.filter('[value="' + value + '"]').prop('checked', true);
|
||||
});
|
||||
this.$selectAll.prop('checked', this.$selectItems.length ===
|
||||
this.$selectItems.filter(':checked').length);
|
||||
this.update();
|
||||
},
|
||||
|
||||
enable: function() {
|
||||
this.$choice.removeClass('disabled');
|
||||
},
|
||||
|
||||
disable: function() {
|
||||
this.$choice.addClass('disabled');
|
||||
},
|
||||
|
||||
checkAll: function() {
|
||||
this.$selectItems.prop('checked', true);
|
||||
this.$selectAll.prop('checked', true);
|
||||
this.update();
|
||||
this.options.onCheckAll();
|
||||
},
|
||||
|
||||
uncheckAll: function() {
|
||||
this.$selectItems.prop('checked', false);
|
||||
this.$selectAll.prop('checked', false);
|
||||
this.update();
|
||||
this.options.onUncheckAll();
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
filter: function() {
|
||||
var that = this,
|
||||
text = $.trim(this.$searchInput.val()).toLowerCase();
|
||||
if (text.length === 0) {
|
||||
this.$selectItems.parent().show();
|
||||
this.$disableItems.parent().show();
|
||||
this.$selectGroups.show();
|
||||
} else {
|
||||
this.$selectItems.each(function() {
|
||||
var $parent = $(this).parent();
|
||||
$parent[$parent.text().toLowerCase().indexOf(text) < 0 ? 'hide' : 'show']();
|
||||
});
|
||||
this.$disableItems.parent().hide();
|
||||
this.$selectGroups.each(function() {
|
||||
var group = $(this).attr('data-group'),
|
||||
$items = that.$selectItems.filter(':visible');
|
||||
$(this)[$items.filter('[data-group="' + group + '"]').length === 0 ? 'hide' : 'show']();
|
||||
});
|
||||
}
|
||||
this.updateSelectAll();
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.multipleSelect = function() {
|
||||
var option = arguments[0],
|
||||
args = arguments,
|
||||
|
||||
value,
|
||||
allowedMethods = ['getSelects', 'setSelects', 'enable', 'disable', 'checkAll', 'uncheckAll', 'refresh'];
|
||||
|
||||
this.each(function() {
|
||||
var $this = $(this),
|
||||
data = $this.data('multipleSelect'),
|
||||
options = $.extend({}, $.fn.multipleSelect.defaults, typeof option === 'object' && option);
|
||||
|
||||
if (!data) {
|
||||
data = new MultipleSelect($this, options);
|
||||
$this.data('multipleSelect', data);
|
||||
}
|
||||
|
||||
if (typeof option === 'string') {
|
||||
if ($.inArray(option, allowedMethods) < 0) {
|
||||
throw "Unknown method: " + option;
|
||||
}
|
||||
value = data[option](args[1]);
|
||||
} else {
|
||||
data.init();
|
||||
}
|
||||
});
|
||||
|
||||
return value ? value : this;
|
||||
};
|
||||
|
||||
$.fn.multipleSelect.defaults = {
|
||||
isopen: false,
|
||||
placeholder: '',
|
||||
selectAll: true,
|
||||
selectAllText: 'Select all',
|
||||
multiple: false,
|
||||
multipleWidth: 80,
|
||||
filter: false,
|
||||
width: undefined,
|
||||
maxHeight: 250,
|
||||
|
||||
onOpen: function() {return false;},
|
||||
onClose: function() {return false;},
|
||||
onCheckAll: function() {return false;},
|
||||
onUncheckAll: function() {return false;},
|
||||
onOptgroupClick: function() {return false;},
|
||||
onClick: function() {return false;}
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,49 @@
|
||||
/* User Role Editor - assign to the user other roles
|
||||
* Author: Vladimir Garagulya
|
||||
* email: support@role-editor.com
|
||||
*/
|
||||
|
||||
jQuery(document).ready(function(){
|
||||
if (jQuery('#ure_select_other_roles').length==0) {
|
||||
return;
|
||||
}
|
||||
jQuery('#ure_select_other_roles').multipleSelect({
|
||||
filter: true,
|
||||
multiple: true,
|
||||
selectAll: false,
|
||||
multipleWidth: 600,
|
||||
maxHeight: 300,
|
||||
placeholder: ure_data_user_profile_other_roles.select_roles,
|
||||
onClick: function(view) {
|
||||
ure_update_linked_controls_other_roles();
|
||||
}
|
||||
});
|
||||
|
||||
var other_roles = jQuery('#ure_other_roles').val();
|
||||
var selected_roles = other_roles.split(',');
|
||||
jQuery('#ure_select_other_roles').multipleSelect('setSelects', selected_roles);
|
||||
|
||||
});
|
||||
|
||||
|
||||
function ure_update_linked_controls_other_roles() {
|
||||
var data_value = jQuery('#ure_select_other_roles').multipleSelect('getSelects');
|
||||
var to_save = '';
|
||||
for (i=0; i<data_value.length; i++) {
|
||||
if (to_save!=='') {
|
||||
to_save = to_save + ', ';
|
||||
}
|
||||
to_save = to_save + data_value[i];
|
||||
}
|
||||
jQuery('#ure_other_roles').val(to_save);
|
||||
|
||||
var data_text = jQuery('#ure_select_other_roles').multipleSelect('getSelects', 'text');
|
||||
var to_show = '';
|
||||
for (i=0; i<data_text.length; i++) {
|
||||
if (to_show!=='') {
|
||||
to_show = to_show + ', ';
|
||||
}
|
||||
to_show = to_show + data_text[i];
|
||||
}
|
||||
jQuery('#ure_other_roles_list').html(to_show);
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because it is too large.
Load diff
Binary file not shown.
Binary file not shown.
+912
-921
File diff suppressed because it is too large.
Load diff
@@ -3,7 +3,7 @@ Contributors: shinephp
|
||||
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=vladimir%40shinephp%2ecom&lc=RU&item_name=ShinePHP%2ecom&item_number=User%20Role%20Editor%20WordPress%20plugin¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
||||
Tags: user, role, editor, security, access, permission, capability
|
||||
Requires at least: 4.0
|
||||
Tested up to: 4.2.1
|
||||
Tested up to: 4.3
|
||||
Stable tag: trunk
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
@@ -68,7 +68,7 @@ To read full FAQ section visit [this page](http://www.shinephp.com/user-role-edi
|
||||
To read more about 'User Role Editor' visit [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/) at [shinephp.com](shinephp.com).
|
||||
|
||||
= Translations =
|
||||
* Dutch: Arjan Bosch - needs update;
|
||||
* Dutch: Gerhard Hoogterp;
|
||||
* French: [Transifex](https://www.transifex.com);
|
||||
* Hebrew: [atar4u](http://atar4u.com);
|
||||
* Hungarian: Németh Balázs;
|
||||
@@ -86,9 +86,18 @@ Some translations may be outdated. If you have better translation for some phras
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 4.19 =
|
||||
* 30.07.2015
|
||||
* It is possible to assign to the user multiple roles directly through a user profile edit page.
|
||||
* Custom SQL-query (checked if the role is in use and slow on the huge data) was excluded and replaced with WordPress built-in function call. [Thanks to Aaron](https://wordpress.org/support/topic/poorly-scaling-queries).
|
||||
* Bulk role assignment to the users without role was rewritten for cases with a huge quant of users. It processes just 50 users without role for the one request to return the answer from the server in the short time. The related code was extracted to the separate class.
|
||||
* Code to fix JavaScript and CSS compatibility issues introduced by other plugins and themes, which load its stuff globally, was extracted into the separate class.
|
||||
* Custom filters were added: 'ure_full_capabilites' - takes 1 input parameter, array with a full list of user capabilities visible at URE, 'ure_built_in_wp_caps' - takes 1 input parameter, array with a list of WordPress core user capabilities. These filters may be useful if you give access to the URE for some not administrator user, and wish to change the list of capabilities which are available to him at URE.
|
||||
* Dutch translation was updated. Thanks to Gerhard Hoogterp.
|
||||
|
||||
= 4.18.4 =
|
||||
* 30.04.2015
|
||||
* Calls to the functions add_query_arg(), remove_query_arg() are escaped with esc_url_raw() to exclude potential XSS vulnerabilities. Nothing critical: both calls of add_query_arg() are placed at the currently unused sections of the code.
|
||||
* Calls to the function add_query_arg() is properly escaped with esc_url_raw() to exclude potential XSS vulnerabilities. Nothing critical: both calls of add_query_arg() are placed at the unused sections of the code.
|
||||
* Italian translation was updated. Thanks to Leo.
|
||||
|
||||
= 4.18.3 =
|
||||
@@ -232,4 +241,4 @@ Click [here](http://role-editor.com/changelog)</a> to look at [the full list of
|
||||
|
||||
You can find more information about "User Role Editor" plugin at [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/)
|
||||
|
||||
I am ready to answer on your questions about plugin usage. Use [ShinePHP forum](http://shinephp.com/community/forum/user-role-editor/) or [plugin page comments](http://www.shinephp.com/user-role-editor-wordpress-plugin/) for it please.
|
||||
I am ready to answer on your questions about plugin usage. Use [plugin page comments](http://www.shinephp.com/user-role-editor-wordpress-plugin/) for that.
|
||||
@@ -1,20 +1,20 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: User Role Editor
|
||||
Plugin URI: http://role-editor.com
|
||||
Plugin URI: https://www.role-editor.com
|
||||
Description: Change/add/delete WordPress user roles and capabilities.
|
||||
Version: 4.18.4
|
||||
Version: 4.19
|
||||
Author: Vladimir Garagulya
|
||||
Author URI: http://www.shinephp.com
|
||||
Author URI: https://www.role-editor.com
|
||||
Text Domain: ure
|
||||
Domain Path: /lang/
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright 2010-2014 Vladimir Garagulya (email: vladimir@shinephp.com)
|
||||
Copyright 2010-2015 Vladimir Garagulya (email: support@role-editor.com)
|
||||
*/
|
||||
|
||||
if (!function_exists("get_option")) {
|
||||
if (!function_exists('get_option')) {
|
||||
header('HTTP/1.0 403 Forbidden');
|
||||
die; // Silence is golden, direct call is prohibited
|
||||
}
|
||||
@@ -23,7 +23,7 @@ if (defined('URE_PLUGIN_URL')) {
|
||||
wp_die('It seems that other version of User Role Editor is active. Please deactivate it before use this version');
|
||||
}
|
||||
|
||||
define('URE_VERSION', '4.18.4');
|
||||
define('URE_VERSION', '4.19');
|
||||
define('URE_PLUGIN_URL', plugin_dir_url(__FILE__));
|
||||
define('URE_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
||||
define('URE_PLUGIN_BASE_NAME', plugin_basename(__FILE__));
|
||||
@@ -42,15 +42,19 @@ $exit_msg = sprintf( 'User Role Editor requires PHP %s or newer.', $ure_required
|
||||
Ure_Lib::check_version( PHP_VERSION, $ure_required_php_version, $exit_msg, __FILE__ );
|
||||
|
||||
// check WP version
|
||||
$ure_required_wp_version = '3.5';
|
||||
$ure_required_wp_version = '4.0';
|
||||
$exit_msg = sprintf( 'User Role Editor requires WordPress %s or newer.', $ure_required_wp_version ) .
|
||||
'<a href="http://codex.wordpress.org/Upgrading_WordPress"> ' . 'Please update!' . '</a>';
|
||||
Ure_Lib::check_version(get_bloginfo('version'), $ure_required_wp_version, $exit_msg, __FILE__ );
|
||||
|
||||
require_once(URE_PLUGIN_DIR .'includes/define-constants.php');
|
||||
require_once(URE_PLUGIN_DIR .'includes/misc-support-stuff.php');
|
||||
require_once(URE_PLUGIN_DIR .'includes/class-assign-role.php');
|
||||
require_once(URE_PLUGIN_DIR .'includes/class-user-other-roles.php');
|
||||
require_once(URE_PLUGIN_DIR .'includes/class-ajax-processor.php');
|
||||
require_once(URE_PLUGIN_DIR .'includes/class-ure-screen-help.php');
|
||||
require_once( URE_PLUGIN_DIR .'includes/class-user-role-editor.php');
|
||||
require_once(URE_PLUGIN_DIR .'includes/class-known-js-css-compatibility-issues.php');
|
||||
require_once(URE_PLUGIN_DIR .'includes/class-user-role-editor.php');
|
||||
|
||||
|
||||
$ure_lib = new Ure_Lib('user_role_editor');
|
||||
|
||||
@@ -1124,7 +1124,7 @@ final class WP_Customize_Widgets {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ( $this->get_instance_hash_key( $decoded ) !== $value['instance_hash_key'] ) {
|
||||
if ( ! hash_equals( $this->get_instance_hash_key( $decoded ), $value['instance_hash_key'] ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -312,11 +312,14 @@ class WP_Embed {
|
||||
* @return string Potentially modified $content.
|
||||
*/
|
||||
public function autoembed( $content ) {
|
||||
// Strip newlines from all elements.
|
||||
$content = wp_replace_in_html_tags( $content, array( "\n" => " " ) );
|
||||
// Replace line breaks from all HTML elements with placeholders.
|
||||
$content = wp_replace_in_html_tags( $content, array( "\n" => '<!-- wp-line-break -->' ) );
|
||||
|
||||
// Find URLs that are on their own line.
|
||||
return preg_replace_callback( '|^(\s*)(https?://[^\s"]+)(\s*)$|im', array( $this, 'autoembed_callback' ), $content );
|
||||
$content = preg_replace_callback( '|^(\s*)(https?://[^\s"]+)(\s*)$|im', array( $this, 'autoembed_callback' ), $content );
|
||||
|
||||
// Put the line breaks back.
|
||||
return str_replace( '<!-- wp-line-break -->', "\n", $content );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1410,7 +1410,7 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
|
||||
?>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:') ?></label>
|
||||
<input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $title; ?>" />
|
||||
<input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr( $title ); ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('nav_menu'); ?>"><?php _e('Select Menu:'); ?></label>
|
||||
|
||||
+54
-22
@@ -419,10 +419,10 @@ function wpautop($pee, $br = true) {
|
||||
$pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
|
||||
|
||||
// Standardize newline characters to "\n".
|
||||
$pee = str_replace(array("\r\n", "\r"), "\n", $pee);
|
||||
$pee = str_replace(array("\r\n", "\r"), "\n", $pee);
|
||||
|
||||
// Strip newlines from all elements.
|
||||
$pee = wp_replace_in_html_tags( $pee, array( "\n" => " " ) );
|
||||
// Find newlines in all elements and add placeholders.
|
||||
$pee = wp_replace_in_html_tags( $pee, array( "\n" => " <!-- wpnl --> " ) );
|
||||
|
||||
// Collapse line breaks before and after <option> elements so they don't get autop'd.
|
||||
if ( strpos( $pee, '<option' ) !== false ) {
|
||||
@@ -509,9 +509,59 @@ function wpautop($pee, $br = true) {
|
||||
if ( !empty($pre_tags) )
|
||||
$pee = str_replace(array_keys($pre_tags), array_values($pre_tags), $pee);
|
||||
|
||||
// Restore newlines in all elements.
|
||||
$pee = str_replace( " <!-- wpnl --> ", "\n", $pee );
|
||||
|
||||
return $pee;
|
||||
}
|
||||
|
||||
/**
|
||||
* Separate HTML elements and comments from the text.
|
||||
*
|
||||
* @since 4.2.4
|
||||
*
|
||||
* @param string $input The text which has to be formatted.
|
||||
* @return array The formatted text.
|
||||
*/
|
||||
function wp_html_split( $input ) {
|
||||
static $regex;
|
||||
|
||||
if ( ! isset( $regex ) ) {
|
||||
$comments =
|
||||
'!' // Start of comment, after the <.
|
||||
. '(?:' // Unroll the loop: Consume everything until --> is found.
|
||||
. '-(?!->)' // Dash not followed by end of comment.
|
||||
. '[^\-]*+' // Consume non-dashes.
|
||||
. ')*+' // Loop possessively.
|
||||
. '(?:-->)?'; // End of comment. If not found, match all input.
|
||||
|
||||
$cdata =
|
||||
'!\[CDATA\[' // Start of comment, after the <.
|
||||
. '[^\]]*+' // Consume non-].
|
||||
. '(?:' // Unroll the loop: Consume everything until ]]> is found.
|
||||
. '](?!]>)' // One ] not followed by end of comment.
|
||||
. '[^\]]*+' // Consume non-].
|
||||
. ')*+' // Loop possessively.
|
||||
. '(?:]]>)?'; // End of comment. If not found, match all input.
|
||||
|
||||
$regex =
|
||||
'/(' // Capture the entire match.
|
||||
. '<' // Find start of element.
|
||||
. '(?(?=!--)' // Is this a comment?
|
||||
. $comments // Find end of comment.
|
||||
. '|'
|
||||
. '(?(?=!\[CDATA\[)' // Is this a comment?
|
||||
. $cdata // Find end of comment.
|
||||
. '|'
|
||||
. '[^>]*>?' // Find end of element. If not found, match all input.
|
||||
. ')'
|
||||
. ')'
|
||||
. ')/s';
|
||||
}
|
||||
|
||||
return preg_split( $regex, $input, -1, PREG_SPLIT_DELIM_CAPTURE );
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace characters or phrases within HTML elements only.
|
||||
*
|
||||
@@ -523,25 +573,7 @@ function wpautop($pee, $br = true) {
|
||||
*/
|
||||
function wp_replace_in_html_tags( $haystack, $replace_pairs ) {
|
||||
// Find all elements.
|
||||
$comments =
|
||||
'!' // Start of comment, after the <.
|
||||
. '(?:' // Unroll the loop: Consume everything until --> is found.
|
||||
. '-(?!->)' // Dash not followed by end of comment.
|
||||
. '[^\-]*+' // Consume non-dashes.
|
||||
. ')*+' // Loop possessively.
|
||||
. '(?:-->)?'; // End of comment. If not found, match all input.
|
||||
|
||||
$regex =
|
||||
'/(' // Capture the entire match.
|
||||
. '<' // Find start of element.
|
||||
. '(?(?=!--)' // Is this a comment?
|
||||
. $comments // Find end of comment.
|
||||
. '|'
|
||||
. '[^>]*>?' // Find end of element. If not found, match all input.
|
||||
. ')'
|
||||
. ')/s';
|
||||
|
||||
$textarr = preg_split( $regex, $haystack, -1, PREG_SPLIT_DELIM_CAPTURE );
|
||||
$textarr = wp_html_split( $haystack );
|
||||
$changed = false;
|
||||
|
||||
// Optimize when searching for one item.
|
||||
|
||||
@@ -763,11 +763,15 @@ function translate_user_role( $name ) {
|
||||
function get_available_languages( $dir = null ) {
|
||||
$languages = array();
|
||||
|
||||
foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) {
|
||||
$lang_file = basename($lang_file, '.mo');
|
||||
if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) &&
|
||||
0 !== strpos( $lang_file, 'admin-' ))
|
||||
$languages[] = $lang_file;
|
||||
$lang_files = glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' );
|
||||
if ( $lang_files ) {
|
||||
foreach( $lang_files as $lang_file ) {
|
||||
$lang_file = basename( $lang_file, '.mo' );
|
||||
if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) &&
|
||||
0 !== strpos( $lang_file, 'admin-' ) ) {
|
||||
$languages[] = $lang_file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $languages;
|
||||
|
||||
@@ -2905,10 +2905,11 @@ function wp_untrash_post_comments( $post = null ) {
|
||||
|
||||
foreach ( $group_by_status as $status => $comments ) {
|
||||
// Sanity check. This shouldn't happen.
|
||||
if ( 'post-trashed' == $status )
|
||||
if ( 'post-trashed' == $status ) {
|
||||
$status = '0';
|
||||
$comments_in = implode( "', '", $comments );
|
||||
$wpdb->query( "UPDATE $wpdb->comments SET comment_approved = '$status' WHERE comment_ID IN ('" . $comments_in . "')" );
|
||||
}
|
||||
$comments_in = implode( ', ', array_map( 'intval', $comments ) );
|
||||
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->comments SET comment_approved = %s WHERE comment_ID IN ($comments_in)", $status ) );
|
||||
}
|
||||
|
||||
clean_comment_cache( array_keys($statuses) );
|
||||
|
||||
@@ -328,29 +328,10 @@ function do_shortcodes_in_html_tags( $content, $ignore_html ) {
|
||||
$trans = array( '[' => '[', ']' => ']' );
|
||||
|
||||
$pattern = get_shortcode_regex();
|
||||
|
||||
$comment_regex =
|
||||
'!' // Start of comment, after the <.
|
||||
. '(?:' // Unroll the loop: Consume everything until --> is found.
|
||||
. '-(?!->)' // Dash not followed by end of comment.
|
||||
. '[^\-]*+' // Consume non-dashes.
|
||||
. ')*+' // Loop possessively.
|
||||
. '(?:-->)?'; // End of comment. If not found, match all input.
|
||||
|
||||
$regex =
|
||||
'/(' // Capture the entire match.
|
||||
. '<' // Find start of element.
|
||||
. '(?(?=!--)' // Is this a comment?
|
||||
. $comment_regex // Find end of comment.
|
||||
. '|'
|
||||
. '[^>]*>?' // Find end of element. If not found, match all input.
|
||||
. ')'
|
||||
. ')/s';
|
||||
|
||||
$textarr = preg_split( $regex, $content, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );
|
||||
$textarr = wp_html_split( $content );
|
||||
|
||||
foreach ( $textarr as &$element ) {
|
||||
if ( '<' !== $element[0] ) {
|
||||
if ( '' == $element || '<' !== $element[0] ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -365,7 +346,7 @@ function do_shortcodes_in_html_tags( $content, $ignore_html ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( $ignore_html || '<!--' === substr( $element, 0, 4 ) ) {
|
||||
if ( $ignore_html || '<!--' === substr( $element, 0, 4 ) || '<![CDATA[' === substr( $element, 0, 9 ) ) {
|
||||
// Encode all [ and ] chars.
|
||||
$element = strtr( $element, $trans );
|
||||
continue;
|
||||
@@ -373,6 +354,11 @@ function do_shortcodes_in_html_tags( $content, $ignore_html ) {
|
||||
|
||||
$attributes = wp_kses_attr_parse( $element );
|
||||
if ( false === $attributes ) {
|
||||
// Some plugins are doing things like [name] <[email]>.
|
||||
if ( 1 === preg_match( '%^<\s*\[\[?[^\[\]]+\]%', $element ) ) {
|
||||
$element = preg_replace_callback( "/$pattern/s", 'do_shortcode_tag', $element );
|
||||
}
|
||||
|
||||
// Looks like we found some crazy unfiltered HTML. Skipping it for sanity.
|
||||
$element = strtr( $element, $trans );
|
||||
continue;
|
||||
|
||||
+2
-23
@@ -673,8 +673,6 @@ function preview_theme() {
|
||||
|
||||
// Prevent theme mods to current theme being used on theme being previewed
|
||||
add_filter( 'pre_option_theme_mods_' . get_option( 'stylesheet' ), '__return_empty_array' );
|
||||
|
||||
ob_start( 'preview_theme_ob_filter' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -711,7 +709,7 @@ function _preview_theme_stylesheet_filter() {
|
||||
* @return string
|
||||
*/
|
||||
function preview_theme_ob_filter( $content ) {
|
||||
return preg_replace_callback( "|(<a.*?href=([\"']))(.*?)([\"'].*?>)|", 'preview_theme_ob_filter_callback', $content );
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -726,26 +724,7 @@ function preview_theme_ob_filter( $content ) {
|
||||
* @return string
|
||||
*/
|
||||
function preview_theme_ob_filter_callback( $matches ) {
|
||||
if ( strpos($matches[4], 'onclick') !== false )
|
||||
$matches[4] = preg_replace('#onclick=([\'"]).*?(?<!\\\)\\1#i', '', $matches[4]); //Strip out any onclicks from rest of <a>. (?<!\\\) means to ignore the '" if it's escaped by \ to prevent breaking mid-attribute.
|
||||
if (
|
||||
( false !== strpos($matches[3], '/wp-admin/') )
|
||||
||
|
||||
( false !== strpos( $matches[3], '://' ) && 0 !== strpos( $matches[3], home_url() ) )
|
||||
||
|
||||
( false !== strpos($matches[3], '/feed/') )
|
||||
||
|
||||
( false !== strpos($matches[3], '/trackback/') )
|
||||
)
|
||||
return $matches[1] . "#$matches[2] onclick=$matches[2]return false;" . $matches[4];
|
||||
|
||||
$stylesheet = isset( $_GET['stylesheet'] ) ? $_GET['stylesheet'] : '';
|
||||
$template = isset( $_GET['template'] ) ? $_GET['template'] : '';
|
||||
|
||||
$link = add_query_arg( array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => 1 ), $matches[3] );
|
||||
if ( 0 === strpos($link, 'preview=1') )
|
||||
$link = "?$link";
|
||||
return $matches[1] . esc_attr( $link ) . $matches[4];
|
||||
return $matches[0];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2.3';
|
||||
$wp_version = '4.2.4';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
@@ -2081,7 +2081,7 @@ class wpdb {
|
||||
public function get_var( $query = null, $x = 0, $y = 0 ) {
|
||||
$this->func_call = "\$db->get_var(\"$query\", $x, $y)";
|
||||
|
||||
if ( $this->check_safe_collation( $query ) ) {
|
||||
if ( $this->check_current_query && $this->check_safe_collation( $query ) ) {
|
||||
$this->check_current_query = false;
|
||||
}
|
||||
|
||||
@@ -2114,7 +2114,7 @@ class wpdb {
|
||||
public function get_row( $query = null, $output = OBJECT, $y = 0 ) {
|
||||
$this->func_call = "\$db->get_row(\"$query\",$output,$y)";
|
||||
|
||||
if ( $this->check_safe_collation( $query ) ) {
|
||||
if ( $this->check_current_query && $this->check_safe_collation( $query ) ) {
|
||||
$this->check_current_query = false;
|
||||
}
|
||||
|
||||
@@ -2155,7 +2155,7 @@ class wpdb {
|
||||
* @return array Database query result. Array indexed from 0 by SQL result row number.
|
||||
*/
|
||||
public function get_col( $query = null , $x = 0 ) {
|
||||
if ( $this->check_safe_collation( $query ) ) {
|
||||
if ( $this->check_current_query && $this->check_safe_collation( $query ) ) {
|
||||
$this->check_current_query = false;
|
||||
}
|
||||
|
||||
@@ -2187,7 +2187,7 @@ class wpdb {
|
||||
public function get_results( $query = null, $output = OBJECT ) {
|
||||
$this->func_call = "\$db->get_results(\"$query\", $output)";
|
||||
|
||||
if ( $this->check_safe_collation( $query ) ) {
|
||||
if ( $this->check_current_query && $this->check_safe_collation( $query ) ) {
|
||||
$this->check_current_query = false;
|
||||
}
|
||||
|
||||
@@ -2713,7 +2713,9 @@ class wpdb {
|
||||
}
|
||||
|
||||
foreach ( array_keys( $data ) as $column ) {
|
||||
$data[ $column ]['value'] = $row["x_$column"];
|
||||
if ( isset( $row["x_$column"] ) ) {
|
||||
$data[ $column ]['value'] = $row["x_$column"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user