Changeset 3021816
- Timestamp:
- 01/15/2024 10:16:20 AM (2 years ago)
- Location:
- seo-key/trunk
- Files:
-
- 13 edited
-
admin/assets/js/build/bloc-faq/import/seokey-blocks-faq-import.asset.php (modified) (1 diff)
-
admin/assets/js/build/bloc-faq/import/seokey-blocks-faq-import.js (modified) (1 diff)
-
admin/assets/js/build/bloc-faq/seokey-blocks-faq.asset.php (modified) (1 diff)
-
admin/assets/js/seokey-blocks-faq-import.js (modified) (3 diffs)
-
admin/modules/audit/audit-single-content.php (modified) (1 diff)
-
admin/modules/medias-library.php (modified) (1 diff)
-
admin/modules/sitemap/sitemaps.php (modified) (1 diff)
-
common/seo-key-helpers.php (modified) (1 diff)
-
public/assets/languages/seo-key-fr_FR-seokey-blocks-faq-import.json (modified) (1 diff)
-
public/assets/languages/seo-key-fr_FR.mo (modified) (previous)
-
public/assets/languages/seo-key-fr_FR.po (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
-
seo-key.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
seo-key/trunk/admin/assets/js/build/bloc-faq/import/seokey-blocks-faq-import.asset.php
r3011832 r3021816 1 <?php return array('dependencies' => array(), 'version' => ' 15c4f4e7c0a0b28780a1');1 <?php return array('dependencies' => array(), 'version' => '599edf6d5293cb3cc71f'); -
seo-key/trunk/admin/assets/js/build/bloc-faq/import/seokey-blocks-faq-import.js
r3011832 r3021816 1 !function(t){const{__:__}=wp.i18n;var e={init:function(){!0===document.body.classList.contains("block-editor-page")&&this.getContent()},getContent:function(){t(".wp-block-yoast-faq-block").each((function(){const e='<span class="block-editor-warning__action"><button type="button" class="components-button is-primary seokey-button-block-replacement">'+__("Replace this block with SEOKEY block","seo-key")+"</button></span>";t(this).parent().siblings("div").find(".block-editor-warning__actions").prepend(e)})),t("button.seokey-button-block-replacement").click((function(){var e=t(this).parents('div[data-type="core/missing"]')[0].id;e=e.replace("block-","");var o=wp.data.select("core/block-editor").getBlockAttributes(e);if("yoast/faq-block"===o.originalName){var n=t(t.parseHTML(o.originalUndelimitedContent)),i=[];n.find(".schema-faq-section").each((function(){i.push({question:t(this).find(".schema-faq-question").text(),response:t(this).find(".schema-faq-answer").html()})})),wp.data.dispatch("core/block-editor").replaceBlock(e,wp.blocks.createBlock("seokey/faq-block",{faq:i}))}else alert(__("This block is not re gonised!","seo-key"))}))}};t(window).on("load",(function(){setTimeout((function(){e.init()}),3e3)}))}(jQuery);1 !function(t){const{__:__}=wp.i18n;var e={init:function(){!0===document.body.classList.contains("block-editor-page")&&this.getContent()},getContent:function(){t(".wp-block-yoast-faq-block").each((function(){const e='<span class="block-editor-warning__action"><button type="button" class="components-button is-primary seokey-button-block-replacement">'+__("Replace this block with SEOKEY block","seo-key")+"</button></span>";t(this).parent().siblings("div").find(".block-editor-warning__actions").prepend(e)})),t("button.seokey-button-block-replacement").click((function(){var e=t(this).parents('div[data-type="core/missing"]')[0].id;e=e.replace("block-","");var o=wp.data.select("core/block-editor").getBlockAttributes(e);if("yoast/faq-block"===o.originalName){var n=t(t.parseHTML(o.originalUndelimitedContent)),i=[];n.find(".schema-faq-section").each((function(){i.push({question:t(this).find(".schema-faq-question").text(),response:t(this).find(".schema-faq-answer").html()})})),wp.data.dispatch("core/block-editor").replaceBlock(e,wp.blocks.createBlock("seokey/faq-block",{faq:i}))}else alert(__("This block is not recognised!","seo-key"))}))}};t(window).on("load",(function(){setTimeout((function(){e.init()}),3e3)}))}(jQuery); -
seo-key/trunk/admin/assets/js/build/bloc-faq/seokey-blocks-faq.asset.php
r3011832 r3021816 1 <?php return array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => ' 6d17083857e48b4cfdc88f32b3966b59');1 <?php return array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'b0727e6ecf32803b20d97b682a6783b3'); -
seo-key/trunk/admin/assets/js/seokey-blocks-faq-import.js
r3011832 r3021816 14 14 } 15 15 }, 16 16 17 /** 17 18 * Get content form current editor … … 48 49 break; 49 50 default: 50 alert( __( 'This block is not re gonised!', 'seo-key' ) )51 alert( __( 'This block is not recognised!', 'seo-key' ) ) 51 52 break; 52 53 } … … 54 55 }, 55 56 } 57 56 58 /** 57 59 * Wait page loaded status -
seo-key/trunk/admin/modules/audit/audit-single-content.php
r2974175 r3021816 66 66 wp_send_json_error("No valid post"); 67 67 } 68 } 69 70 add_action( 'save_post', 'seokey_save_keyword_on_post_save', 10, 3 ); 71 /** 72 * Save SEOKEY keyword on currently saved post 73 * 74 * @author Arthur Leveque 75 * @since 1.8.1 76 */ 77 function seokey_save_keyword_on_post_save( $post_id, $post, $update ) { 78 if ( !is_admin() ) { 79 return; 80 } 81 if ( !current_user_can( seokey_helper_user_get_capability( 'contributor' ) ) ) { 82 return; 83 } 84 // Do nothing if it's not an editor and this is not your post 85 $current_user = wp_get_current_user(); 86 if( ! current_user_can( seokey_helper_user_get_capability( 'editor' ) ) && $post->post_author !== $current_user->ID ) { 87 return; 88 } 89 // Exclude adding keyword to secupress logs 90 if ( $post_id > 0 && $post->post_type !== 'secupress_log_action' ) { 91 $keyword = ( isset( $_POST['seokey_audit_content_main_keyword'] ) ) ? sanitize_text_field( $_POST['seokey_audit_content_main_keyword'] ) : ''; 92 // Do we have a keyword ? 93 if ( !empty ( $keyword ) ) { 94 // Update post meta 95 if ( ! add_post_meta( $post_id, 'seokey-main-keyword', $keyword, true ) ) { 96 update_post_meta ( $post_id, 'seokey-main-keyword', $keyword ); 97 } 98 // We need to add our keyword in our specific table 99 // Get Database Object 100 global $wpdb; 101 $table = $wpdb->prefix . 'seokey_keywords'; 102 // only delete old values if we are updating and not creating the current post 103 if ( $update ) { 104 $wpdb->delete( $table, array( 105 'content_id' => $post_id 106 ), array( '%d' ) ); 107 } 108 // Prepare data in order to add this keyword to our list 109 $post_url = get_permalink( $post_id ); 110 $request_datas = [ 111 'keyword' => $keyword, 112 'content_url' => $post_url, 113 'content_type' => $post->post_type, 114 'content_id' => $post_id, 115 ]; 116 // Date format 117 $format = ['%s', '%s', '%s', '%d']; 118 // Save data 119 $wpdb->insert( $table, $request_datas, $format ); 120 } 121 } 68 122 } 69 123 -
seo-key/trunk/admin/modules/medias-library.php
r2922339 r3021816 738 738 elseif ('without_alt' === $param) { 739 739 $query->query_vars['meta_query'] = array( 740 array( 741 'key' => '_wp_attachment_image_alt', 742 'compare' => 'NOT EXISTS' 740 'relation' => 'OR', 741 array ( 742 'key' => '_wp_attachment_image_alt', 743 'value' => '', 744 'compare' => '=', 743 745 ), 746 array ( 747 'key' => '_wp_attachment_image_alt', 748 'compare' => 'NOT EXISTS', 749 ) 744 750 ); 745 751 $query->query_vars['post_mime_type'] = "image"; -
seo-key/trunk/admin/modules/sitemap/sitemaps.php
r3011832 r3021816 107 107 update_option( 'seokey_sitemap_creation', 'running', true ); 108 108 } 109 110 add_action( 'template_redirect', 'seokey_redirect_404_sitemaps' ); 111 /** 112 * Redirect on sitemaps index if the sitemap we are currently heading to is disabled or deleted 113 * 114 * @since 1.8.1 115 * @author Arthur Leveque 116 * 117 * @hook template_redirect 118 **/ 119 function seokey_redirect_404_sitemaps() { 120 // If we are on a 404 page 121 if( is_404() ) { 122 // If we are on a sitemap page continue, else ignore 123 if ( seokey_helpers_is_sitemaps_page() ) { 124 // If we have a multilingual site, check for language of sitemap, else just redirect to sitemaps index 125 if ( isset( seokey_helper_cache_data('languages')['lang'] ) ) { 126 // Get language from URL by getting the last 7 letters (ex : FRA.xml) and getting only the language code 127 $language = substr( esc_url( seokey_helper_url_get_current() ), -7, 3); 128 // Redirect to the sitemaps index of the language we have in the URL 129 wp_redirect( rtrim( get_home_url(), '/' ) . seokey_helpers_get_sitemap_base_url() . 'sitemap-index-' . $language . '.xml', 301 ); 130 } else { 131 wp_redirect( rtrim( get_home_url(), '/' ) . seokey_helpers_get_sitemap_base_url(), 301 ); 132 } 133 exit; // Always exit after wp_redirect() 134 } 135 } 136 } -
seo-key/trunk/common/seo-key-helpers.php
r3011832 r3021816 1348 1348 } 1349 1349 1350 /** 1351 * Check if we are curently on a sitemaps page 1352 * 1353 * @return boolean 1354 * @author Arthur Leveque 1355 * 1356 * @since 1.8.1 1357 */ 1358 function seokey_helpers_is_sitemaps_page(){ 1359 $sitemaps_url = seokey_helpers_get_sitemap_base_url(); // get SeoKey's sitemaps URL to compare 1360 // Check if in current requested URL, we have the SeoKey's sitemaps URL 1361 return str_contains( esc_url( seokey_helper_url_get_current() ), $sitemaps_url ); 1362 } 1363 1350 1364 // TODO Comment 1351 1365 function seokey_helpers_get_parent_key( $array, $search_value, $key ) { -
seo-key/trunk/public/assets/languages/seo-key-fr_FR-seokey-blocks-faq-import.json
r3011832 r3021816 12 12 }, 13 13 "Replace this block with SEOKEY block":["Remplacer ce bloc avec le bloc SEOKEY"], 14 "This block is not re gonised!":["Ce bloc n'est pas reconnu !"]14 "This block is not recognised!":["Ce bloc n'est pas reconnu !"] 15 15 } 16 16 } -
seo-key/trunk/public/assets/languages/seo-key-fr_FR.po
r3011832 r3021816 3 3 "Project-Id-Version: SEOKEY Pro\n" 4 4 "POT-Creation-Date: 2023-12-18 10:30+0100\n" 5 "PO-Revision-Date: 202 3-12-18 10:34+0100\n"5 "PO-Revision-Date: 2024-01-09 14:18+0100\n" 6 6 "Last-Translator: \n" 7 7 "Language-Team: \n" … … 1412 1412 "(Schema.org markup)" 1413 1413 msgstr "" 1414 "Vos réglages \" \"Qui êtes-vous ?\" ne sont pas renseignés. <a "1414 "Vos réglages \"Qui êtes-vous ?\" ne sont pas renseignés. <a " 1415 1415 "href=\"%s\">Remplissez les informations vous concernant</a> pour améliorer " 1416 1416 "votre crédibilité auprès de Google (balisage Schema.org)." … … 1423 1423 "Google (Schema.org markup)." 1424 1424 msgstr "" 1425 "Vos réglages \" \"Qui êtes-vous ?\" ne sont pas entièrement configurés. <a "1425 "Vos réglages \"Qui êtes-vous ?\" ne sont pas entièrement configurés. <a " 1426 1426 "href=\"%s\">Remplissez les informations vous concernant</a> pour améliorer " 1427 1427 "votre crédibilité auprès de Google (balisage Schema.org)." … … 1867 1867 #: admin/modules/audit/tasks/content_author_incomplete_infos.php:91 1868 1868 msgid "Author have incomplete data" 1869 msgstr "Auteur sans informations complète "1869 msgstr "Auteur sans informations complètes" 1870 1870 1871 1871 #: admin/modules/audit/tasks/technical_incomplete_who_are_you.php:79 -
seo-key/trunk/readme.txt
r3011866 r3021816 7 7 Tested up to: 6.4.2 8 8 Requires PHP: 7.2 9 Stable tag: 1.8. 09 Stable tag: 1.8.1 10 10 License: GPLv2 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 192 192 == Changelog == 193 193 Public roadmap is here: https://trello.com/b/jauwlc3J/seokey-pro-public-roadmap 194 195 = 1.8.1 196 * Improvement: keywords are now correctly saved when you create or save a post 197 * Improvement: a disabled content (a Post Type or a Taxonomy) does no longer return a 404 error, they are now automatically redirected 198 * Fixed: sometimes, empty ALT images were not shown in the SEOKEY ALT editor 199 * Fixed: translations fixes 194 200 195 201 = 1.8.0 -
seo-key/trunk/seo-key.php
r3011832 r3021816 9 9 * Text Domain: seo-key 10 10 * Domain Path: /public/assets/languages/ 11 * Version: 1.8. 011 * Version: 1.8.1 12 12 * Requires at least: 5.5 13 13 * Tested up to: 6.4.2 … … 43 43 define( 'SEOKEY_PHP_MIN', '7.2' ); // PHP Minimum Version 44 44 define( 'SEOKEY_WP_MIN', '5.5' ); // WP Minimum Version 45 define( 'SEOKEY_VERSION', '1.8. 0' ); // SEOKEY actual version45 define( 'SEOKEY_VERSION', '1.8.1' ); // SEOKEY actual version 46 46 // Static Constants 47 47 define( 'SEOKEY_SETTINGS_SLUG', 'seokey-settings' ); // SEOKEY Settings Slug in options table
Note: See TracChangeset
for help on using the changeset viewer.