array( 'value' => 'yes', 'label' => __( 'Yes, I prefer not to credit plugin author' ) ), 'no' => array( 'value' => 'no', 'label' => __( 'No, I would like to credit plugin author' ), ), ); return $yes_no_options_cl; } /** * Return array for disable enable */ function adransipo_disable_enable_ad_top_content() { $disable_enable_ad_top_content = array( 'Disable' => array( 'value' => 'Disable', 'label' => __( 'Disable Ad Top Content' ) ), 'Enable' => array( 'value' => 'Enable', 'label' => __( 'Enable Ad Top Content' ), ), ); return $disable_enable_ad_top_content; } function adransipo_disable_enable_ad_left_content_top() { $disable_enable_ad_left_content_top = array( 'Disable' => array( 'value' => 'Disable', 'label' => __( 'Disable Ad floating top left of content' ) ), 'Enable' => array( 'value' => 'Enable', 'label' => __( 'Enable Ad floating top left of content' ), ), ); return $disable_enable_ad_left_content_top; } function adransipo_disable_enable_ad_right_content_top() { $disable_enable_ad_right_content_top = array( 'Disable' => array( 'value' => 'Disable', 'label' => __( 'Disable Ad floating top right of content' ) ), 'Enable' => array( 'value' => 'Enable', 'label' => __( 'Enable Ad floating top right of content' ), ), ); return $disable_enable_ad_right_content_top; } function adransipo_disable_enable_ad_left_content_middle() { $disable_enable_ad_left_content_middle = array( 'Disable' => array( 'value' => 'Disable', 'label' => __( 'Disable Ad floating middle left of content' ) ), 'Enable' => array( 'value' => 'Enable', 'label' => __( 'Enable Ad floating middle left of content' ), ), ); return $disable_enable_ad_left_content_middle; } function adransipo_disable_enable_ad_right_content_middle() { $disable_enable_ad_right_content_middle = array( 'Disable' => array( 'value' => 'Disable', 'label' => __( 'Disable Ad floating middle right of content' ) ), 'Enable' => array( 'value' => 'Enable', 'label' => __( 'Enable Ad floating middle right of content' ), ), ); return $disable_enable_ad_right_content_middle; } function adransipo_disable_enable_ad_bottom_content() { $disable_enable_ad_bottom_content = array( 'Disable' => array( 'value' => 'Disable', 'label' => __( 'Disable Ad Bottom Content' ) ), 'Enable' => array( 'value' => 'Enable', 'label' => __( 'Enable Ad Bottom Content' ), ), ); return $disable_enable_ad_bottom_content; } /** * Return array for show ads on static pages */ function adransipo_yes_no_options_ads_on_pages() { $yes_no_options_ads_on_pages = array( 'yes' => array( 'value' => 'yes', 'label' => __( 'Yes, show ads on pages' ) ), 'no' => array( 'value' => 'no', 'label' => __( 'No, do not show ads on pages' ), ), ); return $yes_no_options_ads_on_pages; } /** * Set default options */ function adransipo_default_options() { $options = get_option( 'adransipo_plugin_options' ); if ( ! isset( $options['yes_no_options_cl'] ) ) { $options['yes_no_options_cl'] = 'no'; update_option( 'adransipo_plugin_options', $options ); } if ( ! isset( $options['yes_no_options_ads_on_pages'] ) ) { $options['yes_no_options_ads_on_pages'] = 'no'; update_option( 'adransipo_plugin_options', $options ); } if ( ! isset( $options['ad_top_content'] ) ) { $options['ad_top_content'] = ''; update_option( 'adransipo_plugin_options', $options ); } if ( ! isset( $options['ad_left_content_top'] ) ) { $options['ad_left_content_top'] = ''; update_option( 'adransipo_plugin_options', $options ); } if ( ! isset( $options['ad_right_content_top'] ) ) { $options['ad_right_content_top'] = ''; update_option( 'adransipo_plugin_options', $options ); } if ( ! isset( $options['ad_left_content_middle'] ) ) { $options['ad_left_content_middle'] = ''; update_option( 'adransipo_plugin_options', $options ); } if ( ! isset( $options['ad_right_content_middle'] ) ) { $options['ad_right_content_middle'] = ''; update_option( 'adransipo_plugin_options', $options ); } if ( ! isset( $options['ad_bottom_content'] ) ) { $options['ad_bottom_content'] = ''; update_option( 'adransipo_plugin_options', $options ); } if ( ! isset( $options['disable_enable_ad_bottom_content'] ) ) { $options['disable_enable_ad_bottom_content'] = 'Enable'; update_option( 'adransipo_plugin_options', $options ); } if ( ! isset( $options['disable_enable_ad_top_content'] ) ) { $options['disable_enable_ad_top_content'] = 'Enable'; update_option( 'adransipo_plugin_options', $options ); } if ( ! isset( $options['disable_enable_ad_left_content_top'] ) ) { $options['disable_enable_ad_left_content_top'] = 'Enable'; update_option( 'adransipo_plugin_options', $options ); } if ( ! isset( $options['disable_enable_ad_right_content_top'] ) ) { $options['disable_enable_ad_right_content_top'] = 'Enable'; update_option( 'adransipo_plugin_options', $options ); } if ( ! isset( $options['disable_enable_ad_left_content_middle'] ) ) { $options['disable_enable_ad_left_content_middle'] = 'Enable'; update_option( 'adransipo_plugin_options', $options ); } if ( ! isset( $options['disable_enable_ad_right_content_middle'] ) ) { $options['disable_enable_ad_right_content_middle'] = 'Enable'; update_option( 'adransipo_plugin_options', $options ); } } add_action( 'init', 'adransipo_default_options' ); /** * Create the options page */ function adransipo_plugin_options_do_page() { if ( ! isset( $_REQUEST['updated'] ) ) $_REQUEST['updated'] = false; ?>