Reuben
Forum Replies Created
-
Forum: Plugins
In reply to: My plugin is called six times!Alright, wp-ecommerce was the plugin causing the three index calls. Disabling that reduced by half the number of calls to the plugins.
I still have two calls to plugins from pages; debugging now.
[17-Dec-2011 13:15:22] file=functions.php, line=4580, function=whereCalled
file=memberprofile.php, line=56, function=dbug
file=wp-settings.php, line=192, function=include_once
file=wp-config.php, line=87, function=require_once
file=wp-load.php, line=29, function=require_once
file=wp-blog-header.php, line=12, function=require_once
file=index.php, line=17, function=require[17-Dec-2011 13:15:22] initialized
[17-Dec-2011 13:15:22] test
[17-Dec-2011 13:15:22] file=functions.php, line=4580, function=whereCalled
file=memberprofile.php, line=56, function=dbug
file=wp-settings.php, line=192, function=include_once
file=wp-config.php, line=87, function=require_once
file=wp-load.php, line=29, function=require_once
file=wp-cron.php, line=26, function=require_onceForum: Plugins
In reply to: My plugin is called six times!Actually I just hacked up a backtrace debug function; this identical stack is output multiple times per page. Thus I think this must be outwith wordpress itself.
file=memberprofile.php, line=56, function=dbug
file=wp-settings.php, line=192, function=include_once
file=wp-config.php, line=87, function=require_once
file=wp-load.php, line=29, function=require_once
file=wp-blog-header.php, line=12, function=require_once
file=index.php, line=17, function=require> Well then. Good luck with your problem.
There’s a stick somewhere near your posterior that needs to be freed.
Forum: Plugins
In reply to: My plugin is called six times!It’s my own plugin. It literally is doing nothing but debugging a log statement (and similar same happens in all plugins).
And seriously, I’ll bump if there’s no activity in a week on a question.
Thanks
Forum: Plugins
In reply to: My plugin is called six times!BUMP. This is not fixed by changing templates either.
Forum: Plugins
In reply to: My plugin is called six times!Also, I tried turning off all other plugins, 2 or 3 at a time; the issue wasn’t fixed by the absence of any.
Forum: Plugins
In reply to: Please help me fix this regexBump
Forum: Plugins
In reply to: Please help me fix this regexUnfortunately I can’t remove that space, as I need to allow for links like: “This awesome page”.
The \1 is clearly wrapped by a href after the plugin runs; does PHP only replace it after the entire line has evaluated?
Is there alternate syntax where I could break the match into groups and then operate on them individually before replacing them in the main content?
Thanks
Forum: Fixing WordPress
In reply to: How to replace text (regex?) in all posts, or define custom macrosThanks! Here’s what I ended up with. The regex possibly needs a little tweaking, but it works on everything I’ve checked so far. I’m going to post this on the plugin repo in case anybody else needs it.
<?php /* Plugin Name: Replace text Plugin URI: https://replacetext.com Description: Replaces text Author: Reuben Firmin Version: 1.0 Author URI: https://www.flavor8.com */ function replace_the_text($content) { $content = ereg_replace("\[([0-9a-zA-Z\(\)\'\" ]*)[ ]*\-\>[ ]*([0-9a-zA-Z:/\.\_\-\'\(\)]*)\]", '<a href="\2">\1</a>', $content); return $content; } add_filter('the_content', 'replace_the_text'); ?>
Forum: Fixing WordPress
In reply to: What’s overriding my blog title?Eureka! But, did I install that plugin? I don’t remember doing so.
In any case, fixed, and mystery solved.
Forum: Fixing WordPress
In reply to: What’s overriding my blog title?Further test:
<title>hello</title>
<title>Flavor 8: <?php wp_title(); ?><!–foo–></title><!–bah–>… yields, in the rendered page:
<title></title>
<title>Flavor 8: <!–foo–></title><!–bah–>So something is parsing the rendered output for the _first_ title element, and blanking out the contents. (Obviously two title tags are not valid, but this is just to prove that there’s an active process doing this.)
Forum: Fixing WordPress
In reply to: What’s overriding my blog title?Thanks ClaytonJames, but unfortunately that doesn’t help. Your first code snippet is how it was originally; the second snippet disappears like everything else.
To prove that it’s being overridden by something, I put a comment inside the title, as so:
<title>Flavor 8: <?php wp_title(); ?><!–foo–></title><!–bah–>
bah shows up on every page; foo is gone.
Forum: Fixing WordPress
In reply to: What’s overriding my blog title?It’s my own template (re). head.php is included at the top of every page. And yes, that’s what the “foo” comment is there for, to verify that I’m editing the right file. I can change the comment and see the changes; and the comment appears in each of the cases that I mention above. That’s why I concluded that something is overriding the header.
Let me try again with quoted code:
if ( 'list' == $style ) $output .= '';#'<li>' . __("No categories") . '</li>'; else $output .= '';#__("No categories");
Here’s a non-intrusive solution:
Edit category_template.php (in wp-includes). Change line 238 onwards to look like this:
if ( ‘list’ == $style )
$output .= ”;#’- ‘ . __(“No categories”) . ‘
‘;
else
$output .= ”;#__(“No categories”);Forum: Requests and Feedback
In reply to: Blog from cellphoneNice site…my phone’s not compatible unfortunately.