array( 'name' => __( 'Adverts' ,$this->plugin), 'singular_name' => __( 'Advert',$this->plugin), 'search_items' => __( 'Search Adverts' ,$this->plugin), 'all_items' => __( 'All Adverts' ,$this->plugin), 'parent_item' => __( 'Parent Advert',$this->plugin), 'parent_item_colon' => __( 'Parent Advert:',$this->plugin ), 'edit_item' => __( 'Edit Advert',$this->plugin ), 'update_item' => __( 'Update Advert' ,$this->plugin), 'add_new_item' => __( 'Add New Advert' ,$this->plugin ), 'add_new' => __( 'New Advert', $this->plugin ), 'new_item_name' => __( 'New Advert Name',$this->plugin ), 'new_item' => __( 'New Advert', $this->plugin ), 'menu_name' => __( 'Adverts',$this->plugin ) , ), 'description' => 'Adding and editing my Adverts', 'public' => true, 'has_archive' => true, 'menu_icon' => 'dashicons-external', 'rewrite' => array('slug' => 'webd_adverts'), 'supports' => array( 'title', 'thumbnail' ), 'show_in_rest' => true, 'rest_base' => 'webd_adverts', 'rest_controller_class' => 'WP_REST_Posts_Controller', 'capability_type' => 'page', 'hierarchical' => true, 'public' => false, // it's not public, it shouldn't have it's own permalink, and so on 'publicly_queryable' => true, // you should be able to query it 'show_ui' => true, // you should be able to edit it in wp-admin 'exclude_from_search' => true, // you should exclude it from search results 'show_in_nav_menus' => false, // you shouldn't be able to add it to menus 'has_archive' => false, // it shouldn't have archive page 'rewrite' => false, // it shouldn't have rewrite rules ) ); } public function createTables(){ global $wpdb; $charset_collate = $wpdb->get_charset_collate(); $table_name = $wpdb->prefix . "adverts"; $table_name2 = $wpdb->prefix . "advert_clicks"; $sql = "CREATE TABLE $table_name ( id mediumint(9) NOT NULL AUTO_INCREMENT, date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, post_id mediumint(9) NOT NULL, clicks mediumint(9) NOT NULL, PRIMARY KEY (id) ) $charset_collate;"; $sql2 = "CREATE TABLE $table_name2 ( id mediumint(9) NOT NULL AUTO_INCREMENT, post_id mediumint(9) NOT NULL, clicks mediumint(9) NOT NULL, PRIMARY KEY (id) ) $charset_collate;"; require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); dbDelta( $sql ); dbDelta( $sql2 ); } public function adminHeader(){ ?>

slug.'.png', __FILE__ ); ?>' style='width:100%' /> ".$this->name."

"; } public function proModal(){ ?>
adminTabs(); ?>
activeTab == 'info' ) { //settings_fields( 'gallery-options' ); //do_settings_sections( 'gallery-options' ); ?>

INFO GUIDE

DISPLAY THE ADVERTS VIA SHORTCODES

DISPLAY ADS [displayAds ]


DISPLAY ONLY 1 ADVERT [displayAds title='Advert Name' ]


DISPLAY ADS IN SPECIFIC ORDER (eg.random) -override default- [displayAds orderby='rand']


DEFINE NUMBER OF COLUMNS IN GRID eg(3 columns in each row) -override default- [displayAds column = 'columns3'], choose between column1,columns2,columns3,columns4, columns5, columns6


DISPLAY ADS + OTHER CONTENT (eg. adverts + pages) - PRO VERSION ONLY - [displayAds column='column-3' type='webd_adverts,page']


DISPLAY PER CATEGORY (eg. cat 2) - PRO VERSION ONLY - [displayAds category='cat 2']


DISPLAY ADS THAT EXPIRE AFTER (eg. 25/09/2018) - PRO VERSION ONLY - [displayAds expire='20180925' column='columns-3' ]

By default plugin will display Adverts that have not expired.. With this feature you can override the default.


DISPLAY ADS IN SLIDESHOW - PRO VERSION ONLY - [displayAds column='column-1' type='webd_adverts,page' view='slideshow']

This can be used if you want to Override default setting for shortcode view when adding multiple shortcodes in your content.


DISPLAY THE ADVERTS VIA WIDGET - PRO VERSION ONLY -

Go to Appearance --> Widgets, select 'WebD Advertise Pro'

  1. Select a View between modal, list, slideshow
    • If modal, select modal width
    • If modal, select close button color
    • If modal, select if modal should appear to users pressing closing button
    • If modal, select duration after page load modal should appear
  2. Select title for the widget
  3. Select title alignment
  4. Select title wrapper, between h1,h2,h3,h4,h5,p,b
  5. Select adverts that belong to category to display those only
  6. Select advert title to display only that
  7. Select Content Background Color
  8. Select Content Color
  9. Select Content Alignment
  10. Select Number of Adverts to Display (-1 for all)
  11. Select Number of Columns to Display(column-1 for 1, columns-2 for 2 etc, up to 6)
  12. Select content Animation

These are the defaults for adverts display. They can be overriden in the shortcode [displayAds].

plugin); submit_button(); ?>
processSettings(); ?>
slug.'-pro.png', __FILE__ ); ?>' style='width:100%' />

Go PRO and get more important features!

Get a widget to display your content

Widget can be displayed as popup!

Categorize your adverts & display per category

Set expire date for adverts - display those that haven't expired

Set Order of adverts for displaying

Display adverts in a slideshow - from the shortcode or the widget

GET IT HERE

tab = array( 'general' => 'General','info' => 'Guide'); if($_GET['tab'] ){ $this->activeTab = $_GET['tab'] ; }else $this->activeTab = 'general'; echo '