Plugin Directory

Changeset 1462090


Ignore:
Timestamp:
07/28/2016 09:25:19 AM (10 years ago)
Author:
O-Zone
Message:

Step forward to 0.6

Location:
wp-allaround/trunk
Files:
4 added
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • wp-allaround/trunk/README.txt

    r1461999 r1462090  
    44Tags: telegram, bot, channel, broadcast, promote
    55Requires at least: 4.0.0
    6 Tested up to: 4.5.3
    7 Stable tag: 0.5
     6Tested up to: 4.6.0
     7Stable tag: 0.6
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3636== Changelog ==
    3737
     38= 0.6 =
     39* Plugin internationalization now works
     40* Added italian translation
     41* Added publish status column on articles list
     42* Minor code cleanup and bugs fixed
     43
    3844= 0.5 =
    3945* Minor bug fixes
  • wp-allaround/trunk/wp-allaround-admin.php

    r1461999 r1462090  
    3535
    3636function allaround_enqueue() {
     37    global $wp_styles;
     38
    3739    wp_enqueue_script( 'ajax-script',
    3840        plugins_url( '/js/common.js', __FILE__ ),
    3941        array('jquery')
    4042    );
     43
    4144    wp_localize_script( 'ajax-script', 'ajax_object', array(
    4245    'ajax_url' => admin_url( 'admin-ajax.php' ),
    4346    ));
     47     
     48    // Load the main stylesheet
     49    wp_enqueue_style( 'wp-allaround', plugins_url( '/css/wp-allaround.css', __FILE__ ));
    4450}
     51
    4552add_action('admin_enqueue_scripts', 'allaround_enqueue');
    4653
     
    93100                    </tr><tr>
    94101                    <td>
    95                         <input type="submit">
     102                        <input type="submit" value="<?php _e('Submit'); ?>>
    96103                    </td>
    97104                    </tr>
  • wp-allaround/trunk/wp-allaround.php

    r1461999 r1462090  
    4545}
    4646
     47function allaround_load_textdomain() {
     48    load_plugin_textdomain( 'wp-allaround', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
     49}
     50add_action( 'plugins_loaded', 'allaround_load_textdomain' );
     51
    4752/* ============================================================ */
    4853/*                              */
     
    5055/*                              */
    5156/* =============================================================*/
    52 
    5357
    5458function allaround_post_metabox() {
     
    7983    }
    8084}
     85
     86/* ============================================================ */
     87/*                              */
     88/* POSTS LIST TABLE                     */
     89/*                              */
     90/* =============================================================*/
     91
     92/* Display custom column */
     93function allaround_display_column( $column, $post_id ) {
     94    if ($column == 'allaround'){
     95    /* Check if this post was already published to avoid duplicates */
     96    $is_publish = get_post_meta($post_id,'allaround_post_publish', true);
     97?>
     98    <div aria-hidden="true" title="" class="allaround-score-icon <?php echo ($is_publish ? "published" : "na"); ?>"></div><span class="screen-reader-text"><?php echo ($is_publish ? __("Published") : __("Not published")); ?></span></td>
     99<?php
     100    }
     101}
     102add_action( 'manage_posts_custom_column' , 'allaround_display_column', 10, 2 );
     103
     104function allaround_column($columns) {
     105    return array_merge( $columns,
     106              array('allaround' => __('AllAround')) );
     107}
     108add_filter('manage_posts_columns' , 'allaround_column');
    81109
    82110/* ============================================================ */
Note: See TracChangeset for help on using the changeset viewer.