Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

[SOLVED] Header regex on WP MS


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Dec 20, 2010, 07:48 AM
boone
 
5 posts · Dec 2010
(See http://forum.bytesforall.com/showthread.php?t=11814 for details on getting the rotating header to recognize images in Dashboard > Media on WP Multisite.)

The regex used in functions/bfa_rotating_header_images.php doesn't work for images that have been uploaded through Dashboard > Media. WP adds an image dimension to the filename, which Atahualpa is not looking for (eg atahualpa_header_2-1024x100.png). The following modification to the regex worked for me:

$files = m_find_in_dir(get_option('upload_path'), 'atahualpa_header_[0-9]+(\-[0-9]+x[0-9]+)?\.(jpe?g|png|gif|bmp)$');
  #2  
Old Dec 20, 2010, 01:09 PM
juggledad's Avatar
juggledad
 
21,712 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
You shouldn't be using the media upload to load to the atahualpa/images/header. As I understand it, the media should be loading to wp-contents
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support
  #3  
Old Dec 20, 2010, 01:15 PM
boone
 
5 posts · Dec 2010
That's correct for single-user installations of WP. The code clearly is written to work differently with WPMS/MU, where it tries to look in the upload directory for that blog. And even if it weren't intended to work that way (which it is ) then it *should* work that way, as it's far easier for users to use the media uploader than an FTP client.
  #4  
Old Dec 21, 2010, 09:35 AM
boone
 
5 posts · Dec 2010
I take back what I say in the original post here. The source image I was using was incorrectly named (I had pulled it from another WP installation, so it was getting double-resized.) No changes in the regex are needed.

All times are GMT -6. The time now is 02:58 AM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.