AJAX admin Internal 500 error Failed to Upload
UPDATE: After I saw an error massage it’s all because unsupported operand type error. $sum += $marks; its because store wrong type of value, I change to $sum->marks;
UPDATE: After I saw an error massage it’s all because unsupported operand type error. $sum += $marks; its because store wrong type of value, I change to $sum->marks;
you can use this add_action(‘after_setup_theme’, ‘remove_admin_bar’); function remove_admin_bar() { if (!current_user_can(‘administrator’) && !is_admin()) { show_admin_bar(false); } }
I think what you’re trying to do here is create a custom hook. You should just do this to make it work correctly: <?php if ( is_user_logged_in() ) my_redirect(); ?> There’s no need to make it an action if you can use the function directly in your template. Actions are primarily used when you want … Read more
I figured out how to make it work, but it’s a bit hacky. Essentially, I coped the index.php from activity into the the main index.php of my Thematic child theme, adding the Thematic actions afterwards. Same error persists if I leave it on “Activity Stream” for the front page, but when I return it to … Read more
You ca use the conditional tag is_admin() to check if you are on the front-end or back-end like this: function bp_adminbar_currentsite_menu() { global $bp; if (!is_admin()){ ?> <li> <!– Insert your link url or relative url, and your link text below –> <a href=”http://EXAMPLE.COM”>EXAMPLE LINK TEXT</a> </li> <?php } } // Call The Function Above … Read more
If you want them to be able to choose the type You’ll need to write your own registration logic After that check via get_user_meta() to see if they have a certain permission if they can do xyz and allow accordingly. I’ve done custom user types before for a plugin i wrote. There’s no build in … Read more
Just search though your source code to find the function definition? It’s in plugins/buddypress/bp-themes/bp-default/functions.php, and you can create your own version in your theme that should override the supplied one.
Just go to your Network Admin dashboard, click on Network Settings under the Settings tab, and mark the check box: Registration notification – Send the network admin an email notification every time someone registers a site or user account. Now whenever a new user registers, you will receive an email.
I got it: function custom_get_count_before_delete() { global $bp, $wpdb; $user_id = $bp->loggedin_user->id; return $wpdb->get_var( $wpdb->prepare( ” SELECT COUNT(DISTINCT p.ID) FROM $wpdb->posts p WHERE p.post_author = %d AND p.post_status=”inherit” AND p.post_type=”attachment””, $user_id ) ); } function custom_check_delete_account() { global $bp; if ( $bp->current_component == ‘settings’ && $bp->current_action == ‘delete-account’ ) { if ( $count = custom_get_count_before_delete() … Read more
Without hacking core files your only option is to use user_register hook to save the custom fields and usually custom fields should be stored in the corresponding object meta table, meaning that if its user meta then store it in the usermeta table and if its post meta then store it in the postmeta table. … Read more