206 reputation
217
bio website mygemologist.com
location
age 26
visits member for 2 years, 11 months
seen Sep 23 at 16:54

I'm a small business web designer and marketer. I do a little of everything, and I'm always interested in learning new techniques and technologies.


Aug
13
comment Selectively Disabling PHP via .htaccess in Root Directory
@Wyck, thanks for the input. Could you maybe explain why it wouldn't make any sense?
Aug
13
comment Selectively Disabling PHP via .htaccess in Root Directory
Maybe I'm missing something, but as I understand it, the root dir .htaccess will disallow direct access to any PHP file except index.php. This will cascade into subdirectories, so you override it with the .htaccess in wp-admin to allow the admin panel to work normally. It's basically an extension of the practices described here and here.
Aug
13
comment Selectively Disabling PHP via .htaccess in Root Directory
Won't the allow from all directive in the wp-admin .htaccess allow the admin area to work?
Aug
12
asked Selectively Disabling PHP via .htaccess in Root Directory
Jul
17
comment Security and Must Use Plugins
Thanks for the explanation. Of course, simply uploading a file doesn't guarantee the web server will execute it in the WP environment where you can access $wpdb, but, as you say, replacing functions.php or a core file would easily accomplish that.
Jul
17
accepted Security and Must Use Plugins
Jul
17
asked Security and Must Use Plugins
Jul
10
comment Using search.php without a 's' field in searchform.php
I can understand not wanting it in your code if it's not needed, but realize there's also nothing to stop people from entering yoursite.com?s=my+search directly which will accomplish the same thing as modifying a form input using dev tools.
Jul
8
comment Using search.php without a 's' field in searchform.php
Could you just make the s field <input type="hidden" />?
Jul
8
comment Using search.php without a 's' field in searchform.php
You probably mean name="s" right? I don't think the id attribute matters in the $_POST super global.
Jul
8
comment Show a widget as a sidebar fallback
the_widget() was definitely what I needed. Thanks for suggesting it.
Jul
8
comment Show a widget as a sidebar fallback
the_widget() works perfectly. I never knew about that function. Thanks.
Jul
8
accepted Show a widget as a sidebar fallback
Jul
8
comment Show a widget as a sidebar fallback
Just tested, and the fallback isn't showing for me. I probably should have been more clear about what I meant by "empty." I updated the question to hopefully clarify things.
Jul
8
revised Show a widget as a sidebar fallback
Added an idea for a possible solution
Jul
8
comment Show a widget as a sidebar fallback
This is a nice idea, but I think it will run into the same problem that Wyck's answer does. Even if the widgets output nothing, this function will return false and the fallback widget won't be shown. I haven't tested it yet, but I'm pretty sure that empty( $_wp_sidebars_widgets[ $index ] ) is always going to evaluate as true when we have widgets assigned to a sidebar (whether they output content or not).
Jul
8
comment Show a widget as a sidebar fallback
The fallback sidebar is an interesting idea; I hadn't thought of that. I would rather use is_active_sidebar() though, but whenever I call that inside of a Widget Logic function I get a "Connection Reset" error from my browser. I get the feeling that it's causing an infinite loop somehow, but I'm not sure how. Any ideas on how to mitigate that?
Jul
8
comment Show a widget as a sidebar fallback
This seems to return true whether the sidebar is empty or not. It could be because WordPress thinks widgets have been displayed even if Widget Logic hides them?
Jul
8
asked Show a widget as a sidebar fallback
Jul
2
awarded  Popular Question