Plugin Directory

Changeset 1081487


Ignore:
Timestamp:
02/03/2015 11:48:21 AM (11 years ago)
Author:
pushwoosh
Message:

2.3.11 support of custom pages

Location:
push-notifications/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • push-notifications/trunk/pushwoosh.php

    r1010426 r1081487  
    33    /**
    44     * @package Pushwoosh
    5      * @version 2.3.10
     5     * @version 2.3.11
    66     */
    77
     
    1212    * Author: Arello Mobile
    1313    * Author URI: http://www.arello-mobile.com/
    14     * Version: 2.3.10
     14    * Version: 2.3.11
    1515    *
    1616    * Copyright 2014 Arello Mobile (email: support@arello-mobile.com)
     
    5050            'high'
    5151        );
     52
     53        // add Pushwoosh meta box for all custom post types
     54        $args = array(
     55            'public'   => true,
     56            '_builtin' => false
     57        );
     58        $output = 'names'; // names or objects, note names is the default
     59        $operator = 'and'; // 'and' or 'or'
     60        $post_types = get_post_types( $args, $output, $operator );
     61        foreach ( $post_types  as $post_type ) {
     62            add_meta_box(
     63                'pushwoosh_section_id',
     64                __('Pushwoosh notification', 'pushwoosh'),
     65                'pushwoosh_message_box',
     66                $post_type,
     67                'side',
     68                'high'
     69            );
     70            add_action('publish_' . $post_type, 'pushwoosh_publish_post');
     71            add_action('draft_'. $post_type, 'pushwoosh_save_post');
     72            add_action('pending_'. $post_type, 'pushwoosh_save_post');
     73        }
    5274    }
    5375
  • push-notifications/trunk/readme.txt

    r1010426 r1081487  
    55Arello Mobile: http://www.arello-mobile.com
    66Requires at least: 3.0.1
    7 Tested up to: 4.0
     7Tested up to: 4.1
    88Stable tag: 2.4
    99License: GPLv2 or later
     
    5656* Refactoring plugin for shared hosting
    5757
     58= 2.3.11 =
     59* Add support of custom post types
     60
    5861== Installation ==
    59621. Download the Pushwoosh plugin.
Note: See TracChangeset for help on using the changeset viewer.