Changeset 2428914
- Timestamp:
- 11/30/2020 08:23:59 PM (5 years ago)
- Location:
- wp-dynamic-ads
- Files:
-
- 12 added
- 4 edited
-
tags/0.2 (added)
-
tags/0.2/class (added)
-
tags/0.2/class/AdPostTypeRegisterHook.php (added)
-
tags/0.2/class/AdShortcodeRegisterHook.php (added)
-
tags/0.2/class/MetaBoxPostListRegisterHook.php (added)
-
tags/0.2/class/MetaBoxRegisterHook.php (added)
-
tags/0.2/class/OptionsProvider.php (added)
-
tags/0.2/class/Settings.php (added)
-
tags/0.2/index.php (added)
-
tags/0.2/languages (added)
-
tags/0.2/languages/wp-dynamic-ads-de_DE.mo (added)
-
tags/0.2/languages/wp-dynamic-ads-de_DE.po (added)
-
trunk/README.txt (modified) (1 diff)
-
trunk/class/AdShortcodeRegisterHook.php (modified) (4 diffs)
-
trunk/class/MetaBoxRegisterHook.php (modified) (1 diff)
-
trunk/index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-dynamic-ads/trunk/README.txt
r2412303 r2428914 21 21 22 22 The content of your app is up to you, you can use images, plaintext and even shortcodes. 23 24 Just place the shortcode [dynamic_ads] whereever you want to display your ads! 23 25 24 26 == Installation == -
wp-dynamic-ads/trunk/class/AdShortcodeRegisterHook.php
r2412303 r2428914 18 18 $displayed_ads = array(); 19 19 20 $output = ''; 20 21 if ( $queried_object ) { 21 22 $post_id = $queried_object->ID; … … 24 25 25 26 foreach($ads as $ad){ 26 $content = $ad->post_content;27 27 $keywords_data = get_post_meta($ad->ID, 'wpda_ad_keywords', true); 28 28 … … 36 36 usort($displayed_ads, array($this, 'ad_order_function')); 37 37 38 $output = '';39 38 $counter = 0; 40 39 $asins = array(); … … 107 106 } 108 107 109 return intval((floatval($score)/($first_position+1))*10000);108 return (floatval($score)/($first_position+1)); 110 109 } 111 110 } -
wp-dynamic-ads/trunk/class/MetaBoxRegisterHook.php
r2412303 r2428914 56 56 switch($field['type']){ 57 57 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; 59 60 case 'bool': 60 $ad_meta[$field[' name']] = sanitize_text_field($_POST[$field['name']]);61 $ad_meta[$field['field']] = sanitize_text_field($_POST[$field['field']]); 61 62 break; 62 63 case 'html': 63 $ad_meta[$field[' name']] = sanitize_text_field($_POST[$field['name']]);64 $ad_meta[$field['field']] = sanitize_text_field($_POST[$field['field']]); 64 65 break; 65 66 default: 66 $ad_meta[$field[' name']] = sanitize_text_field($_POST[$field['name']]);67 $ad_meta[$field['field']] = sanitize_text_field($_POST[$field['field']]); 67 68 break; 68 69 } -
wp-dynamic-ads/trunk/index.php
r2412303 r2428914 5 5 * Text Domain: wp-dynamic-ads 6 6 * Domain Path: /languages 7 * Description: Aggregator plugin to import content from various sources7 * Description: Diplay content based on self defined keywords 8 8 * Version: 0.1 9 9 * Author: Sascha Huber
Note: See TracChangeset
for help on using the changeset viewer.