Skip to content

Commit

Permalink
Updated URLs
Browse files Browse the repository at this point in the history
* UPDATED: Store URL to support extensions
  • Loading branch information
kjbenk committed Feb 5, 2016
1 parent f84d2c4 commit beefa3a
Show file tree
Hide file tree
Showing 12 changed files with 70 additions and 36 deletions.
19 changes: 19 additions & 0 deletions css/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,23 @@

.msa-vertical-tabs-content-current {
display: block;
}

/* =====================================================
*
* Licensing
*
==================================================== */

p.msa-activation-message {
color: inherit;
}

p.msa-license-valid {
color: green;
}

p.msa-license-invalid,
p.msa-license-expired {
color: red;
}
2 changes: 1 addition & 1 deletion functions/admin-notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function msa_admin_notices() {
if ( defined('DISABLE_WP_CRON') && DISABLE_WP_CRON ) {
?>
<div class="error">
<p><?php _e('WP Cron is <span style="color:red;font-weight:bold;">DISABLED</span>! My Site Audit needs WP Cron to be enabled in order to create an audit. Please read our', 'msa'); ?> <a href="https://mysiteaudit.com/docs/how-to-enable-wp-cron/" target="_blank"><?php _e('documentation page', 'msa'); ?></a> <?php _e('about how to enable WP Cron.', 'msa'); ?></p>
<p><?php _e('WP Cron is <span style="color:red;font-weight:bold;">DISABLED</span>! My Site Audit needs WP Cron to be enabled in order to create an audit. Please read our', 'msa'); ?> <a href="https://99robots.com/docs/how-to-enable-wp-cron/" target="_blank"><?php _e('documentation page', 'msa'); ?></a> <?php _e('about how to enable WP Cron.', 'msa'); ?></p>
</div>
<?php
}
Expand Down
10 changes: 6 additions & 4 deletions functions/admin-pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ function msa_settings_scripts() {
'site_url' => get_site_url(),
'activate_text' => __('Activate', 'msa'),
'deactivate_text' => __('Deactivate', 'msa'),
'no_license_key' => __('Please add or activate your License Key to get automatic updates. Without a valid license key you will not receive regular updates. You can find your license key', 'msa') . ' <a href="https://mysiteaudit.com/dashboard" target="_blank">here</a>',
'expired' => __('EXPIRED LICENSE KEY: This license key has expired. Please renew your license key', 'msa') . ' <a href="https://mysiteaudit.com/dashboard" target="_blank">here</a>',
'no_license_key' => __('Please add or activate your License Key to get automatic updates. Without a valid license key you will not receive regular updates. You can find your license key', 'msa') . ' <a href="https://99robots.com/dashboard" target="_blank">here</a>',
'expired' => __('EXPIRED LICENSE KEY: This license key has expired. Please renew your license key', 'msa') . ' <a href="https://99robots.com/dashboard" target="_blank">here</a>',
'inactive' => __('INACTIVE LICENSE KEY: The license key is not active for this site. Please activate it by clicking the Activate button to the right.', 'msa'),
'activation_error' => __('INVALID LICENSE KEY: The license key is not valid please try again. You can find your license key', 'msa') . ' <a href="https://mysiteaudit.com/dashboard" target="_blank">here</a>.',
'activation_error' => __('INVALID LICENSE KEY: The license key is not valid please try again. You can find your license key', 'msa') . ' <a href="https://99robots.com/dashboard" target="_blank">here</a>.',
'activation_valid' => __('SUCCESS: Your license key is valid.', 'msa'),
'deactivation_valid' => __('SUCCESS: This site has been deactivated.', 'msa'),
'deactivation_error' => __('DEACTIVATION FAILED: This site could not be deactivated.', 'msa'),
Expand Down Expand Up @@ -386,6 +386,8 @@ function msa_settings() {
*/
function msa_extensions() {

require_once(MY_SITE_AUDIT_PLUGIN_DIR . 'controllers/extensions.php');
msa_force_redirect('https://99robots.com/products/category/my-site-audit/');

//require_once(MY_SITE_AUDIT_PLUGIN_DIR . 'controllers/extensions.php');

}
18 changes: 14 additions & 4 deletions functions/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function msa_add_new_audit_check($data) {
$audit_model = new MSA_Audits_Model();
$audits = $audit_model->get_data();

if ( count($audits) >= MY_SITE_AUDIT_MAX_AUDITS ) {
if ( count($audits) >= msa_get_max_audits() ) {
return false;
}

Expand All @@ -137,11 +137,11 @@ function msa_add_new_audit_check($data) {
*/
function msa_save_more_audits_extension($audits) {

if ( count($audits) >= MY_SITE_AUDIT_MAX_AUDITS ) {
if ( count($audits) >= msa_get_max_audits() ) {

$audits[] = array(
'extension' => true,
'extension-link' => 'https://mysiteaudit.com/?post_type=download&p=74&utm_source=plugin&utm_campaign=extension',
'extension-link' => 'https://99robots.com/products/msa-conditions-control?utm_source=plugin&utm_campaign=extension',
'score' => 1,
'name' => __('Want to Save more Audits? Get the Extension!', 'msa'),
'date' => date('Y-m-d H:i:s'),
Expand All @@ -153,4 +153,14 @@ function msa_save_more_audits_extension($audits) {
return $audits;

}
add_filter('msa_all_audits_table_items', 'msa_save_more_audits_extension', 10, 1);
add_filter('msa_all_audits_table_items', 'msa_save_more_audits_extension', 10, 1);

/**
* Get the maximum number of audits a user is allowed to have
*
* @access public
* @return void
*/
function msa_get_max_audits() {
return apply_filters('msa_get_max_audits', MY_SITE_AUDIT_MAX_AUDITS);
}
2 changes: 1 addition & 1 deletion functions/extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function msa_get_remote_extensions() {

$remote_extensions = array();

$response = wp_remote_get( 'https://mysiteaudit.com/extensions.json' );
$response = wp_remote_get( 'https://99robots.com/msa-extensions.json' );

if ( is_array($response) ) {
$remote_extensions = json_decode($response['body'], true);
Expand Down
2 changes: 1 addition & 1 deletion functions/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function msa_plugin_row_meta( $input, $file ) {
'utm_source' => 'plugins-page',
'utm_medium' => 'plugin-row',
'utm_campaign' => 'admin',
), 'https://mysiteaudit.com/extensions' )
), MY_SITE_AUDIT_EXT_URL )
);

$links = array(
Expand Down
4 changes: 2 additions & 2 deletions functions/system-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function msa_settings_tab_system_info_content($content) {

$system_status_table .= '<tr>
<td class="msa-system-status-row bad"><strong>' . __('PHP Version', 'msa') . '</strong></td>
<td>' . __('The required minimum version of PHP is <strong>v' . MY_SITE_AUDIT_MIN_PHP_VERSION . '</strong> and your version is <strong>v' . phpversion() . '</strong>. Your version of PHP is outdated and we strongly recommend that you <a href="https://mysiteaudit.com/docs/how-to-update-your-php-version/?utm_source=plugin&utm_medium_system_info" target="_blank">update</a> your version of PHP to at least <strong>v' . MY_SITE_AUDIT_MIN_PHP_VERSION . '</strong>.', 'msa') . '</td>
<td>' . __('The required minimum version of PHP is <strong>v' . MY_SITE_AUDIT_MIN_PHP_VERSION . '</strong> and your version is <strong>v' . phpversion() . '</strong>. Your version of PHP is outdated and we strongly recommend that you <a href="https://99robots.com/docs/how-to-update-your-php-version/?utm_source=plugin&utm_medium_system_info" target="_blank">update</a> your version of PHP to at least <strong>v' . MY_SITE_AUDIT_MIN_PHP_VERSION . '</strong>.', 'msa') . '</td>
</tr>';
$bad++;

Expand All @@ -71,7 +71,7 @@ function msa_settings_tab_system_info_content($content) {

$system_status_table .= '<tr>
<td class="msa-system-status-row bad"><strong>' . __('WP Cron', 'msa') . '</strong></td>
<td>' . __('WP Cron is <span style="color:red;font-weight:bold;">DISABLED</span>! My Site Audit needs WP Cron to be enabled in order to create an audit. Please read our', 'msa'); ?> <a href="https://mysiteaudit.com/docs/how-to-enable-wp-cron/" target="_blank"><?php _e('documentation page', 'msa'); ?></a> <?php _e('about how to enable WP Cron.', 'msa') . '</td>
<td>' . __('WP Cron is <span style="color:red;font-weight:bold;">DISABLED</span>! My Site Audit needs WP Cron to be enabled in order to create an audit. Please read our', 'msa'); ?> <a href="https://99robots.com/docs/how-to-enable-wp-cron/" target="_blank"><?php _e('documentation page', 'msa'); ?></a> <?php _e('about how to enable WP Cron.', 'msa') . '</td>
</tr>';
$bad++;

Expand Down
2 changes: 1 addition & 1 deletion functions/welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ function msa_welcome_credits_page() {

<?php msa_welcome_page_tabs(); ?>

<p class="about-description"><?php _e( 'My Site Audit is created by the great people at 99 Robots. We are looking for contributors all the time so please', 'msa' ); ?> <a href="https://mysiteaudit.com/contact/" target="_blank"><?php _e('Contact Us', 'msa'); ?></a> <?php _e( 'if you want to become a contributor.', 'msa' ); ?></p>
<p class="about-description"><?php _e( 'My Site Audit is created by the great people at 99 Robots. We are looking for contributors all the time so please', 'msa' ); ?> <a href="https://99robots.com/contact/" target="_blank"><?php _e('Contact Us', 'msa'); ?></a> <?php _e( 'if you want to become a contributor.', 'msa' ); ?></p>

<?php echo msa_display_contributors(); ?>

Expand Down
24 changes: 12 additions & 12 deletions js/licensing.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,22 @@ jQuery(document).ready(function($){
if ( response == 'valid' ) {

element.parent().append(license_deactivate_button);
element.parent().append('<p class="description msa-activation-message">' + msa_licensing_data.activation_valid + '</p>');
element.parent().append('<p class="description msa-activation-message msa-license-' + response + '">' + msa_licensing_data.activation_valid + '</p>');

} else if ( response == 'expired' ) {

element.parent().append(license_activate_button);
element.parent().append('<p class="description msa-activation-message">' + msa_licensing_data.expired + '</p>');
element.parent().append('<p class="description msa-activation-message msa-license-' + response + '">' + msa_licensing_data.expired + '</p>');

} else if ( response == 'inactive' ) {

element.parent().append(license_activate_button);
element.parent().append('<p class="description msa-activation-message">' + msa_licensing_data.inactive + '</p>');
element.parent().append('<p class="description msa-activation-message msa-license-' + response + '">' + msa_licensing_data.inactive + '</p>');

} else {

element.parent().append(license_activate_button);
element.parent().append('<p class="description msa-activation-message">' + msa_licensing_data.activation_error + '</p>');
element.parent().append('<p class="description msa-activation-message msa-license-' + response + '">' + msa_licensing_data.activation_error + '</p>');

}

Expand All @@ -132,9 +132,9 @@ jQuery(document).ready(function($){

element.parent().append(spinner);

$('.msa-activation-message').remove();
$('.msa-activate-license').remove();
$('.msa-deactivate-license').remove();
element.parent().find('.msa-activation-message').remove();
element.parent().find('.msa-activate-license').remove();
element.parent().find('.msa-deactivate-license').remove();

var data = {
'action': 'msa_license_action',
Expand All @@ -150,12 +150,12 @@ jQuery(document).ready(function($){
if ( response == 'valid' ) {

element.parent().append(license_deactivate_button);
element.parent().append('<p class="description msa-activation-message">' + msa_licensing_data.activation_valid + '</p>');
element.parent().append('<p class="description msa-activation-message msa-license-' + response + '">' + msa_licensing_data.activation_valid + '</p>');

} else {

element.parent().append(license_activate_button);
element.parent().append('<p class="description msa-activation-message">' + msa_licensing_data.activation_error + '</p>');
element.parent().append('<p class="description msa-activation-message msa-license-' + response + '">' + msa_licensing_data.activation_error + '</p>');

}

Expand All @@ -175,9 +175,9 @@ jQuery(document).ready(function($){

element.parent().append(spinner);

$('.msa-activation-message').remove();
$('.msa-activate-license').remove();
$('.msa-deactivate-license').remove();
element.parent().find('.msa-activation-message').remove();
element.parent().find('.msa-activate-license').remove();
element.parent().find('.msa-deactivate-license').remove();

var data = {
'action': 'msa_license_action',
Expand Down
10 changes: 5 additions & 5 deletions my-site-audit.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/*
Plugin Name: My Site Audit
Plugin URI: https://mysiteaudit.com
Plugin URI: https://99robots.com/products/my-site-audit
Description: The ultimate way to audit your site's content to drive more traffic to your site and enhance your user engagement.
version: 1.0.2
version: 1.0.3
Author: 99 Robots
Author URI: https://99robots.com
License: GPL2
Expand Down Expand Up @@ -111,13 +111,13 @@ private function setup_constants() {
// Store URL

if ( !defined('MY_SITE_AUDIT_STORE_URL') ) {
define('MY_SITE_AUDIT_STORE_URL', 'https://mysiteaudit.com');
define('MY_SITE_AUDIT_STORE_URL', 'https://99robots.com');
}

// Extensions URL

if ( !defined('MY_SITE_AUDIT_EXT_URL') ) {
define('MY_SITE_AUDIT_EXT_URL', 'https://mysiteaudit.com/extensions?&utm_source=plugin_pages');
define('MY_SITE_AUDIT_EXT_URL', 'https://99robots.com/products/category/my-site-audit/?&utm_source=plugin_pages');
}

// Minimum PHP version
Expand All @@ -141,7 +141,7 @@ private function setup_constants() {
// Plugin version

if ( ! defined( 'MY_SITE_AUDIT_VERSION' ) ) {
define( 'MY_SITE_AUDIT_VERSION', '1.0.2' );
define( 'MY_SITE_AUDIT_VERSION', '1.0.3' );
}

// Plugin Folder Path
Expand Down
11 changes: 7 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
=== My Site Audit ===
Contributors: 99robots, kjbenk, charliepatel
Donate link: https://mysiteaudit.com
Donate link: https://99robots.com
Tags: content audit, content, audit, seo, site, site audit
Requires at least: 4.0.0
Tested up to: 4.4
Stable tag: 1.0.2
Tested up to: 4.4.2
Stable tag: 1.0.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -22,7 +22,7 @@ My Site Audit is the ultimate way to audit your site's content, drive more traff
* Set a maximum number of posts to audit
* Sort and Filter Posts based on any attribute

Visit our [website](https://mysiteaudit.com?utm_source=readme) for more information about how to use My Site Audit to improve your content.
Visit our [website](https://99robots.com?utm_source=readme) for more information about how to use My Site Audit to improve your content.

**Follow this plugin on [GitHub](https://github.com/99robots/my-site-audit)**

Expand All @@ -47,6 +47,9 @@ e.g.

== Changelog ==

= 1.0.3 =
* UPDATED: Store URL to support extensions

= 1.0.2 = 2016-1-7
* IMPROVED: Image parsing to determine the number of images per post
* FIXED: Hiding and showing of condition columns on Single Audit page was not compatible with WordPress 4.4
Expand Down
2 changes: 1 addition & 1 deletion views/extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<div class="meta-box-sortables">

<div class="postbox">
<h3 class="hndle" style="cursor: auto;"><span><?php echo $extension['title']; ?></span></h3>
<h2 class="hndle" style="cursor: auto;"><span><?php echo $extension['title']; ?></span></h2>
<div class="inside">
<img src="<?php echo MY_SITE_AUDIT_PLUGIN_URL . 'images/' . (isset($extension['image']) && $extension['image'] != '' ? $extension['image'] : 'coming-soon.png'); ?>"/>
<a href="<?php echo (isset($extension['link']) && $extension['link'] != '' ? $extension['link'] : MY_SITE_AUDIT_EXT_URL ); ?>" target="_blank"><?php _e('Learn More'); ?></a>
Expand Down

0 comments on commit beefa3a

Please sign in to comment.