Changeset 3158437
- Timestamp:
- 09/26/2024 08:06:15 PM (18 months ago)
- Location:
- dynamic-user-directory/trunk
- Files:
-
- 3 edited
-
dynamic-user-directory.php (modified) (1 diff)
-
includes/core.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dynamic-user-directory/trunk/dynamic-user-directory.php
r3131189 r3158437 3 3 * Plugin URI: http://sgcustomwebsolutions.com 4 4 * Description: Creates an alphabetically sorted user directory that will format and display specified user meta data such as name, address, and email. 5 * Version: 2. 05 * Version: 2.1 6 6 * Author: Sarah Giles 7 7 * Author URI: http://sgcustomwebsolutions.com -
dynamic-user-directory/trunk/includes/core.php
r3131189 r3158437 2003 2003 try 2004 2004 { 2005 $mepr_options = MeprOptions::fetch(); 2006 if(!is_null($mepr_options)) 2007 { 2008 foreach($mepr_options->custom_fields as $line) { 2009 2010 //echo "Line Field Key: " . $line->field_key . ", DUD Fld Key: " . $meta_fld_key_name . "<BR>"; 2011 2012 if($line->field_key == $meta_fld_key_name) { 2013 foreach($line->options as $option_key => $option_val) { 2005 if(class_exists('MeprOptions')) 2006 { 2007 $mepr_options = MeprOptions::fetch(); 2008 2009 if(!is_null($mepr_options)) 2010 { 2011 foreach($mepr_options->custom_fields as $line) { 2014 2012 2015 $no_hyphens = str_replace ( "-", " ", $user_meta_fld); 2016 2017 //echo "Line Option Val: " . $option_val->option_name . ", Meta Fld Val: " . $no_hyphens . "<BR>"; 2018 2019 if(strtoupper($option_val->option_name) === strtoupper($no_hyphens)) { 2020 $value = $option_val->option_name; 2021 return $value; 2013 //echo "Line Field Key: " . $line->field_key . ", DUD Fld Key: " . $meta_fld_key_name . "<BR>"; 2014 2015 if($line->field_key == $meta_fld_key_name) { 2016 foreach($line->options as $option_key => $option_val) { 2017 2018 $no_hyphens = str_replace ( "-", " ", $user_meta_fld); 2019 2020 //echo "Line Option Val: " . $option_val->option_name . ", Meta Fld Val: " . $no_hyphens . "<BR>"; 2021 2022 if(strtoupper($option_val->option_name) === strtoupper($no_hyphens)) { 2023 $value = $option_val->option_name; 2024 return $value; 2025 } 2026 } 2022 2027 } 2023 2028 } 2024 } 2029 2030 //echo "<BR>"; 2025 2031 } 2032 else 2033 { 2034 $user_meta_fld = str_replace ( "-", " ", $user_meta_fld); 2035 2036 if($format === "30") //first letter in caps 2037 return ucwords($user_meta_fld); 2038 else if ($format === "37") //all caps 2039 return strtoupper($user_meta_fld); 2040 else if ($format === "38") //all lower case 2041 return strtolower($user_meta_fld); 2042 } 2043 } 2044 else 2045 { 2026 2046 2027 //echo "<BR>";2028 }2029 else2030 {2031 2047 $user_meta_fld = str_replace ( "-", " ", $user_meta_fld); 2032 2048 … … 2037 2053 else if ($format === "38") //all lower case 2038 2054 return strtolower($user_meta_fld); 2055 2039 2056 } 2040 2057 … … 2190 2207 try 2191 2208 { 2192 $mepr_options = MeprOptions::fetch(); 2193 if(!is_null($mepr_options)) 2209 if(class_exists('MeprOptions')) 2194 2210 { 2195 foreach($mepr_options->custom_fields as $line) { 2196 2197 //echo "Line Field Key: " . $line->field_key . ", DUD Fld Key: " . $meta_fld_key_name . "<BR>"; 2198 2199 if($line->field_key == $meta_fld_key_name) { 2200 foreach($line->options as $option_key => $option_val) { 2211 $mepr_options = MeprOptions::fetch(); 2212 if(!is_null($mepr_options)) 2213 { 2214 foreach($mepr_options->custom_fields as $line) { 2201 2215 2202 $no_hyphens = str_replace ( "-", " ", $user_meta_fld[$met]); 2203 2204 //echo "Line Option Val: " . $option_val->option_name . ", Meta Fld Val: " . $no_hyphens . "<BR>"; 2205 2206 if(strtoupper($option_val->option_name) === strtoupper($no_hyphens)) { 2207 $value = $option_val->option_name; 2208 $key = $option_val->option_name; 2209 $is_member_press = true; 2216 //echo "Line Field Key: " . $line->field_key . ", DUD Fld Key: " . $meta_fld_key_name . "<BR>"; 2217 2218 if($line->field_key == $meta_fld_key_name) { 2219 foreach($line->options as $option_key => $option_val) { 2220 2221 $no_hyphens = str_replace ( "-", " ", $user_meta_fld[$met]); 2222 2223 //echo "Line Option Val: " . $option_val->option_name . ", Meta Fld Val: " . $no_hyphens . "<BR>"; 2224 2225 if(strtoupper($option_val->option_name) === strtoupper($no_hyphens)) { 2226 $value = $option_val->option_name; 2227 $key = $option_val->option_name; 2228 $is_member_press = true; 2229 } 2230 } 2210 2231 } 2211 2232 } 2212 } 2233 2234 //echo "<BR>"; 2213 2235 } 2214 2215 //echo "<BR>";2216 2236 } 2217 2237 … … 2309 2329 try 2310 2330 { 2311 $mepr_options = MeprOptions::fetch(); 2312 if(!is_null($mepr_options)) 2331 if(class_exists('MeprOptions')) 2313 2332 { 2314 foreach($mepr_options->custom_fields as $line) { 2315 2316 //echo "Line Field Key: " . $line->field_key . ", DUD Fld Key: " . $meta_fld_key_name . "<BR>"; 2317 2318 if($line->field_key == $meta_fld_key_name) { 2319 foreach($line->options as $option_key => $option_val) { 2333 $mepr_options = MeprOptions::fetch(); 2334 if(!is_null($mepr_options)) 2335 { 2336 foreach($mepr_options->custom_fields as $line) { 2320 2337 2321 $no_hyphens = str_replace ( "-", " ", $user_meta_fld[$met]); 2322 2323 //echo "Line Option Val: " . $option_val->option_name . ", Meta Fld Val: " . $no_hyphens . "<BR>"; 2324 2325 if(strtoupper($option_val->option_name) === strtoupper($no_hyphens)) { 2326 $value = $option_val->option_name; 2327 $key = $option_val->option_name; 2328 $is_member_press = true; 2338 //echo "Line Field Key: " . $line->field_key . ", DUD Fld Key: " . $meta_fld_key_name . "<BR>"; 2339 2340 if($line->field_key == $meta_fld_key_name) { 2341 foreach($line->options as $option_key => $option_val) { 2342 2343 $no_hyphens = str_replace ( "-", " ", $user_meta_fld[$met]); 2344 2345 //echo "Line Option Val: " . $option_val->option_name . ", Meta Fld Val: " . $no_hyphens . "<BR>"; 2346 2347 if(strtoupper($option_val->option_name) === strtoupper($no_hyphens)) { 2348 $value = $option_val->option_name; 2349 $key = $option_val->option_name; 2350 $is_member_press = true; 2351 } 2352 } 2329 2353 } 2330 2354 } 2331 } 2355 2356 //echo "<BR>"; 2332 2357 } 2333 2334 //echo "<BR>";2335 2358 } 2336 2359 } -
dynamic-user-directory/trunk/readme.txt
r3148864 r3158437 5 5 Tags: user directory, MemberPress, BuddyPress, member directory, user registration, user meta fields, profile fields, member directory, website directory, directory, user listing, users, members, user profile, user profiles 6 6 Requires at least: 3.0.1 7 Tested up to: 6.6. 18 Stable tag: 2. 07 Tested up to: 6.6.2 8 Stable tag: 2.1 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 98 98 == Changelog == 99 99 100 = 2.1 = 101 - Released 9/27/24 102 - Successfully tested against WordPress 6.6.2 103 - Fixed: Corrected PHP "class not found" error displayed on sites that do not have MemberPress and have selected one of the "Hide Hyphens" format options. 104 100 105 = 2.0 = 101 106 - Released 8/5/24
Note: See TracChangeset
for help on using the changeset viewer.