Plugin Directory

Changeset 2428914


Ignore:
Timestamp:
11/30/2020 08:23:59 PM (5 years ago)
Author:
saschahuber
Message:

Release of plugin-version 0.2

Location:
wp-dynamic-ads
Files:
12 added
4 edited

Legend:

Unmodified
Added
Removed
  • wp-dynamic-ads/trunk/README.txt

    r2412303 r2428914  
    2121
    2222The content of your app is up to you, you can use images, plaintext and even shortcodes.
     23
     24Just place the shortcode [dynamic_ads] whereever you want to display your ads!
    2325 
    2426== Installation ==
  • wp-dynamic-ads/trunk/class/AdShortcodeRegisterHook.php

    r2412303 r2428914  
    1818            $displayed_ads = array();
    1919           
     20            $output = '';
    2021            if ( $queried_object ) {
    2122                $post_id = $queried_object->ID;
     
    2425               
    2526                foreach($ads as $ad){
    26                     $content = $ad->post_content;
    2727                    $keywords_data = get_post_meta($ad->ID, 'wpda_ad_keywords', true);
    2828                   
     
    3636            usort($displayed_ads, array($this, 'ad_order_function'));
    3737           
    38             $output = '';
    3938            $counter = 0;
    4039            $asins = array();
     
    107106        }
    108107       
    109         return intval((floatval($score)/($first_position+1))*10000);
     108        return (floatval($score)/($first_position+1));
    110109    }
    111110}
  • wp-dynamic-ads/trunk/class/MetaBoxRegisterHook.php

    r2412303 r2428914  
    5656            switch($field['type']){
    5757                case 'text':
    58                     $ad_meta[$field['name']] = sanitize_textarea_field( $_POST[$field['name']] );
     58                    $ad_meta[$field['field']] = sanitize_textarea_field($_POST[$field['field']]);
     59                    break;
    5960                case 'bool':
    60                     $ad_meta[$field['name']] = sanitize_text_field($_POST[$field['name']]);
     61                    $ad_meta[$field['field']] = sanitize_text_field($_POST[$field['field']]);
    6162                    break;
    6263                case 'html':
    63                     $ad_meta[$field['name']] = sanitize_text_field($_POST[$field['name']]);
     64                    $ad_meta[$field['field']] = sanitize_text_field($_POST[$field['field']]);
    6465                    break;
    6566                default:
    66                     $ad_meta[$field['name']] = sanitize_text_field($_POST[$field['name']]);
     67                    $ad_meta[$field['field']] = sanitize_text_field($_POST[$field['field']]);
    6768                    break;
    6869            }
  • wp-dynamic-ads/trunk/index.php

    r2412303 r2428914  
    55 * Text Domain: wp-dynamic-ads
    66 * Domain Path: /languages
    7  * Description: Aggregator plugin to import content from various sources
     7 * Description: Diplay content based on self defined keywords
    88 * Version: 0.1
    99 * Author: Sascha Huber
Note: See TracChangeset for help on using the changeset viewer.