Changeset 2465320
- Timestamp:
- 01/30/2021 12:11:54 AM (4 years ago)
- Location:
- buddyforms-attach-posts-to-groups-extension
- Files:
-
- 74 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
buddyforms-attach-posts-to-groups-extension/trunk/includes/functions.php
r2421880 r2465320 144 144 145 145 $groups_post_id = groups_get_groupmeta( $group_id, 'group_post_id' ); 146 if ( empty($groups_post_id) ) { 147 return; 148 } 149 150 remove_action( 'groups_before_delete_group', 'buddyforms_delete_a_group_post' ); 146 151 wp_delete_post( $groups_post_id ); 147 152 } -
buddyforms-attach-posts-to-groups-extension/trunk/includes/group-control.php
r2421880 r2465320 249 249 } 250 250 251 add_action( 'buddyforms_init', function () { new BuddyForms_GroupControl(); } ); 252 251 new BuddyForms_GroupControl(); 253 252 254 253 function bf_get_attachment_thumbnail_path( $attachment_id = 0 ) { -
buddyforms-attach-posts-to-groups-extension/trunk/includes/group-extension.php
r2421880 r2465320 153 153 jQuery(".bf_show_aptg").click(function () { 154 154 155 jQuery(".bf_main_aptg").hide(); 156 jQuery("#bf_aptg" + jQuery(this).attr("target")).show(); 157 158 jQuery("li.current").removeClass("current"); 159 jQuery(this).closest("li").addClass("current"); 155 var url = window.location.href; 156 var base_url = url.split("?")[0]; 157 158 if ( jQuery(this).attr("id") === "edit-post-details" ) { 159 window.location.href = base_url + "?edit_post_group"; 160 } else { 161 window.location.href = base_url; 162 } 160 163 161 164 return false; … … 167 170 <div class="item-list-tabs no-ajax" id="subnav" role="navigation"> 168 171 <ul> 169 <li id="view-post-details-groups-li" class=" current"><a id="view-post-details" class="bf_show_aptg"172 <li id="view-post-details-groups-li" class="<?php echo ! isset( $_GET['edit_post_group'] ) ? "current" : "" ?> "><a id="view-post-details" class="bf_show_aptg" 170 173 target="1" 171 174 href=" <?php $group_permalink ?>">View</a> … … 173 176 174 177 <?php if ( $this->buddyforms_user_can ) { ?> 175 <li id="edit-post-details-groups-li" ><a id="edit-post-details" class="bf_show_aptg" target="2"178 <li id="edit-post-details-groups-li" class="<?php echo isset( $_GET['edit_post_group'] ) ? "current" : "" ?>"><a id="edit-post-details" class="bf_show_aptg" target="2" 176 179 href="<?php get_edit_post_link( $attached_post_id ) ?>">Edit</a> 177 180 </li> … … 180 183 </div> 181 184 182 <div id="bf_aptg1" 183 class="bf_main_aptg"><?php buddyforms_ge_locate_template( 'buddyforms/groups/single-post.php' ) ?></div> 184 185 <?php if ( $this->buddyforms_user_can ) { ?> 186 <div id="bf_aptg2" style="display: none;" class="bf_main_aptg"> 187 <?php 188 $args = array( 189 'post_type' => $buddyforms[ $form_slug ]['post_type'], 190 'post_id' => $attached_post_id, 191 'form_slug' => $form_slug, 192 ); 193 194 echo buddyforms_create_edit_form( $args ); 195 ?> 196 </div> 197 <?php } ?> 185 <?php if ( isset( $_GET['edit_post_group'] ) && $this->buddyforms_user_can ) : ?> 186 187 <div id="bf_aptg2" class="bf_main_aptg"> 188 <?php 189 $args = array( 190 'post_type' => $buddyforms[ $form_slug ]['post_type'], 191 'post_id' => $attached_post_id, 192 'form_slug' => $form_slug, 193 ); 194 195 echo buddyforms_create_edit_form( $args ); 196 ?> 197 </div> 198 199 <?php else : ?> 200 201 <div id="bf_aptg1" class="bf_main_aptg"> 202 <?php buddyforms_ge_locate_template( 'buddyforms/groups/single-post.php' ) ?> 203 </div> 204 205 <?php endif; ?> 206 198 207 <?php 199 208 $tmp = ob_get_clean(); -
buddyforms-attach-posts-to-groups-extension/trunk/loader.php
r2421880 r2465320 10 10 * Requires at least: 3.9 11 11 * Tested up to: 5.0 12 * Version: 1.2. 512 * Version: 1.2.6 13 13 * Author: ThemeKraft 14 14 * Author URI: https://themekraft.com/buddyforms/ … … 115 115 public function load_constants() 116 116 { 117 define( 'BuddyForms_Attach_Post_with_Group', '1.2. 5' );117 define( 'BuddyForms_Attach_Post_with_Group', '1.2.6' ); 118 118 if ( !defined( 'BUDDYFORMS_GE_INSTALL_PATH' ) ) { 119 119 define( 'BUDDYFORMS_GE_INSTALL_PATH', dirname( __FILE__ ) . '/' ); -
buddyforms-attach-posts-to-groups-extension/trunk/readme.txt
r2421880 r2465320 4 4 Plugin URI: http://buddyforms.com/downloads/attach-post-with-group/ 5 5 Requires at least: 3.9 6 Tested up to: 5. 47 Stable tag: 1.2. 56 Tested up to: 5.6 7 Stable tag: 1.2.6 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 98 98 99 99 == Changelog == 100 = 1.2.6 - 29 Jan 2021 = 101 * Fixed issue with BF ACF fields on the edit screen of the group post. 102 * Fix issue with the list items on the Post Group tab. The items aren't marked as current when interacting with them. 103 * Fix issue related to endless loop on the process deletion of group or post. 104 * Fixed Rance Condition on class BuddyForms_GroupControl loading. 105 100 106 = 1.2.5 - 19 Nov 2020 = 101 107 * Fixed some typos in the code.
Note: See TracChangeset
for help on using the changeset viewer.