Changeset 3449195
- Timestamp:
- 01/29/2026 04:23:52 AM (2 months ago)
- Location:
- social-post-flow
- Files:
-
- 8 edited
- 1 copied
-
tags/1.2.1 (copied) (copied from social-post-flow/trunk)
-
tags/1.2.1/includes/class-social-post-flow-admin.php (modified) (2 diffs)
-
tags/1.2.1/includes/class-social-post-flow-publish.php (modified) (1 diff)
-
tags/1.2.1/readme.txt (modified) (2 diffs)
-
tags/1.2.1/social-post-flow.php (modified) (2 diffs)
-
trunk/includes/class-social-post-flow-admin.php (modified) (2 diffs)
-
trunk/includes/class-social-post-flow-publish.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/social-post-flow.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
social-post-flow/tags/1.2.1/includes/class-social-post-flow-admin.php
r3447070 r3449195 55 55 56 56 // If a code is included in the request, exchange it for an access token. 57 if ( ! filter_has_var( INPUT_GET, ' code' ) ) {57 if ( ! filter_has_var( INPUT_GET, 'social-post-flow-code' ) ) { 58 58 return; 59 59 } … … 63 63 64 64 // Sanitize token. 65 $authorization_code = filter_input( INPUT_GET, ' code', FILTER_SANITIZE_FULL_SPECIAL_CHARS );65 $authorization_code = filter_input( INPUT_GET, 'social-post-flow-code', FILTER_SANITIZE_FULL_SPECIAL_CHARS ); 66 66 67 67 // Exchange the authorization code and verifier for an access token. -
social-post-flow/tags/1.2.1/includes/class-social-post-flow-publish.php
r3398057 r3449195 2676 2676 2677 2677 /** 2678 * Parses the status' Google Business configuration to return an array of compatible2679 * arguments that can be used to send the status.2680 *2681 * @since 1.0.02682 *2683 * @param WP_Post $post Post.2684 * @param array $status Status.2685 * @return bool|array Google Business Profile status configuration2686 */2687 public function parse_google_business( $post, $status ) {2688 2689 // Bail if no Google Business configuration exists in the status.2690 if ( ! isset( $status['googlebusiness'] ) ) {2691 return false;2692 }2693 if ( ! is_array( $status['googlebusiness'] ) ) {2694 return false;2695 }2696 if ( ! isset( $status['googlebusiness']['post_type'] ) ) {2697 return false;2698 }2699 2700 // Start building arguments.2701 $google_business_args = array(2702 'post_type' => $status['googlebusiness']['post_type'],2703 'link' => $this->get_permalink( $post ),2704 );2705 2706 // Depending on the Google Business Post Type, build arguments.2707 switch ( $status['googlebusiness']['post_type'] ) {2708 case 'offer':2709 case 'event':2710 // Title.2711 $google_business_args['title'] = $this->parse_text( $post, $status['googlebusiness']['title'] );2712 2713 // Code and Terms: Offers.2714 if ( $status['googlebusiness']['post_type'] === 'offer' ) {2715 $google_business_args = array_merge(2716 $google_business_args,2717 array(2718 'code' => $this->parse_text( $post, $status['googlebusiness']['code'] ),2719 'terms' => $this->parse_text( $post, $status['googlebusiness']['terms'] ),2720 )2721 );2722 } else {2723 // Event: Button.2724 $google_business_args['cta'] = $status['googlebusiness']['cta'];2725 }2726 2727 // Start Date.2728 switch ( $status['googlebusiness']['start_date_option'] ) {2729 /**2730 * Custom Post Meta2731 */2732 case 'custom':2733 // Fetch the Post's Meta Value based on the given Custom Field Key.2734 $date = get_post_meta( $post->ID, $status['googlebusiness']['start_date'], true );2735 2736 // If the post date is numeric, it's most likely a timestamp2737 // Convert it to a date and time.2738 if ( is_numeric( $date ) ) {2739 $date = date( 'Y-m-d H:i:s', $date ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date2740 }2741 2742 // Set start date.2743 $google_business_args['start_date'] = strtotime( $date );2744 $google_business_args['start_time'] = date( 'H:i', strtotime( $date ) ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date2745 break;2746 2747 /**2748 * None2749 */2750 case '':2751 break;2752 2753 /**2754 * Third Party integrations2755 */2756 default:2757 $date = false;2758 2759 /**2760 * Allows integrations to define the status' start date for a Google Business Profile Offer or Event.2761 *2762 * @since 1.0.02763 *2764 * @param bool|string $date Date (yyyy-mm-dd hh:mm:ss format).2765 * @param array $google_business_args Google Business specific arguments for status.2766 * @param array $status Status.2767 * @param WP_Post $post WordPress Post.2768 */2769 $date = apply_filters( 'social_post_flow_publish_parse_google_business_start_date_' . $status['googlebusiness']['start_date_option'], $date, $google_business_args, $status, $post );2770 2771 // Ignore if no date defined.2772 if ( ! $date ) {2773 break;2774 }2775 2776 // Set start date.2777 $google_business_args['start_date'] = strtotime( $date );2778 $google_business_args['start_time'] = date( 'H:i', strtotime( $date ) ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date2779 break;2780 }2781 2782 // End Date.2783 switch ( $status['googlebusiness']['end_date_option'] ) {2784 /**2785 * Custom Post Meta2786 */2787 case 'custom':2788 // Fetch the Post's Meta Value based on the given Custom Field Key.2789 $date = get_post_meta( $post->ID, $status['googlebusiness']['end_date'], true );2790 2791 // If the post date is numeric, it's most likely a timestamp2792 // Convert it to a date and time.2793 if ( is_numeric( $date ) ) {2794 $date = date( 'Y-m-d H:i:s', $date ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date2795 }2796 2797 // Set end date.2798 $google_business_args['end_date'] = strtotime( $date );2799 $google_business_args['end_time'] = date( 'H:i', strtotime( $date ) ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date2800 break;2801 2802 /**2803 * None2804 */2805 case '':2806 break;2807 2808 /**2809 * Third Party integrations2810 */2811 default:2812 $date = false;2813 2814 /**2815 * Allows integrations to define the status' end date for a Google Business Profile Offer or Event.2816 *2817 * @since 1.0.02818 *2819 * @param bool|string $date Date (yyyy-mm-dd hh:mm:ss format).2820 * @param array $google_business_args Google Business specific arguments for status.2821 * @param array $status Status.2822 * @param WP_Post $post WordPress Post.2823 */2824 $date = apply_filters( 'social_post_flow_publish_parse_google_business_end_date_' . $status['googlebusiness']['end_date_option'], $date, $google_business_args, $status, $post );2825 2826 // Ignore if no date defined.2827 if ( ! $date ) {2828 break;2829 }2830 2831 // Set end date.2832 $google_business_args['end_date'] = strtotime( $date );2833 $google_business_args['end_time'] = date( 'H:i', strtotime( $date ) ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date2834 break;2835 }2836 break;2837 2838 case 'whats_new':2839 default:2840 $google_business_args['cta'] = $status['googlebusiness']['cta'];2841 break;2842 }2843 2844 return $google_business_args;2845 2846 }2847 2848 /**2849 2678 * Returns default tag parameters for the given tag e.g. {title:transformation(args)} or {title}. 2850 2679 * -
social-post-flow/tags/1.2.1/readme.txt
r3447070 r3449195 6 6 Tested up to: 6.9 7 7 Requires PHP: 7.4 8 Stable tag: 1.2. 08 Stable tag: 1.2.1 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 443 443 == Changelog == 444 444 445 = 1.2.1 (2026-01-29) = 446 * Fix: Authorization: Improved reliability of authorization by using unique code identifier 447 445 448 = 1.2.0 (2026-01-26) = 446 449 * Added: TikTok support -
social-post-flow/tags/1.2.1/social-post-flow.php
r3447070 r3449195 9 9 * Plugin Name: Social Post Flow 10 10 * Plugin URI: http://www.socialpostflow.com/integrations/wordpress 11 * Version: 1.2. 011 * Version: 1.2.1 12 12 * Author: Social Post Flow 13 13 * Author URI: http://www.socialpostflow.com … … 28 28 29 29 // Define Plugin version and build date. 30 define( 'SOCIAL_POST_FLOW_PLUGIN_VERSION', '1.2. 0' );31 define( 'SOCIAL_POST_FLOW_PLUGIN_BUILD_DATE', '2026-01-2 6 20:00:00' );30 define( 'SOCIAL_POST_FLOW_PLUGIN_VERSION', '1.2.1' ); 31 define( 'SOCIAL_POST_FLOW_PLUGIN_BUILD_DATE', '2026-01-29 13:00:00' ); 32 32 33 33 // Define Plugin paths. -
social-post-flow/trunk/includes/class-social-post-flow-admin.php
r3447070 r3449195 55 55 56 56 // If a code is included in the request, exchange it for an access token. 57 if ( ! filter_has_var( INPUT_GET, ' code' ) ) {57 if ( ! filter_has_var( INPUT_GET, 'social-post-flow-code' ) ) { 58 58 return; 59 59 } … … 63 63 64 64 // Sanitize token. 65 $authorization_code = filter_input( INPUT_GET, ' code', FILTER_SANITIZE_FULL_SPECIAL_CHARS );65 $authorization_code = filter_input( INPUT_GET, 'social-post-flow-code', FILTER_SANITIZE_FULL_SPECIAL_CHARS ); 66 66 67 67 // Exchange the authorization code and verifier for an access token. -
social-post-flow/trunk/includes/class-social-post-flow-publish.php
r3398057 r3449195 2676 2676 2677 2677 /** 2678 * Parses the status' Google Business configuration to return an array of compatible2679 * arguments that can be used to send the status.2680 *2681 * @since 1.0.02682 *2683 * @param WP_Post $post Post.2684 * @param array $status Status.2685 * @return bool|array Google Business Profile status configuration2686 */2687 public function parse_google_business( $post, $status ) {2688 2689 // Bail if no Google Business configuration exists in the status.2690 if ( ! isset( $status['googlebusiness'] ) ) {2691 return false;2692 }2693 if ( ! is_array( $status['googlebusiness'] ) ) {2694 return false;2695 }2696 if ( ! isset( $status['googlebusiness']['post_type'] ) ) {2697 return false;2698 }2699 2700 // Start building arguments.2701 $google_business_args = array(2702 'post_type' => $status['googlebusiness']['post_type'],2703 'link' => $this->get_permalink( $post ),2704 );2705 2706 // Depending on the Google Business Post Type, build arguments.2707 switch ( $status['googlebusiness']['post_type'] ) {2708 case 'offer':2709 case 'event':2710 // Title.2711 $google_business_args['title'] = $this->parse_text( $post, $status['googlebusiness']['title'] );2712 2713 // Code and Terms: Offers.2714 if ( $status['googlebusiness']['post_type'] === 'offer' ) {2715 $google_business_args = array_merge(2716 $google_business_args,2717 array(2718 'code' => $this->parse_text( $post, $status['googlebusiness']['code'] ),2719 'terms' => $this->parse_text( $post, $status['googlebusiness']['terms'] ),2720 )2721 );2722 } else {2723 // Event: Button.2724 $google_business_args['cta'] = $status['googlebusiness']['cta'];2725 }2726 2727 // Start Date.2728 switch ( $status['googlebusiness']['start_date_option'] ) {2729 /**2730 * Custom Post Meta2731 */2732 case 'custom':2733 // Fetch the Post's Meta Value based on the given Custom Field Key.2734 $date = get_post_meta( $post->ID, $status['googlebusiness']['start_date'], true );2735 2736 // If the post date is numeric, it's most likely a timestamp2737 // Convert it to a date and time.2738 if ( is_numeric( $date ) ) {2739 $date = date( 'Y-m-d H:i:s', $date ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date2740 }2741 2742 // Set start date.2743 $google_business_args['start_date'] = strtotime( $date );2744 $google_business_args['start_time'] = date( 'H:i', strtotime( $date ) ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date2745 break;2746 2747 /**2748 * None2749 */2750 case '':2751 break;2752 2753 /**2754 * Third Party integrations2755 */2756 default:2757 $date = false;2758 2759 /**2760 * Allows integrations to define the status' start date for a Google Business Profile Offer or Event.2761 *2762 * @since 1.0.02763 *2764 * @param bool|string $date Date (yyyy-mm-dd hh:mm:ss format).2765 * @param array $google_business_args Google Business specific arguments for status.2766 * @param array $status Status.2767 * @param WP_Post $post WordPress Post.2768 */2769 $date = apply_filters( 'social_post_flow_publish_parse_google_business_start_date_' . $status['googlebusiness']['start_date_option'], $date, $google_business_args, $status, $post );2770 2771 // Ignore if no date defined.2772 if ( ! $date ) {2773 break;2774 }2775 2776 // Set start date.2777 $google_business_args['start_date'] = strtotime( $date );2778 $google_business_args['start_time'] = date( 'H:i', strtotime( $date ) ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date2779 break;2780 }2781 2782 // End Date.2783 switch ( $status['googlebusiness']['end_date_option'] ) {2784 /**2785 * Custom Post Meta2786 */2787 case 'custom':2788 // Fetch the Post's Meta Value based on the given Custom Field Key.2789 $date = get_post_meta( $post->ID, $status['googlebusiness']['end_date'], true );2790 2791 // If the post date is numeric, it's most likely a timestamp2792 // Convert it to a date and time.2793 if ( is_numeric( $date ) ) {2794 $date = date( 'Y-m-d H:i:s', $date ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date2795 }2796 2797 // Set end date.2798 $google_business_args['end_date'] = strtotime( $date );2799 $google_business_args['end_time'] = date( 'H:i', strtotime( $date ) ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date2800 break;2801 2802 /**2803 * None2804 */2805 case '':2806 break;2807 2808 /**2809 * Third Party integrations2810 */2811 default:2812 $date = false;2813 2814 /**2815 * Allows integrations to define the status' end date for a Google Business Profile Offer or Event.2816 *2817 * @since 1.0.02818 *2819 * @param bool|string $date Date (yyyy-mm-dd hh:mm:ss format).2820 * @param array $google_business_args Google Business specific arguments for status.2821 * @param array $status Status.2822 * @param WP_Post $post WordPress Post.2823 */2824 $date = apply_filters( 'social_post_flow_publish_parse_google_business_end_date_' . $status['googlebusiness']['end_date_option'], $date, $google_business_args, $status, $post );2825 2826 // Ignore if no date defined.2827 if ( ! $date ) {2828 break;2829 }2830 2831 // Set end date.2832 $google_business_args['end_date'] = strtotime( $date );2833 $google_business_args['end_time'] = date( 'H:i', strtotime( $date ) ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date2834 break;2835 }2836 break;2837 2838 case 'whats_new':2839 default:2840 $google_business_args['cta'] = $status['googlebusiness']['cta'];2841 break;2842 }2843 2844 return $google_business_args;2845 2846 }2847 2848 /**2849 2678 * Returns default tag parameters for the given tag e.g. {title:transformation(args)} or {title}. 2850 2679 * -
social-post-flow/trunk/readme.txt
r3447070 r3449195 6 6 Tested up to: 6.9 7 7 Requires PHP: 7.4 8 Stable tag: 1.2. 08 Stable tag: 1.2.1 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 443 443 == Changelog == 444 444 445 = 1.2.1 (2026-01-29) = 446 * Fix: Authorization: Improved reliability of authorization by using unique code identifier 447 445 448 = 1.2.0 (2026-01-26) = 446 449 * Added: TikTok support -
social-post-flow/trunk/social-post-flow.php
r3447070 r3449195 9 9 * Plugin Name: Social Post Flow 10 10 * Plugin URI: http://www.socialpostflow.com/integrations/wordpress 11 * Version: 1.2. 011 * Version: 1.2.1 12 12 * Author: Social Post Flow 13 13 * Author URI: http://www.socialpostflow.com … … 28 28 29 29 // Define Plugin version and build date. 30 define( 'SOCIAL_POST_FLOW_PLUGIN_VERSION', '1.2. 0' );31 define( 'SOCIAL_POST_FLOW_PLUGIN_BUILD_DATE', '2026-01-2 6 20:00:00' );30 define( 'SOCIAL_POST_FLOW_PLUGIN_VERSION', '1.2.1' ); 31 define( 'SOCIAL_POST_FLOW_PLUGIN_BUILD_DATE', '2026-01-29 13:00:00' ); 32 32 33 33 // Define Plugin paths.
Note: See TracChangeset
for help on using the changeset viewer.