andremalenfant
Forum Replies Created
Viewing 6 replies - 1 through 6 (of 6 total)
-
Forum: Plugins
In reply to: [Document Gallery] category or taxon_name should take ids or slugs, not namesHi,
My suggestions:
1 – Add new parameters name (e.g. category-slug and taxo-slug) so not to break everybody’s site;
2 – If the category or term isn’t found, try using the slug. I did that temp patch in your code and it works fine. (see below, not that I commented the error on the id check)Thanks for looking at it 🙂
private function getTermXByNames( $x, $taxon, $term_names ) { $ret = array(); $valid = true; // taxons may optionally be prefixed by 'tax_' -- // this is only useful when avoiding collisions with other attributes if ( ! taxonomy_exists( $taxon ) ) { $tmp = preg_replace( '/^tax_(.*)/', '$1', $taxon, 1, $count ); if ( $count > 0 && taxonomy_exists( $tmp ) ) { $taxon = $tmp; } else { $this->errs[] = sprintf( self::$unary_err, 'taxon', $taxon ); $valid = false; } } // only check terms if we first have a valid taxon if ( $valid ) { foreach ( $term_names as $name ) { if ( ( $term = get_term_by( 'name', $name, $taxon ) ) ) { $ret[] = $term->{$x}; } /*else { $this->errs[] = sprintf( __( '%s is not a valid term name in %s.', 'document-gallery' ), $name, $taxon ); }*/ } } // only check terms slug if we first have a valid taxon if ( $valid ) { foreach ( $term_names as $name ) { if ( ( $term = get_term_by( 'slug', $name, $taxon ) ) ) { $ret[] = $term->{$x}; } else { $this->errs[] = sprintf( __( '%s is not a valid term name in %s.', 'document-gallery' ), $name, $taxon ); } } } return $ret; }Forum: Plugins
In reply to: [P3 (Plugin Performance Profiler)] No visits recordedIn your inbox
Forum: Plugins
In reply to: [P3 (Plugin Performance Profiler)] No visits recordedThe IP detected matches my routers IP, everything looks ok config-wise.
Will do for the phpinfo…
Forum: Plugins
In reply to: [P3 (Plugin Performance Profiler)] No visits recordedAccording to their documentation, it should be php 5.2.x unless I override in the htaccess. It’s CentOS.
Forum: Plugins
In reply to: [P3 (Plugin Performance Profiler)] No visits recordedI don’t believe so. I am on a shared hostgator plan.
Forum: Plugins
In reply to: [P3 (Plugin Performance Profiler)] No visits recordedHi Kurt, like I said, I don’t use an opcode optimizer and that’s what the Help page says…
Viewing 6 replies - 1 through 6 (of 6 total)