Plugin Directory

Changeset 1546829


Ignore:
Timestamp:
12/06/2016 11:58:48 PM (9 years ago)
Author:
Content.ad
Message:

Update to version 1.1.17

  • You can now add new WordPress Tags using "Content.ad > Widgets > Placement > Exclude widget from tags"
  • Updated placement labels to include "widget" for clarity
Location:
contentad
Files:
27 added
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • contentad/tags

    • Property svn:ignore set to
      1.0.0
  • contentad/trunk/contentad.php

    r1494857 r1546829  
    55 * Plugin URI: https://wordpress.org/plugins/contentad/
    66 * Description: Content.ad enables blog owners to display ads or related blog posts (from their own blog) in a "lead me to more content" section. The ads are sourced dynamically from the Content.ad system and can be a source of revenue for the blog owner.
    7  * Version: 1.1.16
     7 * Version: 1.1.17
    88 * Author: Content.ad
    99 * Author URI: https://www.content.ad
     
    4242}
    4343
    44 define( 'CONTENTAD_VERSION', '1.1.16' );
     44define( 'CONTENTAD_VERSION', '1.1.17' );
    4545define( 'CONTENTAD_FILE', get_contentad_file() );
    4646define( 'CONTENTAD_PATH', plugin_dir_path( CONTENTAD_FILE ) );
  • contentad/trunk/includes/admin/admin.class.php

    r1494857 r1546829  
    9393                    ) );
    9494                    $installation_code_url = CONTENTAD_REMOTE_URL . "Publisher/Widgets/InstallationCode?{$installation_code_query}";
    95                     wp_enqueue_script( 'contentad.admin.js', plugins_url( 'js/', CONTENTAD_FILE ).'admin.js', array('jquery','thickbox'), CONTENTAD_VERSION );
     95                    wp_enqueue_script( 'contentad.admin.js', plugins_url( 'js/', CONTENTAD_FILE ).'admin.js', array('jquery','thickbox','suggest'), CONTENTAD_VERSION );
     96                    // Register hooks
    9697                    wp_localize_script( 'contentad.admin.js', 'ContentAd', array(
    9798                        'action' => 'edit_contentad_widget',
     
    108109                        'installationCodeCall' => $installation_code_url,
    109110                        'pluginsUrl' => plugins_url(),
     111                        'tags' => get_tags('post_tag', array('hide_empty' => false))
    110112                    ) );
    111113                }
  • contentad/trunk/includes/post-type.class.php

    r1494857 r1546829  
    165165                case 'placement':
    166166                    $possible_placements = array(
    167                         'after_post_content' => __('After Post Content', 'contentad'),
    168                         'before_post_content' => __('Before Post Content', 'contentad'),
    169                         'in_widget' => __('In Widget', 'contentad'),
     167                        'after_post_content' => __('After post content', 'contentad'),
     168                        'before_post_content' => __('Before post content', 'contentad'),
     169                        'in_widget' => __('In widget', 'contentad'),
    170170                        'in_function' => __('In a template tag', 'contentad'),
    171                         'popup_or_mobile_slidup' => __('Popup or Mobile Slideup', 'contentad')
     171                        'popup_or_mobile_slidup' => __('Popup or mobile slideup', 'contentad')
    172172                    );
    173173                    $actual_placement = get_post_meta( $post_id, 'placement', true );
     
    267267                            $tags = explode(',', preg_replace( '/, /', ',', strip_tags( implode(" ", $_POST['post_tag']) ) ));
    268268                            $terms = array();
     269                            $terms = array_unique($terms);
    269270                            foreach( $tags as $tag ) {
    270271                                $term = get_term_by( 'name', $tag, 'post_tag' );
    271272                                if( $term ) {
    272273                                    $terms[] = $term->name;
     274                                } else {
     275                                    wp_insert_term( $tag, 'post_tag' );
     276                                    contentAd_append_to_log( '    ADDING NEW EXCLUSION TAGS: ' . join( ', ', $return ) );
     277                                    $terms[] = $tag;
     278                                    $new_terms[] = $tag;
    273279                                }
     280                            }
     281                            if($new_terms) {
     282                                contentAd_append_to_log( '    ADDING NEW EXCLUSION TAGS: ' . join( ', ', $new_terms ) );
    274283                            }
    275284                            contentAd_append_to_log( '    UPDATING EXCLUSION TAGS FOR POST ('.$post_id.') TO: ' . join( ', ', $terms ) );
     
    299308                    <fieldset class="inline-edit-col-left inline-edit-placement">
    300309                        <div class="inline-edit-col">
    301                             <span class="title inline-edit-placement-label"><?php _e('Place Ads:', 'contentad') ?></span>
     310                            <span class="title inline-edit-placement-label"><?php _e('Place widgets', 'contentad') ?></span>
    302311                            <div><?php foreach( $options as $key => $value ): ?>
    303312                                <label for="<?php esc_attr_e($key) ?>">
     
    358367
    359368                                    <span class="title inline-edit-categories-label">
    360                                         <?php _e('Exclude from categories', 'contentad'); ?>
    361                                         <span class="catshow"><?php _e('[more]', 'contentad' ); ?></span>
    362                                         <span class="cathide" style="display:none;"><?php _e('[less]', 'contentad' ); ?></span>
     369                                        <?php _e('Exclude widget from categories', 'contentad'); ?>
    363370                                    </span>
    364371
     
    383390                                    if ( current_user_can( $tag->cap->assign_terms ) ) : ?>
    384391                                        <label class="inline-edit-tags">
    385                                             <span class="title"><?php _e('Exclude from tags', 'contentad'); ?></span>
    386                                             <textarea id="contentad_exc_tags" cols="22" rows="1" name="<?php esc_attr_e( $tag->name ); ?>[]" class="<?php esc_attr_e( $tag->name ); ?>"></textarea>
     392                                            <span class="title"><?php _e('Exclude widget from tags', 'contentad'); ?></span>
     393                                            <textarea cols="22" rows="1" name="<?php esc_attr_e( $tag->name ); ?>[]" class="contentad_exc_tags <?php esc_attr_e( $tag->name ); ?>"></textarea>
    387394                                        </label>
    388395                                    <?php endif;
  • contentad/trunk/js/admin.js

    r1494857 r1546829  
    268268        // Assign tags
    269269        if( excTags ) {
    270             $('#contentad_exc_tags').html( excTags );
    271         } else {
    272             $('#contentad_exc_tags').html( '' );
     270            $('.contentad_exc_tags').html( excTags );
     271        } else {
     272            $('.contentad_exc_tags').html( '' );
     273        }
     274       
     275        /* add Tag hints to the Exlude tags textarea */
     276        if($('#post-' + wp_wid).attr('data-suggest') !== 'true') {
     277            $('.contentad_exc_tags').focus(function(){
     278                $('#edit-' + wp_wid + ' .contentad_exc_tags').suggest("/wp-admin/admin-ajax.php?action=ajax-tag-search&tax=post_tag", {multiple:true, multipleSep: ","});
     279            });
     280            $('#post-' + wp_wid).attr('data-suggest','true');
    273281        }
    274282    }
  • contentad/trunk/readme.txt

    r1494857 r1546829  
    33Tags: related content, engagement, ads, advertising, revenue, posts, montize, monetization, affiliate, contextual ads, contextual advertising, pay per click, ppc, ad networks, relevent ads, text ads, content ads, income, related posts, widgets, related, similar posts, related post thumbnails, popular posts
    44Requires at least: 3.0.6
    5 Tested up to: 4.6
    6 Stable tag: 1.1.16
     5Tested up to: 4.7
     6Stable tag: 1.1.17
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8888
    8989== Changelog ==
     90
     91= 1.1.17 =
     92* You can now add new WordPress Tags using "Content.ad > Widgets > Placement > Exclude widget from tags"
     93* Updated placement labels to include "widget" for clarity
    9094
    9195= 1.1.16 =
  • contentad/trunk/wp-package.json

    r1494857 r1546829  
    55  "readme_description": "Display popular content to your users from your own site and/or from our sponsored partners, increasing visitor engagement and earning revenue at the same time.",
    66  "plugin_description": "Content.ad enables blog owners to display ads or related blog posts (from their own blog) in a \"lead me to more content\" section. The ads are sourced dynamically from the Content.ad system and can be a source of revenue for the blog owner.",
    7   "version": "1.1.16",
     7  "version": "1.1.17",
    88  "url": "https://wordpress.org/plugins/contentad/",
    99  "copyright": "Copyright 2014 Content.ad (info@content.ad)",
    1010  "requires_wp": "3.0.6",
    11   "tested_with": "4.6",
     11  "tested_with": "4.7",
    1212  "requires_php": "5.2.4",
    1313  "text_domain": "contentad",
Note: See TracChangeset for help on using the changeset viewer.