pzingg
Forum Replies Created
-
Forum: Plugins
In reply to: [Event Organiser] Feature request: Add “Tags” column to “All Events” listingI guess this is pretty easy for devs to do.
To show column in admin CPT table:
function myplugin_register_event_tag( $event_tag_args ) {
$event_tag_args['show_admin_column'] = true;
return $event_tag_args;
}
add_filter( 'eventorganiser_register_taxonomy_event-tag', 'myplugin_register_event_tag' );To add filter dropdown:
function myplugin_restrict_events_by_tag() {
global $typenow;
$category_tax = get_taxonomy( 'event-tag' );
if ( 'event' === $typenow &&
$category_tax && wp_count_terms( 'event-tag' ) > 0 ) {
eo_taxonomy_dropdown(
array(
'taxonomy' => 'event-tag',
'selected' => get_query_var( 'event-tag' ),
'hide_empty' => false,
'show_option_all' => $category_tax->labels->view_all_items,
)
);
}
}
add_action( 'restrict_manage_posts', 'myplugin_restrict_events_by_tag' );Forum: Plugins
In reply to: [Event Organiser] Undefined variable $priority (with fix)I also saw this popping up in my debug log, as I had to fix a conflict between EO’s theme compatibility and the Avada template builder. It is the result of a code checked in for version 3.12.3. In version 3.12.2 the $priority variable did exist and was set to be one greater than the highest installed priority for any added ‘post_class’ filter using a lookup function.
The priority on line 190 has to be set to the same priority as specified 4 lines earlier to remove the filter correctly, and could be 10 or a higher number. The priority on line 213 could also be a larger number than 10, if you use the logic that was suggested in version 3.12.2. PHP_INT_MAX – 1 is used for most of the other filter priorities. So maybe it would be better to use $priority = PHP_INT_MAX – 1 for both of these?
BTW if you have a problem with Avada and Event Organiser’s archive pages, here’s a fix (removing the ‘the_content’ filter that EO installs at priority PHP_INT_MAX – 1.
/* Removes the 'the-content' filter that EO installs when rendering archives. */
function remove_eo_compat_the_content_filter() {
if ( class_exists( 'EO_Theme_Compatabilty' ) && isset( $GLOBALS['eo_compat'] ) ) {
global $eo_compat;
remove_filter( 'the_content', array( $eo_compat, 'replace_page_content' ), PHP_INT_MAX - 1 );
}
}
add_action( 'awb_remove_third_party_the_content_changes', 'remove_eo_compat_the_content_filter' );Forum: Installing WordPress
In reply to: Login ProblemI had the same problem (only with Firefox, not Windows IE 6), and was able to fix it with the following. In wp-login.php, change the string used in the
headercall, just after the function call tochecklogin(around line 270 of the file)
from:
header("Location: wp-admin/");
to:
header("Location: wp-admin/index.php");
Hope this helps,
Peter Zingg