Changeset 3396957
- Timestamp:
- 11/17/2025 07:34:02 AM (4 months ago)
- Location:
- social-post-flow
- Files:
-
- 10 edited
- 1 copied
-
tags/1.1.1 (copied) (copied from social-post-flow/trunk)
-
tags/1.1.1/includes/class-social-post-flow-admin.php (modified) (2 diffs)
-
tags/1.1.1/includes/class-social-post-flow-log.php (modified) (1 diff)
-
tags/1.1.1/includes/class-social-post-flow-post.php (modified) (2 diffs)
-
tags/1.1.1/readme.txt (modified) (2 diffs)
-
tags/1.1.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-log.php (modified) (1 diff)
-
trunk/includes/class-social-post-flow-post.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/social-post-flow.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
social-post-flow/tags/1.1.1/includes/class-social-post-flow-admin.php
r3385265 r3396957 637 637 // Post Types. 638 638 $post_types_public = social_post_flow()->get_class( 'common' )->get_post_types(); 639 $post_types = social_post_flow()->get_class( 'common' )->maybe_remove_post_types_by_role( 640 $post_types_public, 641 wp_get_current_user()->roles[0] 642 ); 639 if ( wp_get_current_user() && is_array( wp_get_current_user()->roles ) && ! empty( wp_get_current_user()->roles ) ) { 640 $post_types = social_post_flow()->get_class( 'common' )->maybe_remove_post_types_by_role( 641 $post_types_public, 642 wp_get_current_user()->roles[0] 643 ); 644 } else { 645 $post_types = $post_types_public; 646 } 643 647 644 648 // Depending on the screen we're on, load specific options. … … 705 709 default: 706 710 // Run profiles through role restriction. 707 $profiles = social_post_flow()->get_class( 'common' )->maybe_remove_profiles_by_role( $profiles, wp_get_current_user()->roles[0] ); 711 if ( wp_get_current_user() && is_array( wp_get_current_user()->roles ) && ! empty( wp_get_current_user()->roles ) ) { 712 $profiles = social_post_flow()->get_class( 'common' )->maybe_remove_profiles_by_role( $profiles, wp_get_current_user()->roles[0] ); 713 } 708 714 709 715 // Get original statuses that will be stored in a hidden field so they are preserved if the screen is saved -
social-post-flow/tags/1.1.1/includes/class-social-post-flow-log.php
r3346110 r3396957 318 318 319 319 // Check if we need to hide the meta box by the logged in User's role. 320 $hide_meta_box = social_post_flow()->get_class( 'settings' )->get_setting( 'hide_meta_box_by_roles', '[' . wp_get_current_user()->roles[0] . ']' );321 322 // Bail if we're hiding the meta boxes for the logged in User's role.323 if ( $hide_meta_box ) {324 return;320 if ( wp_get_current_user() && is_array( wp_get_current_user()->roles ) && ! empty( wp_get_current_user()->roles ) ) { 321 // Bail if we're hiding the meta boxes for the logged in User's role. 322 if ( social_post_flow()->get_class( 'settings' )->get_setting( 'hide_meta_box_by_roles', '[' . wp_get_current_user()->roles[0] . ']' ) ) { 323 return; 324 } 325 325 } 326 326 -
social-post-flow/tags/1.1.1/includes/class-social-post-flow-post.php
r3344663 r3396957 116 116 117 117 // Check if we need to hide the meta box by the logged in User's role. 118 $hide_meta_box = social_post_flow()->get_class( 'settings' )->get_setting( 'hide_meta_box_by_roles', '[' . wp_get_current_user()->roles[0] . ']' );119 120 // Bail if we're hiding the meta boxes for the logged in User's role.121 if ( $hide_meta_box ) {122 return;118 if ( wp_get_current_user() && is_array( wp_get_current_user()->roles ) && ! empty( wp_get_current_user()->roles ) ) { 119 // Bail if we're hiding the meta boxes for the logged in User's role. 120 if ( social_post_flow()->get_class( 'settings' )->get_setting( 'hide_meta_box_by_roles', '[' . wp_get_current_user()->roles[0] . ']' ) ) { 121 return; 122 } 123 123 } 124 124 125 125 // Get Post Types. 126 $post_types = social_post_flow()->get_class( 'common' )->maybe_remove_post_types_by_role( 127 social_post_flow()->get_class( 'common' )->get_post_types(), 128 wp_get_current_user()->roles[0] 129 ); 126 if ( wp_get_current_user() && is_array( wp_get_current_user()->roles ) && ! empty( wp_get_current_user()->roles ) ) { 127 $post_types = social_post_flow()->get_class( 'common' )->maybe_remove_post_types_by_role( 128 social_post_flow()->get_class( 'common' )->get_post_types(), 129 wp_get_current_user()->roles[0] 130 ); 131 } else { 132 $post_types = social_post_flow()->get_class( 'common' )->get_post_types(); 133 } 130 134 131 135 $title = esc_html__( 'Social Post Flow: Featured and Additional Images', 'social-post-flow' ); … … 191 195 // Run profiles through role restriction. 192 196 if ( ! is_wp_error( $profiles ) ) { 193 $profiles = social_post_flow()->get_class( 'common' )->maybe_remove_profiles_by_role( $profiles, wp_get_current_user()->roles[0] ); 197 if ( wp_get_current_user() && is_array( wp_get_current_user()->roles ) && ! empty( wp_get_current_user()->roles ) ) { 198 $profiles = social_post_flow()->get_class( 'common' )->maybe_remove_profiles_by_role( $profiles, wp_get_current_user()->roles[0] ); 199 } 194 200 } 195 201 -
social-post-flow/tags/1.1.1/readme.txt
r3386306 r3396957 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable tag: 1.1. 08 Stable tag: 1.1.1 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 435 435 == Changelog == 436 436 437 = 1.1.1 (2025-11-17) = 438 * Fix: Logs: PHP Warning: Undefined array key `0` 439 437 440 = 1.1.0 (2025-10-29) = 438 441 * Removed: Settings: Status: Add Profile link, as it resulted in settings failing to save -
social-post-flow/tags/1.1.1/social-post-flow.php
r3386306 r3396957 9 9 * Plugin Name: Social Post Flow 10 10 * Plugin URI: http://www.socialpostflow.com/integrations/wordpress 11 * Version: 1.1. 011 * Version: 1.1.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.1. 0' );31 define( 'SOCIAL_POST_FLOW_PLUGIN_BUILD_DATE', '2025-1 0-2912:00:00' );30 define( 'SOCIAL_POST_FLOW_PLUGIN_VERSION', '1.1.1' ); 31 define( 'SOCIAL_POST_FLOW_PLUGIN_BUILD_DATE', '2025-11-17 12:00:00' ); 32 32 33 33 // Define Plugin paths. -
social-post-flow/trunk/includes/class-social-post-flow-admin.php
r3385265 r3396957 637 637 // Post Types. 638 638 $post_types_public = social_post_flow()->get_class( 'common' )->get_post_types(); 639 $post_types = social_post_flow()->get_class( 'common' )->maybe_remove_post_types_by_role( 640 $post_types_public, 641 wp_get_current_user()->roles[0] 642 ); 639 if ( wp_get_current_user() && is_array( wp_get_current_user()->roles ) && ! empty( wp_get_current_user()->roles ) ) { 640 $post_types = social_post_flow()->get_class( 'common' )->maybe_remove_post_types_by_role( 641 $post_types_public, 642 wp_get_current_user()->roles[0] 643 ); 644 } else { 645 $post_types = $post_types_public; 646 } 643 647 644 648 // Depending on the screen we're on, load specific options. … … 705 709 default: 706 710 // Run profiles through role restriction. 707 $profiles = social_post_flow()->get_class( 'common' )->maybe_remove_profiles_by_role( $profiles, wp_get_current_user()->roles[0] ); 711 if ( wp_get_current_user() && is_array( wp_get_current_user()->roles ) && ! empty( wp_get_current_user()->roles ) ) { 712 $profiles = social_post_flow()->get_class( 'common' )->maybe_remove_profiles_by_role( $profiles, wp_get_current_user()->roles[0] ); 713 } 708 714 709 715 // Get original statuses that will be stored in a hidden field so they are preserved if the screen is saved -
social-post-flow/trunk/includes/class-social-post-flow-log.php
r3346110 r3396957 318 318 319 319 // Check if we need to hide the meta box by the logged in User's role. 320 $hide_meta_box = social_post_flow()->get_class( 'settings' )->get_setting( 'hide_meta_box_by_roles', '[' . wp_get_current_user()->roles[0] . ']' );321 322 // Bail if we're hiding the meta boxes for the logged in User's role.323 if ( $hide_meta_box ) {324 return;320 if ( wp_get_current_user() && is_array( wp_get_current_user()->roles ) && ! empty( wp_get_current_user()->roles ) ) { 321 // Bail if we're hiding the meta boxes for the logged in User's role. 322 if ( social_post_flow()->get_class( 'settings' )->get_setting( 'hide_meta_box_by_roles', '[' . wp_get_current_user()->roles[0] . ']' ) ) { 323 return; 324 } 325 325 } 326 326 -
social-post-flow/trunk/includes/class-social-post-flow-post.php
r3344663 r3396957 116 116 117 117 // Check if we need to hide the meta box by the logged in User's role. 118 $hide_meta_box = social_post_flow()->get_class( 'settings' )->get_setting( 'hide_meta_box_by_roles', '[' . wp_get_current_user()->roles[0] . ']' );119 120 // Bail if we're hiding the meta boxes for the logged in User's role.121 if ( $hide_meta_box ) {122 return;118 if ( wp_get_current_user() && is_array( wp_get_current_user()->roles ) && ! empty( wp_get_current_user()->roles ) ) { 119 // Bail if we're hiding the meta boxes for the logged in User's role. 120 if ( social_post_flow()->get_class( 'settings' )->get_setting( 'hide_meta_box_by_roles', '[' . wp_get_current_user()->roles[0] . ']' ) ) { 121 return; 122 } 123 123 } 124 124 125 125 // Get Post Types. 126 $post_types = social_post_flow()->get_class( 'common' )->maybe_remove_post_types_by_role( 127 social_post_flow()->get_class( 'common' )->get_post_types(), 128 wp_get_current_user()->roles[0] 129 ); 126 if ( wp_get_current_user() && is_array( wp_get_current_user()->roles ) && ! empty( wp_get_current_user()->roles ) ) { 127 $post_types = social_post_flow()->get_class( 'common' )->maybe_remove_post_types_by_role( 128 social_post_flow()->get_class( 'common' )->get_post_types(), 129 wp_get_current_user()->roles[0] 130 ); 131 } else { 132 $post_types = social_post_flow()->get_class( 'common' )->get_post_types(); 133 } 130 134 131 135 $title = esc_html__( 'Social Post Flow: Featured and Additional Images', 'social-post-flow' ); … … 191 195 // Run profiles through role restriction. 192 196 if ( ! is_wp_error( $profiles ) ) { 193 $profiles = social_post_flow()->get_class( 'common' )->maybe_remove_profiles_by_role( $profiles, wp_get_current_user()->roles[0] ); 197 if ( wp_get_current_user() && is_array( wp_get_current_user()->roles ) && ! empty( wp_get_current_user()->roles ) ) { 198 $profiles = social_post_flow()->get_class( 'common' )->maybe_remove_profiles_by_role( $profiles, wp_get_current_user()->roles[0] ); 199 } 194 200 } 195 201 -
social-post-flow/trunk/readme.txt
r3386306 r3396957 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable tag: 1.1. 08 Stable tag: 1.1.1 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 435 435 == Changelog == 436 436 437 = 1.1.1 (2025-11-17) = 438 * Fix: Logs: PHP Warning: Undefined array key `0` 439 437 440 = 1.1.0 (2025-10-29) = 438 441 * Removed: Settings: Status: Add Profile link, as it resulted in settings failing to save -
social-post-flow/trunk/social-post-flow.php
r3386306 r3396957 9 9 * Plugin Name: Social Post Flow 10 10 * Plugin URI: http://www.socialpostflow.com/integrations/wordpress 11 * Version: 1.1. 011 * Version: 1.1.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.1. 0' );31 define( 'SOCIAL_POST_FLOW_PLUGIN_BUILD_DATE', '2025-1 0-2912:00:00' );30 define( 'SOCIAL_POST_FLOW_PLUGIN_VERSION', '1.1.1' ); 31 define( 'SOCIAL_POST_FLOW_PLUGIN_BUILD_DATE', '2025-11-17 12:00:00' ); 32 32 33 33 // Define Plugin paths.
Note: See TracChangeset
for help on using the changeset viewer.