Deactivate a plugin on wp version

The problem is not version_compare, the problem is that register_activation_hook is just a shortcut for add_action( ‘activate_’ . $file, $function ); where $file is plugin_basename( __FILE__ ); and __FILE__ is your main plugin file absolute path. So, what your code does is to call dw_deactivate_theme_options() when the action ‘activate_’ . $plugin is fired. But this … Read more

PHP if have image display image, if else text

I posted this question on stackoverflow, and got this answer from @cmorrissey. Credit goes to him for this code. <?php if($novus_logo_upload = get_option(‘novus_logo_upload’)){ ?> <!– Logo Image –> <a href=”https://wordpress.stackexchange.com/questions/149443/<?php bloginfo(“url’); ?>/home” title=”<? echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”> <? echo ‘<img class=\”logo”\ src=”‘.$novus_logo_upload.'” width=\”100%”\ />’; ?> </a> <?php } else if($novus_logo_text … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)