Plugin Directory

Changeset 2887122


Ignore:
Timestamp:
03/26/2023 02:35:59 PM (3 years ago)
Author:
seomantis
Message:

fixed issues, now SEO Copywriting AKA Keys4up goes fast, very fast

Location:
seo-copywriting
Files:
106 added
3 edited

Legend:

Unmodified
Added
Removed
  • seo-copywriting/trunk/README.txt

    r2869424 r2887122  
    55Requires at least: 4.7
    66Tested up to: 6.1.1
    7 Stable tag: 2.3.2
     7Stable tag: 2.3.4
    88Requires PHP: 7.1
    99License: GPLv2 or later
     
    4040== Changelog ==
    4141
     42= 2.3.4 =
     43Faster response for Query Suggestion
     44
     45= 2.3.3 =
     46Faster response for Seo Copy
     47
    4248= 2.3.2 =
    4349Minor bugfixes
  • seo-copywriting/trunk/admin/js/seocopy-admin.js

    r2869424 r2887122  
    5050                            }, 800);
    5151                        } else {
    52                             callback(response.token);
     52                            callback( response ); // NEW
     53                            //callback( response.token ); // OLD
    5354                        }
    5455                    }
     
    114115        },
    115116        printFoundKeywords:function(keywords){
     117            console.log( 'printFoundKeywords' );
    116118            var that = this;
    117119            $('#seocopy-keyword-searching-div').hide();
     
    178180        },
    179181        printFoundQuerySuggestionKeywords: function( keywords ){
     182            console.log( 'printFoundQuerySuggestionKeywords' );
    180183            var that = this;
    181184            $('#seocopy-query-suggestion-searching-div').hide();
     
    226229        },
    227230        resetSearch:function(){
     231            console.log( 'resetSearch' );
    228232            this.data.currentSearchKeywords = null;
    229233            clearTimeout(this.data.debouncingTimeout);
     
    235239            $('#seocopy-keyword-search-div').show();
    236240        },
    237         checkSearchSubmission: function () {
     241        // New api, checkSearchSubmission is useless
     242        /*checkSearchSubmission: function () {
     243            console.log( 'checkSearchSubmission' );
    238244            var that = this;
    239245            this.api.retrieveResource(this.data.currentSearchUuid, function (data) {
     
    277283
    278284            });
    279         },
     285        },*/
    280286        checkQuerySuggestionSubmission: function(){
     287            console.log( 'checkQuerySuggestionSubmission' );
    281288            var that = this;
    282289            this.api.retrieveResource(this.data.currentQuerySuggestionUuid, function (data) {
     
    311318        },
    312319        changeLoadingSuggestions:function(first){
     320            console.log( 'changeLoadingSuggestions' );
    313321            var that = this;
    314322            var n_elements = $('#seocopy-keyword-searching-random-texts-div > span').length;
     
    328336        },
    329337        submitSearch: function () {
     338            console.log( 'submitSearch' );
    330339            var that = this;
    331340            const api_key = $('#seocopy-keyword-submit').data('api-key');
     
    346355                    'LSIKeywords.advice':true,
    347356                    'api-key': api_key
    348                     },
    349                     function (token) {
    350                     // Suggestions
    351                     that.data.currentSearchUuid = token;
    352                     setTimeout(that.checkSearchSubmission.bind(that), 2000);
     357                },function ( data ) {
     358                    //that.data.currentSearchUuid = token;
     359                    //setTimeout(that.checkSearchSubmission.bind(that), 2000);
     360                    // Filter nulls to prevent errors
     361                    that.data.currentSearchKeywords = data.LSIKeywords.filter(function(x){
     362                        return x !== null;
     363                    });
     364                    // Add density manually
     365                    that.data.currentSearchKeywords = that.data.currentSearchKeywords.map(function(x){
     366                        x.dens = Math.ceil(x.count * 0.42);
     367                        return x;
     368                    });
     369
     370                    that.printFoundKeywords(that.data.currentSearchKeywords);
    353371                }, function (e) {
    354372                    $('#seocopy-keyword-search-div').show();
     
    374392        },
    375393        changeLoadingQuerySuggestion:function(first){
     394            console.log( 'changeLoadingQuerySuggestion' );
    376395            var that = this;
    377396            var n_elements = $('#seocopy-query-suggestion-searching-random-texts-div > span').length;
     
    390409        },
    391410        submitQuerySuggestion: function(){
     411            console.log( 'submitQuerySuggestion' );
    392412            var that = this;
    393413            const api_key = $('#seocopy-query-suggestion-submit').data('api-key');
     
    407427                that.changeLoadingQuerySuggestion(true);
    408428
    409                 this.api.createResourceRequest('querySuggestion', language, keyword, {
     429                this.api.createResourceRequest('Suggestqueries', language, keyword, {
    410430                    'querySuggestion.renew':true,
    411431                    'api-key': api_key
    412432                },
    413                 function (token) {
     433                function ( data ) {
    414434                    // Suggestions
    415                     that.data.currentQuerySuggestionUuid = token;
    416                     that.checkQuerySuggestionSubmission();
     435                    //that.data.currentQuerySuggestionUuid = response.token;
     436                    //that.checkQuerySuggestionSubmission();
    417437                    //setTimeout(that.checkQuerySuggestionSubmission().bind(that), 2000);
     438
     439                    for( const key  in data.querySuggestion ) {
     440                        // Filter nulls to prevent errors
     441                        const querySuggestion = data.querySuggestion[ key ];
     442                        // TODO - Da capire questa cosa
     443                        that.data.currentQuerySuggestionKeywords[ key ] = querySuggestion.filter(function(x){
     444                            return x !== null;
     445                        });
     446                        // Add density manually
     447                        that.data.currentQuerySuggestionKeywords[ key ] = that.data.currentQuerySuggestionKeywords[ key ].map(function(x){
     448                            x.dens = Math.ceil(x.count * 0.42);
     449                            return x;
     450                        });
     451                    }
     452                    that.printFoundQuerySuggestionKeywords(that.data.currentQuerySuggestionKeywords);
     453
    418454                }, function (e) {
    419455                    $('#seocopy-query-suggestion-div').show();
     
    439475        },
    440476        resetQuerySuggestion: function(){
     477            console.log( 'resetQuerySuggestion' );
    441478            this.data.currentQuerySuggestionKeywords = [];
    442479            clearTimeout(this.data.debouncingTimeout);
     
    449486        },
    450487        onLoad: function () {
     488            console.log( 'onLoad' );
    451489            var that = this;
    452490            $('#seocopy-keyword-submit').click(function (e) {
     
    736774        },
    737775        computeResultsCounters: function(){
     776            console.log( 'computeResultsCounters' );
    738777            $('.seocopy-keyword-resultgroup-tagwrap').each(function(){
    739778               $('.seocopy-keyword-resultgroup-counter',this).text(
     
    743782        },
    744783        computeQuerySuggestionResultsCounters: function(){
     784            console.log( 'computeQuerySuggestionResultsCounters' );
    745785            $('.seocopy-query-suggestion-resultgroup-tagwrap').each(function(){
    746786                $('.seocopy-query-suggestion-resultgroup-counter',this).text(
     
    753793         */
    754794        fillDensityNoResults: function(){
     795            console.log( 'fillDensityNoResults' );
    755796            this.data.currentSearchKeywords.forEach(function(keyword){
    756797               if(keyword._tagnames && 'P' in keyword._tagnames){
     
    764805        },
    765806        fillDensityNoQuerySuggestionResults: function(){
     807            console.log( 'fillDensityNoQuerySuggestionResults' );
    766808            this.data.currentQuerySuggestionKeywords.forEach(function(keyword){
    767809                if(keyword._tagnames && 'P' in keyword._tagnames){
     
    775817        },
    776818        analyzeTextDebounce: function () {
    777             console.log('analyzing');
     819            console.log('analyzeTextDebounce');
    778820            var that = this;
    779821            var element = this.data.debouncingAnalyzeData[0];
  • seo-copywriting/trunk/seocopy.php

    r2869424 r2887122  
    1111 * Plugin URI:        https://wpseoplugins.org/seo-copywriting/
    1212 * Description:       Keyword research made easy!
    13  * Version:           2.3.2
     13 * Version:           2.3.4
    1414 * Author:            WP SEO Plugins
    1515 * Author URI:        https://www.wpseoplugins.org
     
    3030 * Rename this for your plugin and update it as you release new versions.
    3131 */
    32 define( 'seocopy_VERSION', '2.3.2' );
     32define( 'seocopy_VERSION', '2.3.4' );
    3333define( 'seocopy_DOMAIN', 'seocopy' );
    3434define( 'SEOCOPY_SERVER_NAME', $_SERVER['SERVER_NAME']);
Note: See TracChangeset for help on using the changeset viewer.