Changeset 2124737
- Timestamp:
- 07/17/2019 03:42:27 PM (7 years ago)
- Location:
- auto-post-woocommerce-products/trunk
- Files:
-
- 215 added
- 1 deleted
- 15 edited
-
README.txt (modified) (2 diffs)
-
admin/apwp-functions-admin.php (modified) (4 diffs)
-
admin/apwp-schedule-tab.php (modified) (3 diffs)
-
admin/auto-post-woocommerce-products-cron.php (modified) (9 diffs)
-
admin/auto-post-woocommerce-products-tabs.php (modified) (1 diff)
-
admin/class-auto-post-woocommerce-products-admin.php (modified) (1 diff)
-
admin/css/account.css.map (added)
-
admin/css/add-ons.css.map (added)
-
admin/css/affiliation.css.map (added)
-
admin/css/apwp-accordian-styles.css.map (added)
-
admin/css/apwp-checkbox-styles.css.map (added)
-
admin/css/apwp-colors.css.map (added)
-
admin/css/apwp-fonts.css (deleted)
-
admin/css/apwp-fonts.css.map (added)
-
admin/css/apwp-icons.css.map (added)
-
admin/css/apwp-mixins.css.map (added)
-
admin/css/apwp-nav-colors.css.map (added)
-
admin/css/apwp-product-list-styles.css.map (added)
-
admin/css/apwp-radiobutton-styles.css.map (added)
-
admin/css/apwp-stats-table-styles.css.map (added)
-
admin/css/apwp-styles.css.map (added)
-
admin/css/apwp-tooltips.css.map (added)
-
admin/css/brands.css.map (added)
-
admin/css/checkout.css.map (added)
-
admin/css/common.css.map (added)
-
admin/css/connect.css.map (added)
-
admin/css/customizer.css.map (added)
-
admin/css/debug.css.map (added)
-
admin/css/dialog-boxes.css.map (added)
-
admin/css/fontawesome.css.map (added)
-
admin/css/gdpr-optin-notice.css.map (added)
-
admin/css/regular.css.map (added)
-
admin/css/solid.css.map (added)
-
admin/css/v4-shims.css.map (added)
-
admin/freemius/languages (added)
-
admin/freemius/languages/freemius-da_DK.mo (added)
-
admin/freemius/languages/freemius-da_DK.po (added)
-
admin/freemius/languages/freemius-en.mo (added)
-
admin/freemius/languages/freemius-en.po (added)
-
admin/freemius/languages/freemius-es_ES.mo (added)
-
admin/freemius/languages/freemius-es_ES.po (added)
-
admin/freemius/languages/freemius-fr_FR.mo (added)
-
admin/freemius/languages/freemius-fr_FR.po (added)
-
admin/freemius/languages/freemius-he_IL.mo (added)
-
admin/freemius/languages/freemius-he_IL.po (added)
-
admin/freemius/languages/freemius-hu_HU.mo (added)
-
admin/freemius/languages/freemius-hu_HU.po (added)
-
admin/freemius/languages/freemius-it_IT.mo (added)
-
admin/freemius/languages/freemius-it_IT.po (added)
-
admin/freemius/languages/freemius-ja_JP.mo (added)
-
admin/freemius/languages/freemius-ja_JP.po (added)
-
admin/freemius/languages/freemius-nl_NL.mo (added)
-
admin/freemius/languages/freemius-nl_NL.po (added)
-
admin/freemius/languages/freemius-ru_RU.mo (added)
-
admin/freemius/languages/freemius-ru_RU.po (added)
-
admin/freemius/languages/freemius.pot (added)
-
admin/freemius/languages/index.php (added)
-
admin/freemius/templates/LICENSE.txt (added)
-
admin/freemius/templates/README.md (added)
-
admin/freemius/templates/assets (added)
-
admin/freemius/templates/assets/css (added)
-
admin/freemius/templates/assets/css/admin (added)
-
admin/freemius/templates/assets/css/admin/account.css (added)
-
admin/freemius/templates/assets/css/admin/add-ons.css (added)
-
admin/freemius/templates/assets/css/admin/affiliation.css (added)
-
admin/freemius/templates/assets/css/admin/checkout.css (added)
-
admin/freemius/templates/assets/css/admin/common.css (added)
-
admin/freemius/templates/assets/css/admin/connect.css (added)
-
admin/freemius/templates/assets/css/admin/debug.css (added)
-
admin/freemius/templates/assets/css/admin/dialog-boxes.css (added)
-
admin/freemius/templates/assets/css/admin/gdpr-optin-notice.css (added)
-
admin/freemius/templates/assets/css/admin/index.php (added)
-
admin/freemius/templates/assets/css/customizer.css (added)
-
admin/freemius/templates/assets/css/index.php (added)
-
admin/freemius/templates/assets/img (added)
-
admin/freemius/templates/assets/img/index.php (added)
-
admin/freemius/templates/assets/img/plugin-icon.png (added)
-
admin/freemius/templates/assets/img/theme-icon.png (added)
-
admin/freemius/templates/assets/index.php (added)
-
admin/freemius/templates/assets/js (added)
-
admin/freemius/templates/assets/js/index.php (added)
-
admin/freemius/templates/assets/js/nojquery.ba-postmessage.js (added)
-
admin/freemius/templates/assets/js/nojquery.ba-postmessage.min.js (added)
-
admin/freemius/templates/assets/js/postmessage.js (added)
-
admin/freemius/templates/config.php (added)
-
admin/freemius/templates/includes (added)
-
admin/freemius/templates/includes/class-freemius-abstract.php (added)
-
admin/freemius/templates/includes/class-freemius.php (added)
-
admin/freemius/templates/includes/class-fs-admin-notices.php (added)
-
admin/freemius/templates/includes/class-fs-api.php (added)
-
admin/freemius/templates/includes/class-fs-logger.php (added)
-
admin/freemius/templates/includes/class-fs-options.php (added)
-
admin/freemius/templates/includes/class-fs-plugin-updater.php (added)
-
admin/freemius/templates/includes/class-fs-security.php (added)
-
admin/freemius/templates/includes/class-fs-storage.php (added)
-
admin/freemius/templates/includes/class-fs-user-lock.php (added)
-
admin/freemius/templates/includes/customizer (added)
-
admin/freemius/templates/includes/customizer/class-fs-customizer-support-section.php (added)
-
admin/freemius/templates/includes/customizer/class-fs-customizer-upsell-control.php (added)
-
admin/freemius/templates/includes/customizer/index.php (added)
-
admin/freemius/templates/includes/debug (added)
-
admin/freemius/templates/includes/debug/class-fs-debug-bar-panel.php (added)
-
admin/freemius/templates/includes/debug/debug-bar-start.php (added)
-
admin/freemius/templates/includes/debug/index.php (added)
-
admin/freemius/templates/includes/entities (added)
-
admin/freemius/templates/includes/entities/class-fs-affiliate-terms.php (added)
-
admin/freemius/templates/includes/entities/class-fs-affiliate.php (added)
-
admin/freemius/templates/includes/entities/class-fs-billing.php (added)
-
admin/freemius/templates/includes/entities/class-fs-entity.php (added)
-
admin/freemius/templates/includes/entities/class-fs-payment.php (added)
-
admin/freemius/templates/includes/entities/class-fs-plugin-info.php (added)
-
admin/freemius/templates/includes/entities/class-fs-plugin-license.php (added)
-
admin/freemius/templates/includes/entities/class-fs-plugin-plan.php (added)
-
admin/freemius/templates/includes/entities/class-fs-plugin-tag.php (added)
-
admin/freemius/templates/includes/entities/class-fs-plugin.php (added)
-
admin/freemius/templates/includes/entities/class-fs-pricing.php (added)
-
admin/freemius/templates/includes/entities/class-fs-scope-entity.php (added)
-
admin/freemius/templates/includes/entities/class-fs-site.php (added)
-
admin/freemius/templates/includes/entities/class-fs-subscription.php (added)
-
admin/freemius/templates/includes/entities/class-fs-user.php (added)
-
admin/freemius/templates/includes/entities/index.php (added)
-
admin/freemius/templates/includes/fs-core-functions.php (added)
-
admin/freemius/templates/includes/fs-essential-functions.php (added)
-
admin/freemius/templates/includes/fs-plugin-info-dialog.php (added)
-
admin/freemius/templates/includes/i18n.php (added)
-
admin/freemius/templates/includes/index.php (added)
-
admin/freemius/templates/includes/l10n.php (added)
-
admin/freemius/templates/includes/managers (added)
-
admin/freemius/templates/includes/managers/class-fs-admin-menu-manager.php (added)
-
admin/freemius/templates/includes/managers/class-fs-admin-notice-manager.php (added)
-
admin/freemius/templates/includes/managers/class-fs-cache-manager.php (added)
-
admin/freemius/templates/includes/managers/class-fs-gdpr-manager.php (added)
-
admin/freemius/templates/includes/managers/class-fs-key-value-storage.php (added)
-
admin/freemius/templates/includes/managers/class-fs-license-manager.php (added)
-
admin/freemius/templates/includes/managers/class-fs-option-manager.php (added)
-
admin/freemius/templates/includes/managers/class-fs-plan-manager.php (added)
-
admin/freemius/templates/includes/managers/class-fs-plugin-manager.php (added)
-
admin/freemius/templates/includes/managers/index.php (added)
-
admin/freemius/templates/includes/sdk (added)
-
admin/freemius/templates/includes/sdk/Exceptions (added)
-
admin/freemius/templates/includes/sdk/Exceptions/ArgumentNotExistException.php (added)
-
admin/freemius/templates/includes/sdk/Exceptions/EmptyArgumentException.php (added)
-
admin/freemius/templates/includes/sdk/Exceptions/Exception.php (added)
-
admin/freemius/templates/includes/sdk/Exceptions/InvalidArgumentException.php (added)
-
admin/freemius/templates/includes/sdk/Exceptions/OAuthException.php (added)
-
admin/freemius/templates/includes/sdk/Exceptions/index.php (added)
-
admin/freemius/templates/includes/sdk/FreemiusBase.php (added)
-
admin/freemius/templates/includes/sdk/FreemiusWordPress.php (added)
-
admin/freemius/templates/includes/sdk/LICENSE.txt (added)
-
admin/freemius/templates/includes/sdk/index.php (added)
-
admin/freemius/templates/includes/supplements (added)
-
admin/freemius/templates/includes/supplements/fs-essential-functions-1.1.7.1.php (added)
-
admin/freemius/templates/includes/supplements/fs-essential-functions-2.2.1.php (added)
-
admin/freemius/templates/includes/supplements/index.php (added)
-
admin/freemius/templates/package.json (added)
-
admin/freemius/templates/require.php (added)
-
admin/freemius/templates/start.php (added)
-
admin/freemius/templates/templates (added)
-
admin/freemius/templates/templates/account (added)
-
admin/freemius/templates/templates/account.php (added)
-
admin/freemius/templates/templates/account/billing.php (added)
-
admin/freemius/templates/templates/account/index.php (added)
-
admin/freemius/templates/templates/account/partials (added)
-
admin/freemius/templates/templates/account/partials/activate-license-button.php (added)
-
admin/freemius/templates/templates/account/partials/addon.php (added)
-
admin/freemius/templates/templates/account/partials/deactivate-license-button.php (added)
-
admin/freemius/templates/templates/account/partials/index.php (added)
-
admin/freemius/templates/templates/account/partials/site.php (added)
-
admin/freemius/templates/templates/account/payments.php (added)
-
admin/freemius/templates/templates/add-ons.php (added)
-
admin/freemius/templates/templates/add-trial-to-pricing.php (added)
-
admin/freemius/templates/templates/admin-notice.php (added)
-
admin/freemius/templates/templates/ajax-loader.php (added)
-
admin/freemius/templates/templates/auto-installation.php (added)
-
admin/freemius/templates/templates/checkout.php (added)
-
admin/freemius/templates/templates/connect.php (added)
-
admin/freemius/templates/templates/contact.php (added)
-
admin/freemius/templates/templates/debug (added)
-
admin/freemius/templates/templates/debug.php (added)
-
admin/freemius/templates/templates/debug/api-calls.php (added)
-
admin/freemius/templates/templates/debug/index.php (added)
-
admin/freemius/templates/templates/debug/logger.php (added)
-
admin/freemius/templates/templates/debug/plugins-themes-sync.php (added)
-
admin/freemius/templates/templates/debug/scheduled-crons.php (added)
-
admin/freemius/templates/templates/email.php (added)
-
admin/freemius/templates/templates/firewall-issues-js.php (added)
-
admin/freemius/templates/templates/forms (added)
-
admin/freemius/templates/templates/forms/affiliation.php (added)
-
admin/freemius/templates/templates/forms/deactivation (added)
-
admin/freemius/templates/templates/forms/deactivation/contact.php (added)
-
admin/freemius/templates/templates/forms/deactivation/form.php (added)
-
admin/freemius/templates/templates/forms/deactivation/index.php (added)
-
admin/freemius/templates/templates/forms/deactivation/retry-skip.php (added)
-
admin/freemius/templates/templates/forms/index.php (added)
-
admin/freemius/templates/templates/forms/license-activation.php (added)
-
admin/freemius/templates/templates/forms/optout.php (added)
-
admin/freemius/templates/templates/forms/premium-versions-upgrade-handler.php (added)
-
admin/freemius/templates/templates/forms/premium-versions-upgrade-metadata.php (added)
-
admin/freemius/templates/templates/forms/resend-key.php (added)
-
admin/freemius/templates/templates/forms/subscription-cancellation.php (added)
-
admin/freemius/templates/templates/forms/trial-start.php (added)
-
admin/freemius/templates/templates/gdpr-optin-js.php (added)
-
admin/freemius/templates/templates/index.php (added)
-
admin/freemius/templates/templates/js (added)
-
admin/freemius/templates/templates/js/index.php (added)
-
admin/freemius/templates/templates/js/jquery.content-change.php (added)
-
admin/freemius/templates/templates/js/open-license-activation.php (added)
-
admin/freemius/templates/templates/js/style-premium-theme.php (added)
-
admin/freemius/templates/templates/partials (added)
-
admin/freemius/templates/templates/partials/network-activation.php (added)
-
admin/freemius/templates/templates/plugin-icon.php (added)
-
admin/freemius/templates/templates/plugin-info (added)
-
admin/freemius/templates/templates/plugin-info/description.php (added)
-
admin/freemius/templates/templates/plugin-info/features.php (added)
-
admin/freemius/templates/templates/plugin-info/index.php (added)
-
admin/freemius/templates/templates/plugin-info/screenshots.php (added)
-
admin/freemius/templates/templates/powered-by.php (added)
-
admin/freemius/templates/templates/pricing.php (added)
-
admin/freemius/templates/templates/secure-https-header.php (added)
-
admin/freemius/templates/templates/sticky-admin-notice-js.php (added)
-
admin/freemius/templates/templates/tabs-capture-js.php (added)
-
admin/freemius/templates/templates/tabs.php (added)
-
admin/includes/apwp-check-setup.php (modified) (1 diff)
-
admin/includes/apwp-dashboard-widget.php (modified) (1 diff)
-
admin/includes/apwp-list-table-functions.php (modified) (2 diffs)
-
admin/includes/apwp-quick-edit.php (modified) (4 diffs)
-
admin/includes/class-apwp-cron-functions.php (modified) (5 diffs)
-
admin/includes/class-apwp-labels.php (modified) (3 diffs)
-
admin/includes/class-apwp-short-links.php (modified) (8 diffs)
-
auto-post-woocommerce-products.php (modified) (2 diffs)
-
includes/class-auto-post-woocommerce-products-deactivator.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
auto-post-woocommerce-products/trunk/README.txt
r2122132 r2124737 5 5 Requires at least: 5.0 6 6 Tested up to: 5.2.2 7 Stable tag: 2.1.4. 17 Stable tag: 2.1.4.2 8 8 Requires PHP at least: 5.6.35 Recommended 7.2 9 9 WC requires at least: 3.3.0 … … 76 76 77 77 == Changelog == 78 = 2.1.4.2 = 79 * 17-JUL-2019 80 * Corrected issue for posts on Twitter showing as url encoded. 81 * Corrected a few other minor issues. 82 78 83 = 2.1.4.1 = 79 84 * 12-JUL-2019 -
auto-post-woocommerce-products/trunk/admin/apwp-functions-admin.php
r2122132 r2124737 21 21 } 22 22 23 require_once APWP_INCLUDES_PATH . 'class-apwp-cron-functions.php';24 23 /** 25 24 * Get WooCommerce version number … … 1448 1447 $_labels = [ 1449 1448 array( 1450 'frequency0' => $labels->schedule_labels['pause '],1449 'frequency0' => $labels->schedule_labels['pause_schedule'], 1451 1450 'name' => 'pause_schedule', 1452 1451 ), … … 1456 1455 ), 1457 1456 array( 1458 'frequency24' => $labels->schedule_labels['every24 '],1457 'frequency24' => $labels->schedule_labels['every24hours'], 1459 1458 'name' => 'every24hours', 1460 1459 ), 1461 1460 array( 1462 'frequency12' => $labels->schedule_labels['every12 '],1461 'frequency12' => $labels->schedule_labels['every12hours'], 1463 1462 'name' => 'every12hours', 1464 1463 ), 1465 1464 array( 1466 'frequency8' => $labels->schedule_labels['every8 '],1465 'frequency8' => $labels->schedule_labels['every8hours'], 1467 1466 'name' => 'every8hours', 1468 1467 ), 1469 1468 array( 1470 'frequency7' => $labels->schedule_labels['every7 '],1469 'frequency7' => $labels->schedule_labels['every7hours'], 1471 1470 'name' => 'every7hours', 1472 1471 ), 1473 1472 array( 1474 'frequency6' => $labels->schedule_labels['every6 '],1473 'frequency6' => $labels->schedule_labels['every6hours'], 1475 1474 'name' => 'every6hours', 1476 1475 ), 1477 1476 array( 1478 'frequency5' => $labels->schedule_labels['every5 '],1477 'frequency5' => $labels->schedule_labels['every5hours'], 1479 1478 'name' => 'every5hours', 1480 1479 ), 1481 1480 array( 1482 'frequency4' => $labels->schedule_labels['every4 '],1481 'frequency4' => $labels->schedule_labels['every4hours'], 1483 1482 'name' => 'every4hours', 1484 1483 ), 1485 1484 array( 1486 'frequency3' => $labels->schedule_labels['every3 '],1485 'frequency3' => $labels->schedule_labels['every3hours'], 1487 1486 'name' => 'every3hours', 1488 1487 ), 1489 1488 array( 1490 'frequency2' => $labels->schedule_labels['every2 '],1489 'frequency2' => $labels->schedule_labels['every2hours'], 1491 1490 'name' => 'every2hours', 1492 1491 ), … … 1496 1495 ), 1497 1496 array( 1498 'frequency30' => $labels->schedule_labels['every30 '],1497 'frequency30' => $labels->schedule_labels['every30min'], 1499 1498 'name' => 'every30min', 1500 1499 ) -
auto-post-woocommerce-products/trunk/admin/apwp-schedule-tab.php
r2122132 r2124737 15 15 * Created Monday, Jun-17-2019 at 10:33:42 16 16 */ 17 /**18 * Includes19 */20 require_once APWP_INCLUDES_PATH . 'class-apwp-cron-functions.php';21 17 /** 22 18 * Display the cron schedule tab … … 609 605 610 606 $next = 0; 611 $scheds = wp_get_schedules();612 607 613 608 if ( 'pause_schedule' !== $sched ) { 609 update_option( 'apwp_schedule_selection', $sched ); 610 $scheds = wp_get_schedules(); 614 611 $interval = $scheds[$sched]['interval']; 615 612 $next = time() + $interval; … … 621 618 622 619 update_option( 'apwp_next_time_cron_runs', $next ); 623 update_option( 'apwp_schedule_selection', $sched );624 620 // set transient to update the next cron time once updated in WordPress. 625 621 set_transient( 'apwp_cron_check', 'ok', 2 * MINUTE_IN_SECONDS ); -
auto-post-woocommerce-products/trunk/admin/auto-post-woocommerce-products-cron.php
r2122132 r2124737 31 31 * @return mixed 32 32 */ 33 class Apwp_ Auto_Cron {33 class Apwp_Cron { 34 34 35 35 /** … … 46 46 * To access our Short links class for Bitly link 47 47 * 48 * @var Short_Links48 * @var Apwp_Short_Links 49 49 * @since 1.0.0 50 50 * … … 102 102 public function __construct() { 103 103 $this->labels = new Apwp_Labels(); 104 $this->click_data = new Short_Links();104 $this->click_data = new Apwp_Short_Links(); 105 105 $this->product = new WC_Product_Factory(); 106 106 $posted = get_option( 'atwc_products_posted' ); … … 127 127 * @return void 128 128 */ 129 public function apwp_run_ cron( $auto ) {129 public function apwp_run_auto_cron( $auto ) { 130 130 if ( empty( $this->get_in_cue_array() ) ) { 131 131 $this->set_in_cue_array( apwp_rebuild_products_array() ); … … 282 282 } 283 283 $_title = $sh_desc . $_on_sale; 284 $status = urlencode_deep( $_title ). ' ' . $my_hash_tag . ' ' . $url;284 $status = $_title . ' ' . $my_hash_tag . ' ' . $url; 285 285 update_option( 'atwc_last_tweet', urldecode_deep( $_title . '|^|' . $my_hash_tag . '|^|' . $url ) ); 286 286 update_option( 'atwc_last_timestamp', time() ); … … 300 300 if ( '' === $url ) { 301 301 $url = get_permalink( $this->get_item_to_tweet() ); 302 if ( apwp_check_local_host() ) { 303 apwp_add_to_debug( 'BITLY short link is empty do to LOCALHOST server...using product url.', 'APWCP CRON' ); 304 } else { 302 if ( ! apwp_check_local_host() ) { 305 303 apwp_add_to_debug( 'BITLY short link for #' . $this->get_item_to_tweet() . ' is empty do to invalid response from Bitly...using product url.', 'APWCP CRON ERROR' ); 306 304 } … … 396 394 } 397 395 398 file_put_contents( __DIR__ . '/post_log', '[<b>' . $time_date . '</b>] TWEETED PROD ID #' . $id . ': ' . urldecode_deep( $status ) . PHP_EOL, FILE_APPEND | LOCK_EX ); 396 file_put_contents( __DIR__ . '/post_log', '[<b>' . $time_date . '</b>] TWEETED PROD ID #' . $id . ': ' . $status . PHP_EOL, FILE_APPEND | LOCK_EX ); 397 apwp_add_to_debug( 'TWITTER post sent successfully.', 'APWCP CRON' ); 399 398 return true; 400 399 } … … 418 417 } 419 418 420 file_put_contents( __DIR__ . '/post_log', '[<b>' . $time_date . '</b>] {localhost} TWEETED PROD ID #' . $this->get_item_to_tweet() . ': ' . urldecode_deep( $status ). PHP_EOL, FILE_APPEND | LOCK_EX );419 file_put_contents( __DIR__ . '/post_log', '[<b>' . $time_date . '</b>] {localhost} TWEETED PROD ID #' . $this->get_item_to_tweet() . ': ' . $status . PHP_EOL, FILE_APPEND | LOCK_EX ); 421 420 apwp_trim_log_to_length( __DIR__ . '/post_log', 0, 75 ); 422 421 apwp_trim_log_to_length( __DIR__ . '/debug.log', 0, 200 ); … … 427 426 428 427 apwp_set_onetime_cron( [ 'data', 'rebuild' ] ); 428 apwp_add_to_debug( 'TWITTER simulated post completed.', 'APWCP CRON' ); 429 429 } 430 430 -
auto-post-woocommerce-products/trunk/admin/auto-post-woocommerce-products-tabs.php
r2122132 r2124737 102 102 ]; 103 103 104 if ( !get_transient( 'apwp_prod_list_data ' ) ) {105 delete_transient( 'apwp_prod_list_data_check');104 if ( !get_transient( 'apwp_prod_list_data_check' ) ) { 105 apwp_set_onetime_cron( [ 'data' ] ); 106 106 unset( $tab_data['inventory'] ); 107 107 } -
auto-post-woocommerce-products/trunk/admin/class-auto-post-woocommerce-products-admin.php
r2122132 r2124737 170 170 include 'includes/class-apwp-labels.php'; 171 171 include 'includes/apwp-inventory-update-functions.php'; 172 include 'includes/class-apwp-cron-functions.php'; 172 173 } 173 174 -
auto-post-woocommerce-products/trunk/admin/includes/apwp-check-setup.php
r2122132 r2124737 19 19 * Includes 20 20 */ 21 require_once 'class-apwp-cron-functions.php';22 21 require_once APWP_INCLUDES_PATH . 'class-apwp-short-links.php'; 23 22 -
auto-post-woocommerce-products/trunk/admin/includes/apwp-dashboard-widget.php
r2122132 r2124737 19 19 */ 20 20 require_once 'apwp-check-setup.php'; 21 require_once 'class-apwp-cron-functions.php';22 21 23 22 if ( !defined( 'ABSPATH' ) ) { -
auto-post-woocommerce-products/trunk/admin/includes/apwp-list-table-functions.php
r2122132 r2124737 1565 1565 $value = ''; 1566 1566 1567 if ( taxonomy_exists( esc_attr( str_replace( 'attribute_', '', $attribute )) ) ) {1567 if ( taxonomy_exists( str_replace( 'attribute_', '', $attribute ) ) ) { 1568 1568 $term = get_term_by( 'slug', $slug, str_replace( 'attribute_', '', $attribute ) ); 1569 if ( !is_wp_error( $term ) ) { 1570 $value = $term->name; 1569 if ( is_object( $term ) && !is_wp_error( $term ) ) { 1570 1571 if ( $term->name ) { 1572 $value = $term->name; 1573 } else { 1574 $error_string = $term->get_error_message(); 1575 apwp_add_to_debug( $error_string ); 1576 return ''; 1577 } 1578 1571 1579 } 1572 1580 } else { … … 1679 1687 $result = []; 1680 1688 $discontinued = 'unchecked'; 1689 if ( empty($items) ) { 1690 return []; 1691 } 1681 1692 foreach ( $items as $product_id ) { 1682 1693 $product = $_products->get_product( $product_id ); -
auto-post-woocommerce-products/trunk/admin/includes/apwp-quick-edit.php
r2122132 r2124737 31 31 { 32 32 /** 33 * Access to A PWCPShort_links class for bitly short links34 * 35 * @var Short_links33 * Access to Apwp_Short_links class for bitly short links 34 * 35 * @var Apwp_Short_links 36 36 */ 37 37 private $clickdata ; … … 77 77 global $apwp_qe_errors ; 78 78 $this->label = new Apwp_Labels(); 79 $this->clickdata = new Short_Links();79 $this->clickdata = new Apwp_Short_Links(); 80 80 $this->prod = new WC_Product_factory(); 81 81 $this->theme = apwp_get_admin_colors( false ); … … 90 90 91 91 } 92 93 if ( null === $this->data ) {94 $apwp_qe_errors->add( 'apwp_info', __( 'Product Edit INFO:', 'auto-post-woocommerce-products' ), $this->label->product_list_labels['refresh-message'] );95 ?>96 <script>97 setTimeout(function() {98 window.location.reload(true);99 }, 4000);100 </script>101 <?php102 }103 104 92 } 105 93 … … 3093 3081 { 3094 3082 3095 if ( $this->post_array['excerpt']) {3083 if ( array_key_exists( 'excerpt', $this->post_array ) ) { 3096 3084 $excerpt = filter_var( $this->post_array['excerpt'], FILTER_SANITIZE_STRING ); 3097 3085 $my_post = [ -
auto-post-woocommerce-products/trunk/admin/includes/class-apwp-cron-functions.php
r2122132 r2124737 87 87 } 88 88 // Hook into WP Cron to run postings. 89 add_filter( 'cron_schedules', 'a twc_add_schedules' );89 add_filter( 'cron_schedules', 'apwp_add_schedules' ); 90 90 add_action( 'auto_post_woo_prod_cron', 'apwp_run_cron' ); 91 91 /** … … 99 99 function apwp_run_cron( $auto = true ) 100 100 { 101 $cron = new Apwp_ Auto_Cron();102 $cron->apwp_run_ cron( $auto );101 $cron = new Apwp_Cron(); 102 $cron->apwp_run_auto_cron( $auto ); 103 103 // Are we auto posting. 104 104 } … … 111 111 * @return void 112 112 */ 113 function deactivate_apwp_cron()113 function apwp_deactivate_apwp_cron() 114 114 { 115 115 $timestamp = wp_next_scheduled( 'auto_post_woo_prod_cron' ); … … 140 140 function apwp_enable_twitter_auto_post() 141 141 { 142 $click_data = new Short_Links();142 $click_data = new Apwp_Short_Links(); 143 143 $click_data->set_bitly_array(); 144 144 return true; … … 149 149 * 150 150 * @param array $schedules Cron schedules for auto posting products. 151 * @since 1.0.0151 * @since 2.1.4.2 152 152 * 153 153 * @return array 154 154 */ 155 function a twc_add_schedules( $schedules )155 function apwp_add_schedules( $schedules ) 156 156 { 157 157 $labels = new Apwp_Labels(); 158 $schedules['every24hours'] = array( 159 'interval' => 24 * 60 * 60, 160 'display' => $labels->schedule_labels['every24'], 158 $current_schedule = get_option( 'apwp_schedule_selection' ); 159 $schedules['every15min'] = array( 160 'interval' => 15 * MINUTE_IN_SECONDS, 161 'display' => $labels->schedule_labels['every15min'], 161 162 ); 162 $schedules['every12hours'] = array( 163 'interval' => 12 * 60 * 60, 164 'display' => $labels->schedule_labels['every12'], 165 ); 166 $schedules['every8hours'] = array( 167 'interval' => 8 * 60 * 60, 168 'display' => $labels->schedule_labels['every8'], 169 ); 170 $schedules['every7hours'] = array( 171 'interval' => 7 * 60 * 60, 172 'display' => $labels->schedule_labels['every7'], 173 ); 174 $schedules['every15min'] = array( 175 'interval' => 15 * 60, 176 'display' => $labels->schedule_labels['every15'], 177 ); 163 if ( false === $current_schedule || 'pause_schedule' === $current_schedule ) { 164 return $schedules; 165 } 166 $apwp_schedules = [ 167 'every24hours' => 24, 168 'every12hours' => 12, 169 'every8hours' => 8, 170 'every7hours' => 7, 171 'every6hours' => 6, 172 'every5hours' => 5, 173 'every4hours' => 4, 174 'every3hours' => 3, 175 'every2hours' => 2, 176 'hourly' => 1, 177 'every30min' => 30, 178 ]; 179 180 if ( array_key_exists( $current_schedule, $apwp_schedules ) ) { 181 $my_interval = $apwp_schedules[$current_schedule]; 182 183 if ( 30 !== $my_interval ) { 184 $schedules[$current_schedule] = array( 185 'interval' => $apwp_schedules[$current_schedule] * HOUR_IN_SECONDS, 186 'display' => $labels->schedule_labels[$current_schedule], 187 ); 188 } else { 189 $schedules[$current_schedule] = array( 190 'interval' => $apwp_schedules[$current_schedule] * MINUTE_IN_SECONDS, 191 'display' => $labels->schedule_labels[$current_schedule], 192 ); 193 } 194 195 } 196 178 197 return $schedules; 179 198 } -
auto-post-woocommerce-products/trunk/admin/includes/class-apwp-labels.php
r2122132 r2124737 142 142 private function set_quick_start_updates_array() { 143 143 $labels = [ 144 '1' => __( ' Added image to the next auto post item on the schedule tab.', 'auto-post-woocommerce-products' ),145 '2' => __( 'Corrected a couple ofminor issues.', 'auto-post-woocommerce-products' ),144 '1' => __( 'Corrected issue for posts on Twitter showing as url encoded.', 'auto-post-woocommerce-products' ), 145 '2' => __( 'Corrected a few other minor issues.', 'auto-post-woocommerce-products' ), 146 146 147 147 ]; … … 1277 1277 'disabled-cron' => __( 'Disabling CRON schedule. . .', 'auto-post-woocommerce-products' ), 1278 1278 'discount' => __( 'discount', 'auto-post-woocommerce-products' ), 1279 'every12 '=> __( 'Every 12 hours', 'auto-post-woocommerce-products' ),1280 'every15 '=> __( 'Every 15 minutes', 'auto-post-woocommerce-products' ),1281 'every2 '=> __( 'Every 2 hours', 'auto-post-woocommerce-products' ),1282 'every24 '=> __( 'Every 24 hours', 'auto-post-woocommerce-products' ),1283 'every3 '=> __( 'Every 3 hours', 'auto-post-woocommerce-products' ),1284 'every30 '=> __( 'Every 30 minutes', 'auto-post-woocommerce-products' ),1285 'every4 '=> __( 'Every 4 hours', 'auto-post-woocommerce-products' ),1286 'every5 '=> __( 'Every 5 hours', 'auto-post-woocommerce-products' ),1287 'every6 '=> __( 'Every 6 hours', 'auto-post-woocommerce-products' ),1288 'every7 '=> __( 'Every 7 hours', 'auto-post-woocommerce-products' ),1289 'every8 '=> __( 'Every 8 hours', 'auto-post-woocommerce-products' ),1279 'every12hours' => __( 'Every 12 hours', 'auto-post-woocommerce-products' ), 1280 'every15min' => __( 'Every 15 minutes', 'auto-post-woocommerce-products' ), 1281 'every2hours' => __( 'Every 2 hours', 'auto-post-woocommerce-products' ), 1282 'every24hours' => __( 'Every 24 hours', 'auto-post-woocommerce-products' ), 1283 'every3hours' => __( 'Every 3 hours', 'auto-post-woocommerce-products' ), 1284 'every30min' => __( 'Every 30 minutes', 'auto-post-woocommerce-products' ), 1285 'every4hours' => __( 'Every 4 hours', 'auto-post-woocommerce-products' ), 1286 'every5hours' => __( 'Every 5 hours', 'auto-post-woocommerce-products' ), 1287 'every6hours' => __( 'Every 6 hours', 'auto-post-woocommerce-products' ), 1288 'every7hours' => __( 'Every 7 hours', 'auto-post-woocommerce-products' ), 1289 'every8hours' => __( 'Every 8 hours', 'auto-post-woocommerce-products' ), 1290 1290 'hashtags-used' => __( 'Hashtags used', 'auto-post-woocommerce-products' ), 1291 1291 'hourly' => __( 'Every hour', 'auto-post-woocommerce-products' ), … … 1303 1303 'on-sale' => __( 'ON SALE!', 'auto-post-woocommerce-products' ), 1304 1304 'parent-product' => __( 'This is a parent product.', 'auto-post-woocommerce-products' ), 1305 'pause '=> __( 'Pause schedule', 'auto-post-woocommerce-products' ),1305 'pause_schedule' => __( 'Pause schedule', 'auto-post-woocommerce-products' ), 1306 1306 'post-content' => __( 'Post content', 'auto-post-woocommerce-products' ), 1307 1307 'posting-schedule' => __( 'Posting schedule', 'auto-post-woocommerce-products' ), -
auto-post-woocommerce-products/trunk/admin/includes/class-apwp-short-links.php
r2122132 r2124737 19 19 */ 20 20 require_once APWP_PLUGIN_PATH . 'src/Bitly/bitly-new.php'; 21 register_deactivation_hook( __FILE__, ' deactivate_bitly_update_data' );22 register_activation_hook( __FILE__, 'a ctivate_bitly_update_data' );23 add_action( 'apw c_update_bitly_data', 'apwp_get_bitly_clicks_table__premium_only' );24 add_action( 'apwp_update_total_clicks', array( ' Short_Links', 'apwp_get_ttl_clicks__premium_only' ) );21 register_deactivation_hook( __FILE__, 'apwp_deactivate_bitly_update_data' ); 22 register_activation_hook( __FILE__, 'apwp_activate_bitly_update_data' ); 23 add_action( 'apwp_update_bitly_data', 'apwp_get_bitly_clicks_table__premium_only' ); 24 add_action( 'apwp_update_total_clicks', array( 'Apwp_Short_Links', 'apwp_get_ttl_clicks__premium_only' ) ); 25 25 /** 26 26 * Functions to interact with Bitly API for link shortening and statistics … … 30 30 * @return mixed 31 31 */ 32 class Short_Links32 class Apwp_Short_Links 33 33 { 34 34 /** … … 59 59 60 60 if ( !$this->bit_token || '' === $this->bit_token ) { 61 apwp_add_to_debug( 'BITLY token not found. - ' . __CLASS__ . '->' . __FUNCTION__ . ':' . __LINE__, 'auto-post-woocommerce-products' );61 apwp_add_to_debug( 'BITLY token not found.' ); 62 62 return; 63 63 } … … 85 85 86 86 if ( 'empty' === $s_url ) { 87 apwp_add_to_debug( 'BITLY DID NOT RETURN A PROPER RESPONSE. - ' . __FUNCTION__ . ':' . __LINE__, 'auto-post-woocommerce-products' );87 apwp_add_to_debug( 'BITLY DID NOT RETURN A PROPER RESPONSE.' ); 88 88 $sh_url = ''; 89 89 // If bitly error then use the full url. … … 92 92 93 93 if ( 'no_token' === $s_url ) { 94 apwp_add_to_debug( ' Missing Bitly token! - ' . __FUNCTION__ . ':' . __LINE__, 'auto-post-woocommerce-products' );94 apwp_add_to_debug( 'BITLY token not found.' ); 95 95 $sh_url = ''; 96 96 } … … 121 121 $result = $bitly->shorten( $long_url ); 122 122 if ( isset( $result['data'] ) ) { 123 apwp_add_to_debug( 'BITLY Message: ' . $result['data'] . ' - ' . __FUNCTION__ . ':' . __LINE__, 'auto-post-woocommerce-products');123 apwp_add_to_debug( 'BITLY Message: ' . $result['data'] ); 124 124 } 125 125 … … 140 140 function apwp_rebuild_bitlink_array() 141 141 { 142 $click_data = new Short_Links();142 $click_data = new Apwp_Short_Links(); 143 143 $ids = get_transient( 'apwp_prod_list_data' ); 144 144 $data = []; … … 173 173 { 174 174 $local_host = apwp_check_local_host(); 175 $click_data = new Short_Links();175 $click_data = new Apwp_Short_Links(); 176 176 $link = ''; 177 177 -
auto-post-woocommerce-products/trunk/auto-post-woocommerce-products.php
r2122132 r2124737 11 11 * Description: APWCP is a powerful tool to assist you in managing your WooCommerce inventory and advertising your products on social media. 12 12 * Tested up to: 5.2.2 13 * Version: 2.1.4. 113 * Version: 2.1.4.2 14 14 * Author: Carl Lockett III, CIL Creations 15 15 * Author URI: http://www.cilcreations.com/apwp … … 32 32 33 33 require plugin_dir_path( __FILE__ ) . 'includes/class-auto-post-woocommerce-products.php'; 34 define( 'APWP_VERSION', '2.1.4. 1' );34 define( 'APWP_VERSION', '2.1.4.2' ); 35 35 register_activation_hook( __FILE__, 'apwp_activate' ); 36 36 register_deactivation_hook( __FILE__, 'apwp_deactivate' ); -
auto-post-woocommerce-products/trunk/includes/class-auto-post-woocommerce-products-deactivator.php
r2121574 r2124737 35 35 wp_unschedule_event( $timestamp, 'auto_post_woo_prod_cron' ); 36 36 wp_clear_scheduled_hook( 'auto_post_woo_prod_cron' ); 37 remove_filter( 'cron_schedules', 'a twc_add_schedules' );37 remove_filter( 'cron_schedules', 'apwp_add_schedules' ); 38 38 $timestamp = wp_next_scheduled( 'apwp_run_background_proc' ); 39 39 wp_unschedule_event( $timestamp, 'apwp_run_background_proc' );
Note: See TracChangeset
for help on using the changeset viewer.