Plugin deafult values set in array
-
Hi community …
I can find the right way to set default values for logo and background image. It suppose to get the file from the plugin directory….need help
function ccc_add_defaults() { $tmp = get_option('ccc_options'); if(($tmp['chk_default_options_db']=='1')||(!is_array($tmp))) { $arr = array( "title" => "Maintenance", "logo" => "", "background-image" => "", ); update_option('ccc_options', $arr); } }
echo plugins_url('includes/images-background.png',dirname(__FILE__));
<?php echo plugins_url('includes/images-background.png',dirname(__FILE__)); ?>
echo '<img src="' . plugins_url( 'includes/images-background.png', __FILE__ ) . '" > ';
echo '<img src="' . plugins_url( 'includes/images-background.png', dirname(__FILE__) ) . '" > ';
doesnt work, get the blank page.
What im i doing wrong here?
- The topic ‘Plugin deafult values set in array’ is closed to new replies.