Plugin Directory

Changeset 2386984


Ignore:
Timestamp:
09/23/2020 09:56:56 AM (5 years ago)
Author:
siteattention
Message:

published and draft pages feature

Location:
siteattention/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • siteattention/trunk/README.txt

    r2358836 r2386984  
    66Requires at least: 4.8
    77Tested up to: 5.4
    8 Stable tag: 3.0.5
     8Stable tag: 3.0.6
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    105105* Fixed UI issue
    106106
     107= 3.0.6 =
     108
     109* Released published and draft pages features
     110
    107111== Upgrade Notice ==
    108112
     
    139143
    140144* Fixed UI issue
     145
     146= 3.0.6 =
     147
     148* Released published and draft pages features
  • siteattention/trunk/admin/class-siteattention-admin.php

    r2353991 r2386984  
    135135            'post_type' => get_current_screen()->id,
    136136            'iid' => $instance_id,
    137             'url' => get_permalink(),
     137            'url' => get_permalink(get_the_ID()),
    138138            'site_url' => site_url(),
    139139            'pid' => get_the_ID(),
  • siteattention/trunk/admin/js/siteattention-module.js

    r2353991 r2386984  
    148148        getUrl()
    149149        {
     150            if(SiteAttentionInfo.published == 'publish'){
     151                SiteAttentionInfo.url = wp.data.select( 'core/editor' ).getPermalink();
     152            }
    150153            return SiteAttentionInfo.url;
    151154        }
     
    166169        getPublished()
    167170        {
    168             return SiteAttentionInfo.published === '1';
     171            if(SiteAttentionInfo.published == 'publish'){
     172                SiteAttentionInfo.published = true;
     173            } else {
     174                SiteAttentionInfo.published = false;
     175            }
     176            return SiteAttentionInfo.published;
    169177        }
    170178
     
    11331141            (new SiteAttentionWordPress()).setScore();
    11341142        }
    1135 
    11361143    });
    11371144
     
    11411148        }
    11421149    });
     1150
     1151    var editPost = wp.data.select( 'core/editor' ), lastIsSaving = false;
     1152    wp.data.subscribe(function() {
     1153        var isSaving = editPost.isSavingPost();
     1154        if ( isSaving !== lastIsSaving && !isSaving ) {
     1155            var isCurrentPostPublished = editPost.isCurrentPostPublished();
     1156            var isAutosavingPost = editPost.isAutosavingPost();
     1157            if (isCurrentPostPublished && !isAutosavingPost) {
     1158                var getKeywordVal = $('#SiteAttention_list_keyword').val();
     1159                if(getKeywordVal != undefined && getKeywordVal != '') {
     1160                    lastIsSaving = isSaving;
     1161                    SiteAttentionInfo.published = 'publish';
     1162                    (new SiteAttentionWordPress()).secureRules();
     1163                }
     1164            }
     1165        }
     1166        lastIsSaving = isSaving;
     1167    });
    11431168} )(jQuery);
  • siteattention/trunk/includes/siteattention_seo_tool.php

    r2358836 r2386984  
    3434
    3535
    36 define ( 'SITEATTENTION_VERSION' , '3.0.5' );
     36define ( 'SITEATTENTION_VERSION' , '3.0.6' );
    3737define ( 'SITEATTENTION_NAME' , 'SiteAttention' );
    3838define ( 'SITEATTENTION_URL' , SITEATTENTION_API_URL );
  • siteattention/trunk/siteattention.php

    r2358836 r2386984  
    1616 * Plugin Name:       SiteAttention
    1717 * Description:       Simple and intuitive SEO tool to help improve seach ranking.
    18  * Version:           3.0.5
     18 * Version:           3.0.6
    1919 * Author:            siteattention
    2020 * Author URI:        https://siteattention.com
     
    2525 */
    2626
    27 define('SITEATTENTION_API_URL', 'https://rest.siteattention.com/api');
     27define('SITEATTENTION_API_URL', 'https://laraveldev.siteattention.com/api');
    2828define('SITEATTENTION_DASH_URL', 'https://dashboard.siteattention.com');
    2929define('SITEATTENTION_PL_URL', rtrim(plugin_dir_url(__FILE__), '/'));
Note: See TracChangeset for help on using the changeset viewer.