diff --git a/wp-content/plugins/bogo/admin/admin.php b/wp-content/plugins/bogo/admin/admin.php index f10b134cc03ce06105de9e4c8736e3d8fc88840f..1efd272282404e6086b1283475ae678796a07c3f 100644 --- a/wp-content/plugins/bogo/admin/admin.php +++ b/wp-content/plugins/bogo/admin/admin.php @@ -44,26 +44,10 @@ function bogo_admin_enqueue_scripts( $hook_suffix ) { 'orderby' => 'value', ) ); - $add_translation_l10n = array(); - - foreach ( $available_languages as $locale => $lang ) { - $add_translation_l10n[$locale] = sprintf( - /* translators: %s: language name */ - __( 'Add %s Translation', 'bogo' ), - $lang - ); - } - $local_args = array( 'l10n' => array( /* translators: accessibility text */ 'targetBlank' => __( '(opens in a new window)', 'bogo' ), - 'language' => __( 'Language', 'bogo' ), - 'none' => __( 'None', 'bogo' ), - 'translations' => __( 'Translations', 'bogo' ), - 'addTranslation' => $add_translation_l10n, - 'noticePostCreation' => __( "Translation post created.", 'bogo' ), - 'editPost' => __( 'Edit Post', 'bogo' ), 'saveAlert' => __( "The changes you made will be lost if you navigate away from this page.", 'bogo' ), ), 'apiSettings' => array( @@ -128,15 +112,23 @@ function bogo_admin_enqueue_scripts( $hook_suffix ) { add_action( 'admin_menu', 'bogo_admin_menu', 10, 0 ); function bogo_admin_menu() { - add_menu_page( __( 'Languages', 'bogo' ), __( 'Languages', 'bogo' ), - 'bogo_manage_language_packs', 'bogo', 'bogo_tools_page', - 'dashicons-translation', 73 // between Users (70) and Tools (75) + add_menu_page( + __( 'Languages', 'bogo' ), + __( 'Languages', 'bogo' ), + 'bogo_manage_language_packs', + 'bogo', + 'bogo_tools_page', + 'dashicons-translation', + 73 // between Users (70) and Tools (75) ); - $tools = add_submenu_page( 'bogo', + $tools = add_submenu_page( + 'bogo', __( 'Language Packs', 'bogo' ), __( 'Language Packs', 'bogo' ), - 'bogo_manage_language_packs', 'bogo', 'bogo_tools_page' + 'bogo_manage_language_packs', + 'bogo', + 'bogo_tools_page' ); add_action( 'load-' . $tools, 'bogo_load_tools_page', 10, 0 ); @@ -147,21 +139,28 @@ function bogo_admin_menu() { ) ); if ( 0 < count( $available_locales ) ) { - $texts = add_submenu_page( 'bogo', + $texts = add_submenu_page( + 'bogo', __( 'Terms Translation', 'bogo' ), __( 'Terms Translation', 'bogo' ), - 'bogo_edit_terms_translation', 'bogo-texts', 'bogo_texts_page' + 'bogo_edit_terms_translation', + 'bogo-texts', + 'bogo_texts_page' ); add_action( 'load-' . $texts, 'bogo_load_texts_page', 10, 0 ); } } -add_filter( 'set-screen-option', 'bogo_set_screen_options', 10, 3 ); +add_filter( + 'set_screen_option_bogo_texts_per_page', + 'bogo_set_screen_options', + 10, 3 +); function bogo_set_screen_options( $result, $option, $value ) { $bogo_screens = array( - 'languages_page_bogo_texts_per_page', + 'bogo_texts_per_page', ); if ( in_array( $option, $bogo_screens ) ) { @@ -407,8 +406,8 @@ function bogo_load_texts_page() { ); add_screen_option( 'per_page', array( - 'label' => __( 'Items', 'bogo' ), 'default' => 20, + 'option' => 'bogo_texts_per_page', ) ); } } diff --git a/wp-content/plugins/bogo/admin/includes/post.php b/wp-content/plugins/bogo/admin/includes/post.php index 0ebb28fa70f9ae191f3e82e470e5af4b7e877270..5b0efe0055a71c8db361ecf0c22d4068b18646fc 100644 --- a/wp-content/plugins/bogo/admin/includes/post.php +++ b/wp-content/plugins/bogo/admin/includes/post.php @@ -272,6 +272,9 @@ function bogo_l10n_meta_box( $post ) { echo ' [' . $lang . ']'; echo '</li>'; + + // make it unavailable for select options + unset( $available_languages[$locale] ); } echo '</ul>'; diff --git a/wp-content/plugins/bogo/admin/includes/terms-translation.php b/wp-content/plugins/bogo/admin/includes/terms-translation.php index a28b1c03c145c4e78745126c31609268b3d04be7..3e8fb7ff296148f07a98b63a8ddde62b61d9ed3a 100644 --- a/wp-content/plugins/bogo/admin/includes/terms-translation.php +++ b/wp-content/plugins/bogo/admin/includes/terms-translation.php @@ -54,8 +54,7 @@ class Bogo_Terms_Translation_List_Table extends WP_List_Table { $items = array_filter( $items ); $items = array_values( $items ); - $per_page = $this->get_items_per_page( - 'languages_page_bogo_texts_per_page' ); + $per_page = $this->get_items_per_page( 'bogo_texts_per_page' ); $offset = ( $this->get_pagenum() - 1 ) * $per_page; $this->items = array_slice( $items, $offset, $per_page ); diff --git a/wp-content/plugins/bogo/bogo.php b/wp-content/plugins/bogo/bogo.php index 682f758ab50bcee3eb6d4ed35b2d6cdb82c5e6a7..27926739c60e0225d2eb74aed99d96ca7359f29a 100644 --- a/wp-content/plugins/bogo/bogo.php +++ b/wp-content/plugins/bogo/bogo.php @@ -7,10 +7,10 @@ Author: Takayuki Miyoshi Author URI: https://ideasilo.wordpress.com/ Text Domain: bogo Domain Path: /languages/ -Version: 3.3.2 +Version: 3.5 */ -define( 'BOGO_VERSION', '3.3.2' ); +define( 'BOGO_VERSION', '3.5' ); define( 'BOGO_PLUGIN', __FILE__ ); @@ -33,21 +33,12 @@ require_once BOGO_PLUGIN_DIR . '/includes/capabilities.php'; require_once BOGO_PLUGIN_DIR . '/includes/query.php'; require_once BOGO_PLUGIN_DIR . '/includes/flags.php'; require_once BOGO_PLUGIN_DIR . '/includes/rest-api.php'; -require_once BOGO_PLUGIN_DIR . '/includes/block-editor.php'; +require_once BOGO_PLUGIN_DIR . '/includes/block-editor/block-editor.php'; if ( is_admin() ) { require_once BOGO_PLUGIN_DIR . '/admin/admin.php'; } -add_action( 'plugins_loaded', 'bogo_plugins_loaded', 10, 0 ); - -function bogo_plugins_loaded() { - load_plugin_textdomain( 'bogo', - false, - 'bogo/languages' - ); -} - add_action( 'init', 'bogo_init', 10, 0 ); function bogo_init() { @@ -55,6 +46,21 @@ function bogo_init() { Bogo_POMO::import( determine_locale() ); } +add_filter( 'pre_determine_locale', 'bogo_pre_determine_locale', 10, 1 ); + +function bogo_pre_determine_locale( $locale ) { + if ( ! empty( $_GET['filter_action'] ) ) { + return $locale; + } + + if ( isset( $_GET['lang'] ) + and $closest = bogo_get_closest_locale( $_GET['lang'] ) ) { + $locale = $closest; + } + + return $locale; +} + add_filter( 'locale', 'bogo_locale', 10, 1 ); function bogo_locale( $locale ) { diff --git a/wp-content/plugins/bogo/includes/block-editor/block-editor.php b/wp-content/plugins/bogo/includes/block-editor/block-editor.php new file mode 100644 index 0000000000000000000000000000000000000000..9fc00371f4be3295bf0f3ebb36b1d557bc88d4d5 --- /dev/null +++ b/wp-content/plugins/bogo/includes/block-editor/block-editor.php @@ -0,0 +1,48 @@ +<?php + +add_action( + 'enqueue_block_editor_assets', + 'bogo_init_block_editor_assets', + 10, 0 +); + +function bogo_init_block_editor_assets() { + $assets = array(); + + $asset_file = path_join( + BOGO_PLUGIN_DIR, + 'includes/block-editor/index.asset.php' + ); + + if ( file_exists( $asset_file ) ) { + $assets = include( $asset_file ); + } + + $assets = wp_parse_args( $assets, array( + 'src' => plugins_url( + 'includes/block-editor/index.js', + BOGO_PLUGIN_BASENAME + ), + 'dependencies' => array( + 'wp-components', + 'wp-data', + 'wp-edit-post', + 'wp-element', + 'wp-plugins', + 'wp-i18n', + ), + 'version' => BOGO_VERSION, + ) ); + + wp_enqueue_script( + 'bogo-block-editor', + $assets['src'], + $assets['dependencies'], + $assets['version'] + ); + + wp_set_script_translations( + 'bogo-block-editor', + 'bogo' + ); +} diff --git a/wp-content/plugins/bogo/includes/block-editor/index.js b/wp-content/plugins/bogo/includes/block-editor/index.js new file mode 100644 index 0000000000000000000000000000000000000000..adc75d59a7f7b1a160a7948084b9186739294b2f --- /dev/null +++ b/wp-content/plugins/bogo/includes/block-editor/index.js @@ -0,0 +1,3 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.wp.url},function(e,t){e.exports=window.wp.apiFetch},function(e,t,n){var r=n(10),o=n(11),c=n(12),a=n(14);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||a()}},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.plugins},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=window.wp.editPost},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,r=!1,o=void 0;try{for(var c,a=e[Symbol.iterator]();!(_n=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{_n||null==a.return||a.return()}finally{if(r)throw o}}return n}}},function(e,t,n){var r=n(13);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";n.r(t);var r=n(7),o=n(3),c=n(4),a=n.n(c),l=n(8),i=n.n(l),u=n(5),s=n.n(u),b=n(0),f=n(9),p=n(2),g=n(6),O=n(1);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=function(e){return bogo.availableLanguages[e]?bogo.availableLanguages[e]:e};Object(r.registerPlugin)("bogo-language-panel",{render:function(){var e=Object(g.useSelect)((function(e){return Object.assign({},e("core/editor").getCurrentPost(),bogo.currentPost)}));if(-1==bogo.localizablePostTypes.indexOf(e.type))return Object(b.createElement)(b.Fragment,null);var t=Object(b.useState)(e.translations),n=s()(t,2),r=n[0],o=n[1];return Object(b.createElement)(f.PluginDocumentSettingPanel,{name:"bogo-language-panel",title:Object(O.__)("Language","bogo"),className:"bogo-language-panel"},Object(b.createElement)((function(){return Object(b.createElement)(p.PanelRow,null,Object(b.createElement)("span",null,Object(O.__)("Language","bogo")),Object(b.createElement)("div",null,m(e.locale)))}),null),Object(b.createElement)((function(){var e=[];return Object.entries(r).forEach((function(t){var n=s()(t,2),r=n[0],o=n[1];o.editLink&&o.postTitle?e.push(Object(b.createElement)("li",{key:r},Object(b.createElement)(p.ExternalLink,{href:o.editLink},o.postTitle),Object(b.createElement)("br",null),Object(b.createElement)("em",null,m(r)))):o.postTitle&&e.push(Object(b.createElement)("li",{key:r},o.postTitle,Object(b.createElement)("br",null),Object(b.createElement)("em",null,m(r))))})),Object(b.createElement)(p.PanelRow,null,Object(b.createElement)("span",null,Object(O.__)("Translations","bogo")),Object(b.createElement)((function(e){return e.listItems.length?Object(b.createElement)("ul",null,e.listItems):Object(b.createElement)("em",null,Object(O.__)("None","bogo"))}),{listItems:e}))}),null),Object(b.createElement)((function(){var t=[];return Object.entries(r).forEach((function(n){var c=s()(n,2),l=c[0],i=c[1];i.postId||t.push(Object(b.createElement)("li",{key:l},Object(b.createElement)(p.Button,{isDefault:!0,onClick:function(){var t,n;t=l,(n=d({},r))[t]={creating:!0},o(n),a()({path:"/bogo/v1/posts/".concat(e.id,"/translations/").concat(t),method:"POST"}).then((function(e){var n=d({},r);n[t]={postId:e[t].id,postTitle:e[t].title.raw,editLink:e[t].edit_link,creating:!1},o(n),Object(g.dispatch)("core/notices").createInfoNotice(Object(O.__)("Translation post created.","bogo"),{isDismissible:!0,type:"snackbar",speak:!0,actions:[{url:n[t].editLink,label:Object(O.__)("Edit Post","bogo")}]})}))}},Object(O.sprintf)( +/* translators: %s: Language name. */ +Object(O.__)("Add %s translation","bogo"),m(l))),i.creating&&Object(b.createElement)(p.Spinner,null)))})),t.length<1||"auto-draft"==e.status?Object(b.createElement)(b.Fragment,null):Object(b.createElement)(p.PanelRow,null,Object(b.createElement)("ul",null,t))}),null))},icon:"translation"}),a.a.use((function(e,t){var n=bogo.currentPost.lang;return n&&("string"!=typeof e.url||Object(o.hasQueryArg)(e.url,"lang")||(e.url=Object(o.addQueryArgs)(e.url,{lang:n})),"string"!=typeof e.path||Object(o.hasQueryArg)(e.path,"lang")||(e.path=Object(o.addQueryArgs)(e.path,{lang:n}))),t(e,t)}))}]); \ No newline at end of file diff --git a/wp-content/plugins/bogo/includes/functions.php b/wp-content/plugins/bogo/includes/functions.php index b80e34e8a6f6f2eac0a5f41e26d244094857a689..a3f58f0a4c0bcc63905c788eb4698eeede84a448 100644 --- a/wp-content/plugins/bogo/includes/functions.php +++ b/wp-content/plugins/bogo/includes/functions.php @@ -35,6 +35,7 @@ function bogo_languages() { 'de_AT' => __( 'German (Austria)', 'bogo' ), 'de_CH' => __( 'German (Switzerland)', 'bogo' ), 'de_CH_informal' => __( 'German (Switzerland) (Informal)', 'bogo' ), + 'dsb' => __( 'Lower Sorbian', 'bogo' ), 'dv' => __( 'Dhivehi', 'bogo' ), 'dzo' => __( 'Dzongkha', 'bogo' ), 'el' => __( 'Greek', 'bogo' ), diff --git a/wp-content/plugins/bogo/includes/post.php b/wp-content/plugins/bogo/includes/post.php index 5289b178daf5bd138402eca3d42e505025c24fc3..2cf056b11e39e6665ced0e55d88adf54fecf38bf 100644 --- a/wp-content/plugins/bogo/includes/post.php +++ b/wp-content/plugins/bogo/includes/post.php @@ -7,12 +7,17 @@ add_action( 'init', function() { $post_types = bogo_localizable_post_types(); + $auth_callback = function ( $allowed, $meta_key, $object_id, $user_id ) { + return user_can( $user_id, 'edit_post', $object_id ); + }; + foreach ( $post_types as $post_type ) { register_post_meta( $post_type, '_locale', array( 'type' => 'string', 'single' => true, + 'auth_callback' => $auth_callback, 'show_in_rest' => true, ) ); @@ -22,6 +27,7 @@ add_action( 'init', array( 'type' => 'string', 'single' => true, + 'auth_callback' => $auth_callback, 'show_in_rest' => true, ) ); @@ -632,3 +638,18 @@ function bogo_truncate_post_slug( $slug, $length = 200 ) { return rtrim( $slug, '-' ); } + + +add_filter( + 'wp_sitemaps_posts_query_args', + 'bogo_sitemaps_posts_query_args', + 10, 2 +); + +function bogo_sitemaps_posts_query_args( $args, $post_type ) { + if ( bogo_is_localizable_post_type( $post_type ) ) { + $args['bogo_suppress_locale_query'] = true; + } + + return $args; +} diff --git a/wp-content/plugins/bogo/includes/rest-api.php b/wp-content/plugins/bogo/includes/rest-api.php index c720a94fd52b320cb4fdd8862b4b7a5076c4e9b3..f57262d7baf14982a812b1ce8b4459d6eb9740da 100644 --- a/wp-content/plugins/bogo/includes/rest-api.php +++ b/wp-content/plugins/bogo/includes/rest-api.php @@ -8,6 +8,7 @@ function bogo_rest_api_init() { array( 'methods' => WP_REST_Server::READABLE, 'callback' => 'bogo_rest_languages', + 'permission_callback' => '__return_true', ) ); @@ -16,6 +17,7 @@ function bogo_rest_api_init() { array( 'methods' => WP_REST_Server::READABLE, 'callback' => 'bogo_rest_post_translations', + 'permission_callback' => '__return_true', ) ); @@ -26,6 +28,18 @@ function bogo_rest_api_init() { array( 'methods' => WP_REST_Server::CREATABLE, 'callback' => 'bogo_rest_create_post_translation', + 'permission_callback' => function( WP_REST_Request $request ) { + $locale = $request->get_param( 'locale' ); + + if ( current_user_can( 'bogo_access_locale', $locale ) ) { + return true; + } else { + return new WP_Error( 'bogo_locale_forbidden', + __( "You are not allowed to access posts in the requested locale.", 'bogo' ), + array( 'status' => 403 ) + ); + } + }, ) ); } @@ -178,13 +192,6 @@ function bogo_rest_create_post_translation( WP_REST_Request $request ) { ); } - if ( ! current_user_can( 'bogo_access_locale', $locale ) ) { - return new WP_Error( 'bogo_locale_forbidden', - __( "You are not allowed to access posts in the requested locale.", 'bogo' ), - array( 'status' => 403 ) - ); - } - $new_post_id = bogo_duplicate_post( $post, $locale ); if ( ! $new_post_id ) { diff --git a/wp-content/plugins/bogo/includes/rewrite.php b/wp-content/plugins/bogo/includes/rewrite.php index 40845b54c18413d91b1acf29fa5a81a5d460c02c..31382659056595cef9e2daedc72ed6554ae9181c 100644 --- a/wp-content/plugins/bogo/includes/rewrite.php +++ b/wp-content/plugins/bogo/includes/rewrite.php @@ -19,188 +19,6 @@ function bogo_add_rewrite_tags() { } } -add_filter( 'root_rewrite_rules', 'bogo_root_rewrite_rules', 10, 1 ); - -function bogo_root_rewrite_rules( $root_rewrite ) { - global $wp_rewrite; - - $permastruct = trailingslashit( $wp_rewrite->root ) . '%lang%/'; - - $extra = bogo_generate_rewrite_rules( $permastruct, array( - 'ep_mask' => EP_ROOT, - ) ); - - return array_merge( $extra, $root_rewrite ); -} - -add_filter( 'post_rewrite_rules', 'bogo_post_rewrite_rules', 10, 1 ); - -function bogo_post_rewrite_rules( $post_rewrite ) { - global $wp_rewrite; - - $permastruct = $wp_rewrite->permalink_structure; - - // from wp-admin/includes/misc.php - $got_rewrite = apply_filters( 'got_rewrite', - apache_mod_loaded( 'mod_rewrite', true ) - ); - - $got_url_rewrite = apply_filters( 'got_url_rewrite', - $got_rewrite || $GLOBALS['is_nginx'] || iis7_supports_permalinks() - ); - - if ( ! $got_url_rewrite ) { - $permastruct = preg_replace( - '#^/index\.php#', '/index.php/%lang%', $permastruct - ); - } elseif ( is_multisite() - and ! is_subdomain_install() - and is_main_site() ) { - $permastruct = preg_replace( - '#^/blog#', '/%lang%/blog', $permastruct - ); - } else { - $permastruct = preg_replace( - '#^/#', '/%lang%/', $permastruct - ); - } - - $extra = bogo_generate_rewrite_rules( $permastruct, array( - 'ep_mask' => EP_PERMALINK, - 'paged' => false, - ) ); - - return array_merge( $extra, $post_rewrite ); -} - -add_filter( 'date_rewrite_rules', 'bogo_date_rewrite_rules', 10, 1 ); - -function bogo_date_rewrite_rules( $date_rewrite ) { - global $wp_rewrite; - - $permastruct = $wp_rewrite->get_date_permastruct(); - - $permastruct = preg_replace( - '#^' . $wp_rewrite->front . '#', - '/%lang%' . $wp_rewrite->front, - $permastruct - ); - - $extra = bogo_generate_rewrite_rules( $permastruct, array( - 'ep_mask' => EP_DATE, - ) ); - - return array_merge( $extra, $date_rewrite ); -} - -add_filter( 'comments_rewrite_rules', 'bogo_comments_rewrite_rules', 10, 1 ); - -function bogo_comments_rewrite_rules( $comments_rewrite ) { - global $wp_rewrite; - - $permastruct = trailingslashit( $wp_rewrite->root ) - . '%lang%/' . $wp_rewrite->comments_base; - - $extra = bogo_generate_rewrite_rules( $permastruct, array( - 'ep_mask' => EP_COMMENTS, - 'forcomments' => true, - 'walk_dirs' => false, - ) ); - - return array_merge( $extra, $comments_rewrite ); -} - -add_filter( 'search_rewrite_rules', 'bogo_search_rewrite_rules', 10, 1 ); - -function bogo_search_rewrite_rules( $search_rewrite ) { - global $wp_rewrite; - - $permastruct = trailingslashit( $wp_rewrite->root ) . '%lang%/' - . $wp_rewrite->search_base . '/%search%'; - - $extra = bogo_generate_rewrite_rules( $permastruct, array( - 'ep_mask' => EP_SEARCH, - ) ); - - return array_merge( $extra, $search_rewrite ); -} - -add_filter( 'author_rewrite_rules', 'bogo_author_rewrite_rules', 10, 1 ); - -function bogo_author_rewrite_rules( $author_rewrite ) { - global $wp_rewrite; - - $permastruct = $wp_rewrite->get_author_permastruct(); - - $permastruct = preg_replace( - '#^' . $wp_rewrite->front . '#', - '/%lang%' . $wp_rewrite->front, - $permastruct - ); - - $extra = bogo_generate_rewrite_rules( $permastruct, array( - 'ep_mask' => EP_AUTHORS, - ) ); - - return array_merge( $extra, $author_rewrite ); -} - -add_filter( 'page_rewrite_rules', 'bogo_page_rewrite_rules', 10, 1 ); - -function bogo_page_rewrite_rules( $page_rewrite ) { - global $wp_rewrite; - - $wp_rewrite->add_rewrite_tag( '%pagename%', '(.?.+?)', 'pagename=' ); - $permastruct = trailingslashit( $wp_rewrite->root ) . '%lang%/%pagename%'; - - $extra = bogo_generate_rewrite_rules( $permastruct, array( - 'ep_mask' => EP_PAGES, - 'walk_dirs' => false, - ) ); - - return array_merge( $extra, $page_rewrite ); -} - -add_filter( 'category_rewrite_rules', 'bogo_category_rewrite_rules', 10, 1 ); - -function bogo_category_rewrite_rules( $category_rewrite ) { - return bogo_taxonomy_rewrite_rules( $category_rewrite, - 'category', EP_CATEGORIES - ); -} - -add_filter( 'post_tag_rewrite_rules', 'bogo_post_tag_rewrite_rules', 10, 1 ); - -function bogo_post_tag_rewrite_rules( $post_tag_rewrite ) { - return bogo_taxonomy_rewrite_rules( $post_tag_rewrite, 'post_tag', EP_TAGS ); -} - -add_filter( 'post_format_rewrite_rules', - 'bogo_post_format_rewrite_rules', - 10, 1 -); - -function bogo_post_format_rewrite_rules( $post_format_rewrite ) { - return bogo_taxonomy_rewrite_rules( $post_format_rewrite, 'post_format' ); -} - -function bogo_taxonomy_rewrite_rules( $taxonomy_rewrite, $taxonomy, $ep_mask = EP_NONE ) { - global $wp_rewrite; - - $permastruct = $wp_rewrite->get_extra_permastruct( $taxonomy ); - - $permastruct = preg_replace( - '#^' . $wp_rewrite->front . '#', - '/%lang%' . $wp_rewrite->front, - $permastruct - ); - - $extra = bogo_generate_rewrite_rules( $permastruct, array( - 'ep_mask' => $ep_mask, - ) ); - - return array_merge( $extra, $taxonomy_rewrite ); -} add_filter( 'rewrite_rules_array', 'bogo_rewrite_rules_array', 10, 1 ); @@ -209,57 +27,21 @@ function bogo_rewrite_rules_array( $rules ) { $lang_regex = bogo_get_lang_regex(); - // REST rewrite rules - if ( function_exists( 'rest_get_url_prefix' ) ) { - $rest_url_prefix = rest_get_url_prefix(); - - $extra_rules = array( - "^{$lang_regex}/{$rest_url_prefix}/?$" - => 'index.php?lang=$matches[1]&rest_route=/', - "^{$lang_regex}/{$rest_url_prefix}/(.*)?" - => 'index.php?lang=$matches[1]&rest_route=/$matches[2]', - ); - - $rules = $extra_rules + $rules; - } - - $post_types = array_diff( - (array) bogo_localizable_post_types(), - get_post_types( array( '_builtin' => true ) ) - ); - - if ( empty( $post_types ) ) { - return $rules; - } - - foreach ( $post_types as $post_type ) { - if ( ! $post_type_obj = get_post_type_object( $post_type ) ) { - continue; - } + $extra_rules = array(); + $localizable_post_types = bogo_localizable_post_types(); - if ( false === $post_type_obj->rewrite ) { + foreach ( $localizable_post_types as $post_type ) { + if ( ! $post_type_obj = get_post_type_object( $post_type ) + or false === $post_type_obj->rewrite ) { continue; } $permastruct = $wp_rewrite->get_extra_permastruct( $post_type ); + $permastruct = bogo_add_lang_to_permastruct( $permastruct ); - if ( $post_type_obj->rewrite['with_front'] ) { - $permastruct = preg_replace( - '#^' . $wp_rewrite->front . '#', - '/%lang%' . $wp_rewrite->front, - $permastruct - ); - } else { - $permastruct = preg_replace( - '#^' . $wp_rewrite->root . '#', - '/%lang%/' . $wp_rewrite->root, - $permastruct - ); - } - - $rules = array_merge( - bogo_generate_rewrite_rules( $permastruct, $post_type_obj->rewrite ), - $rules + $extra_rules += bogo_generate_rewrite_rules( + $permastruct, + $post_type_obj->rewrite ); if ( $post_type_obj->has_archive ) { @@ -275,149 +57,242 @@ function bogo_rewrite_rules_array( $rules ) { $archive_slug = $wp_rewrite->root . $archive_slug; } - $extra_rules = array( + $extra_rules += array( "{$lang_regex}/{$archive_slug}/?$" => 'index.php?lang=$matches[1]&post_type=' . $post_type, ); - $rules = $extra_rules + $rules; - - if ( $post_type_obj->rewrite['feeds'] && $wp_rewrite->feeds ) { + if ( $post_type_obj->rewrite['feeds'] and $wp_rewrite->feeds ) { $feeds = '(' . trim( implode( '|', $wp_rewrite->feeds ) ) . ')'; - $extra_rules = array( + $extra_rules += array( "{$lang_regex}/{$archive_slug}/feed/$feeds/?$" => 'index.php?lang=$matches[1]&post_type=' . $post_type . '&feed=$matches[2]', "{$lang_regex}/{$archive_slug}/$feeds/?$" => 'index.php?lang=$matches[1]&post_type=' . $post_type . '&feed=$matches[2]', ); - - $rules = $extra_rules + $rules; } if ( $post_type_obj->rewrite['pages'] ) { - $extra_rules = array( - "{$lang_regex}/{$archive_slug}/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$" => 'index.php?lang=$matches[1]&post_type=' . $post_type . '&paged=$matches[2]', + $extra_rules += array( + "{$lang_regex}/{$archive_slug}/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$" + => 'index.php?lang=$matches[1]&post_type=' . $post_type . '&paged=$matches[2]', ); - - $rules = $extra_rules + $rules; } } + } - foreach ( get_object_taxonomies( $post_type ) as $tax ) { - if ( ! $tax_obj = get_taxonomy( $tax ) ) { - continue; - } + $localizable_taxonomies = get_object_taxonomies( + $localizable_post_types, + 'objects' + ); - if ( false === $tax_obj->rewrite ) { - continue; - } + foreach ( $localizable_taxonomies as $taxonomy ) { + if ( empty( $taxonomy->rewrite ) ) { + continue; + } - $permastruct = $wp_rewrite->get_extra_permastruct( $tax ); + $permastruct = $wp_rewrite->get_extra_permastruct( $taxonomy->name ); + $permastruct = bogo_add_lang_to_permastruct( $permastruct ); - if ( $tax_obj->rewrite['with_front'] ) { - $permastruct = preg_replace( - '#^' . $wp_rewrite->front . '#', - '/%lang%' . $wp_rewrite->front, - $permastruct - ); - } else { - $permastruct = preg_replace( - '#^' . $wp_rewrite->root . '#', - '/%lang%/' . $wp_rewrite->root, - $permastruct - ); - } + $extra_rules += bogo_generate_rewrite_rules( + $permastruct, + $taxonomy->rewrite + ); + } - $rules = array_merge( - bogo_generate_rewrite_rules( $permastruct, $tax_obj->rewrite ), - $rules - ); - } + $root_rules = bogo_generate_rewrite_rules( + bogo_add_lang_to_permastruct( $wp_rewrite->root ), + array( 'ep_mask' => EP_ROOT ) + ); + + $comments_rules = bogo_generate_rewrite_rules( + bogo_add_lang_to_permastruct( + $wp_rewrite->root . $wp_rewrite->comments_base + ), + array( + 'ep_mask' => EP_COMMENTS, + 'forcomments' => true, + 'walk_dirs' => false, + ) + ); + + $search_rules = bogo_generate_rewrite_rules( + bogo_add_lang_to_permastruct( $wp_rewrite->get_search_permastruct() ), + array( 'ep_mask' => EP_SEARCH ) + ); + + $author_rules = bogo_generate_rewrite_rules( + bogo_add_lang_to_permastruct( $wp_rewrite->get_author_permastruct() ), + array( 'ep_mask' => EP_AUTHORS ) + ); + + $date_rules = bogo_generate_rewrite_rules( + bogo_add_lang_to_permastruct( $wp_rewrite->get_date_permastruct() ), + array( 'ep_mask' => EP_DATE ) + ); + + $post_rules = bogo_generate_rewrite_rules( + bogo_add_lang_to_permastruct( $wp_rewrite->permalink_structure ), + array( + 'ep_mask' => EP_PERMALINK, + 'paged' => false, + ) + ); + + $wp_rewrite->add_rewrite_tag( '%pagename%', '(.?.+?)', 'pagename=' ); + + $page_rules = bogo_generate_rewrite_rules( + bogo_add_lang_to_permastruct( $wp_rewrite->get_page_permastruct() ), + array( + 'ep_mask' => EP_PAGES, + 'walk_dirs' => false, + ) + ); + + if ( $wp_rewrite->use_verbose_page_rules ) { + $rules = array_merge( + $extra_rules, + $root_rules, + $comments_rules, + $search_rules, + $author_rules, + $date_rules, + $page_rules, + $post_rules, + $rules + ); + } else { + $rules = array_merge( + $extra_rules, + $root_rules, + $comments_rules, + $search_rules, + $author_rules, + $date_rules, + $post_rules, + $page_rules, + $rules + ); } return $rules; } + +function bogo_add_lang_to_permastruct( $permastruct ) { + global $wp_rewrite; + + $root_quoted = preg_quote( $wp_rewrite->root ); + + $remains = preg_replace( "#^{$root_quoted}#", '', $permastruct ); + $remains = path_join( '%lang%', ltrim( $remains, '/' ) ); + + return path_join( $wp_rewrite->root, $remains ); +} + + function bogo_generate_rewrite_rules( $permalink_structure, $args = '' ) { global $wp_rewrite; - $defaults = array( + $args = wp_parse_args( $args, array( 'ep_mask' => EP_NONE, 'paged' => true, 'feed' => true, 'forcomments' => false, 'walk_dirs' => true, 'endpoints' => true, - ); - - $args = wp_parse_args( $args, $defaults ); + ) ); - extract( $args, EXTR_SKIP ); + if ( strpos( $permalink_structure, '%lang%' ) === false ) { + return array(); + } $feedregex2 = '(' . implode( '|', $wp_rewrite->feeds ) . ')/?$'; $feedregex = $wp_rewrite->feed_base . '/' . $feedregex2; $trackbackregex = 'trackback/?$'; $pageregex = $wp_rewrite->pagination_base . '/?([0-9]{1,})/?$'; - $commentregex = 'comment-page-([0-9]{1,})/?$'; + $commentregex = $wp_rewrite->comments_pagination_base . '-([0-9]{1,})/?$'; $embedregex = 'embed/?$'; - if ( $endpoints ) { + if ( $args['endpoints'] ) { $ep_query_append = array(); foreach ( (array) $wp_rewrite->endpoints as $endpoint ) { $epmatch = $endpoint[1] . '(/(.*))?/?$'; - $epquery = '&' . $endpoint[1] . '='; + $epquery = '&' . $endpoint[2] . '='; $ep_query_append[$epmatch] = array( $endpoint[0], $epquery ); } } - $front = substr( $permalink_structure, 0, strpos( $permalink_structure, '%' ) ); + $front = substr( + $permalink_structure, + 0, + strpos( $permalink_structure, '%' ) + ); + preg_match_all( '/%.+?%/', $permalink_structure, $tokens ); - $num_tokens = count( $tokens[0] ); + $index = $wp_rewrite->index; $feedindex = $index; $trackbackindex = $index; $embedindex = $index; - for ( $i = 0; $i < $num_tokens; ++$i ) { + $queries = array(); + + for ( $i = 0; $i < count( $tokens[0] ); ++$i ) { if ( 0 < $i ) { $queries[$i] = $queries[$i - 1] . '&'; } else { $queries[$i] = ''; } - $query_token = - str_replace( $wp_rewrite->rewritecode, $wp_rewrite->queryreplace, $tokens[0][$i] ) - . $wp_rewrite->preg_index( $i + 1 ); + $query_token = str_replace( + $wp_rewrite->rewritecode, + $wp_rewrite->queryreplace, + $tokens[0][$i] + ) . $wp_rewrite->preg_index( $i + 1 ); $queries[$i] .= $query_token; } $structure = $permalink_structure; - if ( $front != '/' ) { + if ( '/' !== $front ) { $structure = str_replace( $front, '', $structure ); } $structure = trim( $structure, '/' ); - $dirs = $walk_dirs ? explode( '/', $structure ) : array( $structure ); - $num_dirs = count( $dirs ); + $dirs = $args['walk_dirs'] + ? explode( '/', $structure ) + : array( $structure ); $front = preg_replace( '|^/+|', '', $front ); $post_rewrite = array(); $struct = $front; - for ( $j = 0; $j < $num_dirs; ++$j ) { + for ( $j = 0; $j < count( $dirs ); ++$j ) { $struct .= $dirs[$j] . '/'; $struct = ltrim( $struct, '/' ); - $match = str_replace( $wp_rewrite->rewritecode, $wp_rewrite->rewritereplace, $struct); + + $match = str_replace( + $wp_rewrite->rewritecode, + $wp_rewrite->rewritereplace, + $struct + ); + $num_toks = preg_match_all( '/%.+?%/', $struct, $toks ); - $query = ( isset( $queries ) && is_array( $queries ) && ! empty( $num_toks ) ) - ? $queries[$num_toks - 1] : ''; + if ( $num_toks < count( $tokens[0] ) + and $toks[0] === array( '%lang%' ) ) { + continue; + } + + $query = ( ! empty( $num_toks ) && isset( $queries[$num_toks - 1] ) ) + ? $queries[$num_toks - 1] + : ''; switch ( $dirs[$j] ) { case '%year%': @@ -456,34 +331,48 @@ function bogo_generate_rewrite_rules( $permalink_structure, $args = '' ) { $feedquery2 = $feedindex . '?' . $query . '&feed=' . $wp_rewrite->preg_index( $num_toks + 1 ); - if ( $forcomments ) { + $embedmatch = $match . $embedregex; + $embedquery = $embedindex . '?' . $query . '&embed=true'; + + if ( $args['forcomments'] ) { $feedquery .= '&withcomments=1'; $feedquery2 .= '&withcomments=1'; } $rewrite = array(); - if ( $feed ) { - $rewrite = array( $feedmatch => $feedquery, $feedmatch2 => $feedquery2 ); + if ( $args['feed'] ) { + $rewrite = array( + $feedmatch => $feedquery, + $feedmatch2 => $feedquery2, + $embedmatch => $embedquery, + ); } - if ( $paged ) { - $rewrite = array_merge( $rewrite, array( $pagematch => $pagequery ) ); + if ( $args['paged'] ) { + $rewrite = array_merge( + $rewrite, + array( $pagematch => $pagequery ) + ); } - if ( EP_PAGES & $ep_mask - or EP_PERMALINK & $ep_mask ) { - $rewrite = array_merge( $rewrite, array( $commentmatch => $commentquery ) ); - } elseif ( EP_ROOT & $ep_mask + if ( EP_PAGES & $args['ep_mask'] + or EP_PERMALINK & $args['ep_mask'] ) { + $rewrite = array_merge( + $rewrite, + array( $commentmatch => $commentquery ) + ); + } elseif ( EP_ROOT & $args['ep_mask'] and get_option( 'page_on_front' ) ) { - $rewrite = array_merge( $rewrite, + $rewrite = array_merge( + $rewrite, array( $rootcommentmatch => $rootcommentquery ) ); } - if ( $endpoints ) { + if ( $args['endpoints'] ) { foreach ( (array) $ep_query_append as $regex => $ep ) { - if ( $ep[0] & $ep_mask + if ( $ep[0] & $args['ep_mask'] or $ep[0] & $ep_mask_specific ) { $rewrite[$match . $regex] = $index . '?' . $query . $ep[1] . $wp_rewrite->preg_index( $num_toks + 2 ); @@ -551,13 +440,13 @@ function bogo_generate_rewrite_rules( $permalink_structure, $args = '' ) { $subcommentquery = $subquery . '&cpage=' . $wp_rewrite->preg_index( 2 ); $subembedquery = $subquery . '&embed=true'; - if ( ! empty( $endpoints ) ) { + if ( ! empty( $args['endpoints'] ) ) { foreach ( (array) $ep_query_append as $regex => $ep ) { if ( $ep[0] & EP_ATTACHMENT ) { $rewrite[$sub1 . $regex] = - $subquery . $ep[1] . $wp_rewrite->preg_index( 2 ); + $subquery . $ep[1] . $wp_rewrite->preg_index( 3 ); $rewrite[$sub2 . $regex] = - $subquery . $ep[1] . $wp_rewrite->preg_index( 2 ); + $subquery . $ep[1] . $wp_rewrite->preg_index( 3 ); } } } @@ -565,7 +454,7 @@ function bogo_generate_rewrite_rules( $permalink_structure, $args = '' ) { $sub1 .= '?$'; $sub2 .= '?$'; - $match = $match . '(/[0-9]+)?/?$'; + $match = $match . '(?:/([0-9]+))?/?$'; $query = $index . '?' . $query . '&page=' . $wp_rewrite->preg_index( $num_toks + 1 ); } else { @@ -576,27 +465,41 @@ function bogo_generate_rewrite_rules( $permalink_structure, $args = '' ) { $rewrite = array_merge( $rewrite, array( $match => $query ) ); if ( $post ) { - $rewrite = array_merge( array( $trackbackmatch => $trackbackquery ), $rewrite ); + $rewrite = array_merge( + array( $trackbackmatch => $trackbackquery ), + $rewrite + ); - $rewrite = array_merge( array( $embedmatch => $embedquery ), $rewrite ); + $rewrite = array_merge( + array( $embedmatch => $embedquery ), + $rewrite + ); if ( ! $page ) { - $rewrite = array_merge( $rewrite, array( - $sub1 => $subquery, - $sub1tb => $subtbquery, - $sub1feed => $subfeedquery, - $sub1feed2 => $subfeedquery, - $sub1comment => $subcommentquery, - $sub1embed => $subembedquery ) ); + $rewrite = array_merge( + $rewrite, + array( + $sub1 => $subquery, + $sub1tb => $subtbquery, + $sub1feed => $subfeedquery, + $sub1feed2 => $subfeedquery, + $sub1comment => $subcommentquery, + $sub1embed => $subembedquery, + ) + ); } - $rewrite = array_merge( array( - $sub2 => $subquery, - $sub2tb => $subtbquery, - $sub2feed => $subfeedquery, - $sub2feed2 => $subfeedquery, - $sub2comment => $subcommentquery, - $sub2embed => $subembedquery ), $rewrite ); + $rewrite = array_merge( + array( + $sub2 => $subquery, + $sub2tb => $subtbquery, + $sub2feed => $subfeedquery, + $sub2feed2 => $subfeedquery, + $sub2comment => $subcommentquery, + $sub2embed => $subembedquery, + ), + $rewrite + ); } } diff --git a/wp-content/plugins/bogo/includes/user.php b/wp-content/plugins/bogo/includes/user.php index 8b28cab01a4041cd73f863621cd29cf71d6852d9..607f176eb48baeb18fbc68032d606f9011cad232 100644 --- a/wp-content/plugins/bogo/includes/user.php +++ b/wp-content/plugins/bogo/includes/user.php @@ -2,9 +2,9 @@ /* Toolbar (Admin Bar) */ -add_action( 'admin_bar_init', 'bogo_admin_bar_init', 10, 0 ); +add_action( 'admin_bar_menu', 'bogo_admin_bar_init', 0, 1 ); -function bogo_admin_bar_init() { +function bogo_admin_bar_init( $wp_admin_bar ) { switch_to_locale( bogo_get_user_locale() ); } diff --git a/wp-content/plugins/bogo/license.txt b/wp-content/plugins/bogo/license.txt index d6f34fd22912c5c0649424e5481bcdbb2631c8d4..c43a242ec5b4d47a6c2a4a7aaa8fb24ee6d02b0e 100644 --- a/wp-content/plugins/bogo/license.txt +++ b/wp-content/plugins/bogo/license.txt @@ -1,366 +1,366 @@ -Bogo WordPress Plugin, 2007-2020 Takayuki Miyoshi -Bogo is distributed under the terms of the GNU GPL - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Bogo WordPress Plugin bundles the following third-party resources: - -Flag icons -Flag icons are public domain -Source: http://www.famfamfam.com - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. +Bogo WordPress Plugin, 2007-2021 Takayuki Miyoshi +Bogo is distributed under the terms of the GNU GPL + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Bogo WordPress Plugin bundles the following third-party resources: + +Flag icons +Flag icons are public domain +Source: http://www.famfamfam.com + + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/wp-content/plugins/bogo/readme.txt b/wp-content/plugins/bogo/readme.txt index 284570b292672f55ac82390ccbda5e40a4961c0d..74e55a386b13cef4f9cd130cedcf98a67e6165a0 100644 --- a/wp-content/plugins/bogo/readme.txt +++ b/wp-content/plugins/bogo/readme.txt @@ -1,98 +1,78 @@ -=== Bogo === -Contributors: takayukister, itpixelz -Tags: multilingual, localization, language, locale, admin -Requires at least: 5.3 -Tested up to: 5.4 -Stable tag: 3.3.2 -License: GPLv2 or later -License URI: https://www.gnu.org/licenses/gpl-2.0.html -Donate link: https://contactform7.com/donate/ - -A straight-forward multilingual plugin. No more double-digit custom DB tables or hidden HTML comments that could cause you headaches later on. - -== Description == - -https://ideasilo.wordpress.com/bogo/ - -Bogo is a straight-forward multilingual plugin for WordPress. - -The core of WordPress itself has the built-in localization capability so you can use the dashboard and theme in one language other than English. Bogo expands this capability to let you easily build a multilingual blog on a single WordPress install. - -Here are some technical details for those interested. Bogo plugin assigns [one language per post](https://wordpress.org/support/article/multilingual-wordpress/#different-types-of-multilingual-plugins). It plays nice with WordPress – Bogo does not create any additional custom table on your database, unlike some other plugins in this category. This design makes Bogo a solid, reliable and conflict-free multilingual plugin. - -= Getting started with Bogo = - -1. Install language packs - - First, install language packs for languages you use on the site. You can view and install language packs in the **Language Packs** screen (**Languages > Language Packs**). - -2. Select your language for admin screen - - Bogo lets each logged-in user select a language for their admin screen UI. Select a language from the menu on the [**Toolbar**](https://wordpress.org/support/article/administration-screens/#toolbar-keeping-it-all-together), or from the menu in the **Profile** screen (**Users > Your Profile**) if the **Toolbar** is invisible. - -3. Translate your posts and pages - - To create a translation post, go to the editor screen for the original post and find the **Language** box. Bogo does only make a copy of the post; translating the copied post is your task. - -4. Add language switcher widgets - - It would be useful for site visitors if you have a language switcher on your site. Bogo provides the **Language Switcher** widget in the **Widgets** screen (**Appearance > Widgets**). - - You can also use the `[bogo]` shortcode to put a language switcher inside a post content. If you want to use this shortcode in your theme's template files, embed the following code into the template: - - `<?php echo do_shortcode( '[bogo]' ); ?>` - -= Privacy notices = - -With the default configuration, this plugin, in itself, does not: - -* track users by stealth; -* write any user personal data to the database; -* send any data to external servers; -* use cookies. - -== Installation == - -1. Upload the entire `bogo` folder to the `/wp-content/plugins/` directory. -1. Activate the plugin through the **Plugins** screen (**Plugins > Installed Plugins**). - -== Screenshots == - -1. You can select your language in the **Toolbar**. -1. The **Language** box manages the post's translations. -1. The **Language Packs** screen lets you view and install language packs. - -== Changelog == - -= 3.3.2 = - -* User locale: Fixes several issues seen when you are logged-in as a non-Administrator role user. -* User locale: Renders the **Toolbar** in the logged-in user's locale even on the front side. -* Capabilities: Editor role users can now access the **Terms Translation** page, but higher level capabilities are required to edit some of translation items. -* Makes the `exclude_enus_if_inactive` option true by default. -* New filter hook: `bogo_get_short_name` - -= 3.3.1 = - -* Block Editor: Displays a spinner icon when creating a translation post. -* Block Editor: Suggests posts in the same locale as the current post when making a text link or doing other operations in a block. -* Block Editor: Fixes the issue that character references appear in post titles. - -= 3.3 = - -* Supports Block Editor. -* Adds the `short_name` option to `bogo_available_languages()`. -* Uses the post guid for the value of the `_original_post` post meta. -* Improves HTML markup of the language switcher. - -= 3.2.1 = - -* Recalculates values in some WP query parameters in bogo_parse_query(). - -= 3.2 = - -* Uses the install_languages as the default capability required for the Language Packs page. -* Adds rel="noopener noreferrer" and screenreader text to target="_blank" links. -* Adds a filter hook: bogo_terms_translation. -* Introduces the Bogo_Terms_Translation_List_Table class. -* Introduces the Bogo_Language_Packs_List_Table class. +=== Bogo === +Contributors: takayukister, itpixelz +Tags: multilingual, localization, language, locale, admin +Requires at least: 5.5 +Tested up to: 5.7 +Stable tag: 3.5 +License: GPLv2 or later +License URI: https://www.gnu.org/licenses/gpl-2.0.html +Donate link: https://contactform7.com/donate/ + +A straight-forward multilingual plugin. No more double-digit custom DB tables or hidden HTML comments that could cause you headaches later on. + +== Description == + +https://ideasilo.wordpress.com/bogo/ + +Bogo is a straight-forward multilingual plugin for WordPress. + +The core of WordPress itself has the built-in localization capability so you can use the dashboard and theme in one language other than English. Bogo expands this capability to let you easily build a multilingual blog on a single WordPress install. + +Here are some technical details for those interested. Bogo plugin assigns [one language per post](https://wordpress.org/support/article/multilingual-wordpress/#different-types-of-multilingual-plugins). It plays nice with WordPress – Bogo does not create any additional custom table on your database, unlike some other plugins in this category. This design makes Bogo a solid, reliable and conflict-free multilingual plugin. + += Getting started with Bogo = + +1. Install language packs + + First, install language packs for languages you use on the site. You can view and install language packs in the **Language Packs** screen (**Languages > Language Packs**). + +2. Select your language for admin screen + + Bogo lets each logged-in user select a language for their admin screen UI. Select a language from the menu on the [**Toolbar**](https://wordpress.org/support/article/administration-screens/#toolbar-keeping-it-all-together), or from the menu in the **Profile** screen (**Users > Your Profile**) if the **Toolbar** is invisible. + +3. Translate your posts and pages + + To create a translation post, go to the editor screen for the original post and find the **Language** box. Bogo does only make a copy of the post; translating the copied post is your task. + +4. Add language switcher widgets + + It would be useful for site visitors if you have a language switcher on your site. Bogo provides the **Language Switcher** widget in the **Widgets** screen (**Appearance > Widgets**). + + You can also use the `[bogo]` shortcode to put a language switcher inside a post content. If you want to use this shortcode in your theme's template files, embed the following code into the template: + + `<?php echo do_shortcode( '[bogo]' ); ?>` + += Privacy notices = + +With the default configuration, this plugin, in itself, does not: + +* track users by stealth; +* write any user personal data to the database; +* send any data to external servers; +* use cookies. + +== Installation == + +1. Upload the entire `bogo` folder to the `/wp-content/plugins/` directory. +1. Activate the plugin through the **Plugins** screen (**Plugins > Installed Plugins**). + +== Screenshots == + +1. You can select your language in the **Toolbar**. +1. The **Language** box manages the post's translations. +1. The **Language Packs** screen lets you view and install language packs. + +== Changelog == + += 3.5 = + +* Adds `auth_callback` to post meta definition. +* Suppresses locale query for XML sitemap. +* Corrects several rewrite rules-related issues. + += 3.4 = + +* Modernize the JS build process. +* Uses `__()` in JavaScript. +* Has removed some unused functions and variables. +* Has been tested with WordPress 5.6.