Plugin Directory

Changeset 1769730


Ignore:
Timestamp:
11/17/2017 07:21:49 PM (8 years ago)
Author:
willrad
Message:
  • easy to use shortcode buttons in the wordpress editor.
  • better fix for stylesheet moment container size problems.
Location:
kiip/trunk
Files:
5 added
4 edited

Legend:

Unmodified
Added
Removed
  • kiip/trunk/README.md

    r1767513 r1769730  
    99**Requires at least:** 3.8 
    1010
    11 **Tested up to:** 4.9 
     11**Tested up to:** 5.0
    1212
    1313Requires PHP: 5.6
     
    3232
    3333New
     34Add shortcodes easily with WP editor buttons.
    3435Better placement in posts and pages.
    3536Widgets for your theme.
     
    4445#### Shortcodes
    4546
    46 Use shortcodes to load kiip moment rewards.
     47Use shortcodes to load kiip moment rewards. Shortcodes can be added easily with new
     48buttons in the WP editor.
    4749
    4850#### About kiip
     
    9193##  Changelog 
    9294
     95### 3.1.6
     96* easy to use shortcode buttons in the wordpress editor.
     97* better fix for stylesheet moment container size problems.
     98
     99
    93100### 3.1.5
    94101
     
    124131
    125132
    126 ### 3.1.5
    127 * better fix for stylesheet moment container size problems.
    128 * heights are now set to 325px for widgets and shortcode container moments.
     133### 3.1.6
     134* easy to use shortcode buttons in the wordpress editor.
     135* better fix for stylesheet moment container size problems.
  • kiip/trunk/admin/css/kiip-for-wordpress-admin.css

    r1765026 r1769730  
    11/**
    2 
    32 * All of the CSS for the admin-specific functionality is
    4 
    53 * included in this file.
    6 
    74 */
    85
    9 
    10 
    116.body-kiip {
    12 
    137    padding-top: 54px;
    14 
    158    }
    169
     
    1811
    1912.microlight {
    20 
    2113    font-family: monospace;
    22 
    2314    color: #bbc8d4;
    24 
    2515    white-space: pre;
    26 
    2716    background-color: #00338B;
    28 
    2917    padding: 20px;
    30 
    3118    border-radius: 25px;
    32 
    3319    font-size: 12px;
    34 
    3520}
    3621
    37 
    38 
    3922.microlight .odd {
    40 
    4123    color: #00338B !important;
    42 
    4324    background-color: #bbc8d4 !important;
    44 
    4525}
    4626
    47 
    48 
    4927.footer-link {
    50 
    5128    font-size: 12px;
    52 
    5329}
    5430
     31i.kiip-mce-icon {
     32    background-image: url('../../assets/images/kiip-logo-32x32-square.png');
     33}
  • kiip/trunk/kiip-for-wordpress.php

    r1767513 r1769730  
    44 * Plugin Name: Kiip For Wordpress
    55 *
    6  * Description: Kiip.me plugin for Wordpress. Kiip is a marketing and monetization platform unique in style and user rewardplatforms. User retention is an important aspect for wordpress websites with subscribers, crm's and more. Reward your users and monetize your website today! Make ad revenue. Create rewards and user retention.
     6 * Description: Kiip.me plugin for Wordpress. Simple to use with shortcodes, widgets and editor buttons. Kiip is a marketing and monetization platform unique in style and user reward platforms. Reward your users and monetize your website today! Make ad revenue. Create rewards and user retention.
    77 *
    88 * Plugin URI: http://radford.online
    9  * Version: 3.1.5
     9 * Version: 3.1.6
    1010 *
    1111 * Author: Will Radford
     
    4242     * This plugin's version
    4343     */
    44     const VERSION = '3.1.5';
     44    const VERSION = '3.1.6';
    4545
    4646    /**
     
    226226
    227227    function enqueue_styles_admin() {
     228
     229        wp_enqueue_style( self::NAME, plugin_dir_url( __FILE__ ) . 'admin/css/kiip-for-wordpress-admin.css', array(), self::VERSION, 'all' );
    228230        // Load only on plugin id, id for $current_screen does not get called soon enough to load in header??
    229231        if ( 'kiip/admin/partials/kiip-for-wordpress-admin-display.php' != $_GET[ 'page' ] ) {
     
    231233        }
    232234        //$current_page_id = self::check_current_screen_admin();
    233         //if( $current_page_id == "kiip/admin/partials/kiip-for-wordpress-admin-display" ) {
    234         wp_enqueue_style( self::NAME, plugin_dir_url( __FILE__ ) . 'admin/css/kiip-for-wordpress-admin.css', array(), self::VERSION, 'all' );
     235        //if( $current_page_id == "kiip/admin/partials/kiip-for-wordpress-admin-display" ) {       
    235236        // bootstrap 3  affects other admin pages when loaded without conditions to exclude it from the rest of the admin.
    236237        wp_enqueue_style( 'bootstrap-3.3.7', plugin_dir_url( __FILE__ ) . 'admin/css/bootstrap/bootstrap.min.css' );
     
    492493
    493494         */
    494 
    495495    function kiip_check_for_shortcode() {
    496496        global $wp_query;
     
    518518
    519519    /**
     520     * Add shortcode buttons to wordpress tiny mce plain text editor
     521     *
     522     * @since 3.1.6
     523     *
     524     */
     525
     526    function kiip_shortcode_button_script() {
     527        if ( wp_script_is( "quicktags" ) ) {
     528            ?>
     529            <script type="text/javascript">
     530                //this function is used to add the shortcode buttons to the plain text editor
     531                QTags.addButton(
     532                    "KMC_shortcode",
     533                    "Kiip Moment Container",
     534                    '[kiip_ad_shortcode type="contained"]'
     535                );
     536                QTags.addButton(
     537                    "KMA_shortcode",
     538                    "Kiip Moment Auto Popup ",
     539                    '[kiip_ad_shortcode type="fullscreen"]'
     540                );
     541                QTags.addButton(
     542                    "KMOS_shortcode",
     543                    "Kiip Moment On Scroll",
     544                    '[kiip_ad_shortcode type="fullscreen-onscroll"]'
     545                );
     546                QTags.addButton(
     547                    "KMOC_shortcode",
     548                    "Kiip Moment On Click",
     549                    '[kiip_ad_shortcode type="fullscreen-onclick"]'
     550                );
     551            </script>
     552            <?php
     553        }
     554    }
     555    // add shortcode buttons to the text editor
     556    add_action( "admin_print_footer_scripts", "kiip_shortcode_button_script" );
     557
     558    /**
     559     * Add shortcode buttons to wordpress tiny mce rich text editor
     560     *
     561     * @since 3.1.6
     562     *
     563     */
     564
     565    function kiip_add_mce_button() {
     566        global $typenow;
     567        // check user permissions
     568        if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) {
     569            return;
     570        }
     571        // verify the post type
     572        if ( !in_array( $typenow, array( 'post', 'page' ) ) )
     573            return;
     574        // check if WYSIWYG is enabled
     575        if ( get_user_option( 'rich_editing' ) == 'true' ) {
     576            add_filter( "mce_external_plugins", "kiip_add_tinymce_plugin" );
     577            add_filter( 'mce_buttons', 'kiip_register_button' );
     578        }
     579    }
     580    add_action( 'admin_head', 'kiip_add_mce_button' ); 
     581
     582    /**
     583     * create a button for wp editor
     584     *
     585     * @since 3.1.6
     586     *
     587     */
     588
     589    function kiip_add_tinymce_plugin( $plugin_array ) {
     590        $plugin_array[ 'kiip_mce_button' ] = plugin_dir_url( __FILE__ ) . 'admin/js/shortcodes/tinymce-shortcode-buttons.js';
     591        return $plugin_array;
     592    }
     593
     594     /**
     595     * register the button for wp editor
     596     *
     597     * @since 3.1.6
     598     *
     599     */
     600
     601    function kiip_register_button( $buttons ) {
     602        array_push( $buttons, "kiip_mce_button" );
     603        return $buttons;
     604    }
     605
     606     /**
     607     * Add params to admin js vars
     608     *
     609     * @since 3.1.6
     610     *
     611     */
     612
     613    function add_kiip_params_admin() {
     614        global $current_screen;
     615        $type = $current_screen->post_type;
     616        $plugin_data = new kiip_for_wordpress();
     617        $params = $plugin_data->kiip_options_array();
     618        if (is_admin() && $type == 'post' || $type == 'page') {
     619            ?>
     620            <script type="text/javascript">
     621            var kiipsetClick = '<?php echo $params['kiipsetClick']; ?>';
     622            </script>
     623            <?php
     624        }
     625    }
     626    // add params to admin js vars
     627    add_action('admin_head','add_kiip_params_admin');
     628
     629     /**
    520630     * Add plugin action links.
    521631     *
  • kiip/trunk/readme.txt

    r1767513 r1769730  
    44Donate link: paypal.me/kiipforwordpress
    55Requires at least: 3.8
    6 Tested up to: 4.9
     6Tested up to: 5.0
    77Requires PHP: 5.6
    88Stable tag: trunk
     
    2121
    2222= New =
     23Add shortcodes easily with WP editor buttons.
    2324Better placement in posts and pages.
    2425Widgets for your theme.
     
    3132
    3233= Shortcodes =
    33 Use shortcodes to load kiip moment rewards.
     34Use shortcodes to load kiip moment rewards. Shortcodes can be added easily with new
     35buttons in the WP editor.
    3436
    3537= About kiip =
     
    6870==  Changelog  ==
    6971
     72= 3.1.6 =
     73* easy to use shortcode buttons in the wordpress editor.
     74* better fix for stylesheet moment container size problems.
     75
    7076= 3.1.5 =
    7177* better fix for stylesheet moment container size problems.
     
    9298
    9399== Upgrade Notice ==
    94 = 3.1.5 =
     100= 3.1.6 =
     101* easy to use shortcode buttons in the wordpress editor.
    95102* better fix for stylesheet moment container size problems.
Note: See TracChangeset for help on using the changeset viewer.