Top Left Text cha

Web & App Development

Typical Shitpress coders... this code is all over the place - as a way to block access to the dashboard for all except administrators..

add_action( 'init', 'block_admin_access' );
function block_admin_access() {
if ( is_admin() && ! current_user_can( 'administrator' ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
// Redirect to home page if a non admin user tries to access admin area
wp_redirect( home_url() );
What's wrong with this picture?  if is_admin???? It blocks the administrators you shitty coders!  Remove that part or make it !is_admin and it breaks the site.  This code is shit like most wordpress code.
Comment (0) Hits: 1223
Stuipid pieces of crap WordPress coders!!!! WTF? Do they not expect people to use SSLs? If you add an SSL to your wordpress site, it won't let you log in anymore. WFT?????????????? This is one of the best CMS systems, but I HATE it because of this kind of amateur crap.
Comment (0) Hits: 6837
If you get an error on maximum upload size, it may have nothing to do with the server when using WordPress Multisites.  The first thing I checked was the max_upload_size in PHP on the server and that was fine at 8M.  Even though below the error in WordPress was, "Maximum upload file size: 1MB.".

Searching at provided nothing more than instructions on how to change PHP settings on the server via php.ini.

Go to 'My Sites' >> 'Network Admin'

Then go to 'Settings' >> 'Network Settings'

You'll find the setting, Max upload file size.  Change to whatever you want. 

And.... that increased the maximum upload to 2MB even though I entered 8000KB in the setting for this.

I also added this line to the wp-config.php file:
define('WP_MEMORY_LIMIT' , '8M');

 Once again, still an upload error.

Looks like the problem lies within one of the plugins installed on this clients site, GD bbPress Toolbox. 

REALLY????  I guess they don't think WordPress already has way too many places to define maximum file size.  In my opinion, it shouldn't be up to WordPress at all... should be set on the server. 

Okay, so I found the problem.  It had nothing to do with WordPress, but I don't take back what I said about the extra unnecessary upload settings as they cluttered the issue.

Godaddy now uses .user.ini instead of php.ini to declare settings for the server in cPanel accounts.  Here's the stupid part.  If you upload the settings via php.ini they appear to change when looking at a php info file (where you upload a file containing phpinfo();).  

Thanks again, Godaddy, for the confusion.

Comment (0) Hits: 5941