Plugin Directory

Changeset 2107115


Ignore:
Timestamp:
06/17/2019 12:57:07 AM (7 years ago)
Author:
Tim Scheman
Message:

updating trunk to version 1.2.2

Location:
artistpress/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • artistpress/trunk/admin/includes/artist-press-admin-scripts.php

    r1746999 r2107115  
    4646        wp_enqueue_style( 'artist-press-admin-theme', plugins_url('/css/jquery-ui.css', __FILE__ ) );
    4747        wp_enqueue_style( 'artist-press-admin-theme-2', plugins_url('/css/jquery-ui.theme.min.css', __FILE__ ) );
    48         wp_enqueue_script('artist-press-post-admin', plugins_url('/js/artist-press-admin.js', __FILE__ ), array('jquery', 'jquery-ui-datepicker'), '', true);
     48        //wp_enqueue_script('artist-press-post-admin', plugins_url('/js/artist-press-admin.js', __FILE__ ), array('jquery', 'jquery-ui-datepicker'), '', true);
    4949
    5050    }
  • artistpress/trunk/admin/includes/css/admin-posttype.css

    r1776588 r2107115  
    1212    height: auto;
    1313    position: relative;
     14}
     15.form-group{
     16    border-bottom: 1px solid #e9e9e9;
     17    padding-top: 10px;
     18    padding-bottom: 15px;
     19    height: auto;
     20    position: relative;
     21}
     22#show_details .form-group:nth-child(10),
     23#show_details .form-group:last-child{
     24    display:none;
    1425}
    1526.form-row{
  • artistpress/trunk/admin/includes/metaboxes/meta_box.php

    r1776588 r2107115  
    4141        default:
    4242            echo '<input type="' . $type . '" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" value="' . esc_attr( $meta ) . '" class="regular-text" size="30" />
     43                    <br />' . $desc;
     44        break;
     45        // hidden
     46        case 'hidden':
     47            echo '<input type="' . $type . '" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" value="' . esc_attr( $meta ) . '" class="hidden-field" size="30" />
    4348                    <br />' . $desc;
    4449        break;
     
    118123            $posts = get_posts( array( 'post_type' => $post_type, 'posts_per_page' => -1, 'orderby' => 'name', 'order' => 'ASC' ) );
    119124            foreach ( $posts as $item )
    120                 echo '<option value="' . $item->ID . '"' . selected( is_array( $meta ) && in_array( $item->ID, $meta ), true, false ) . '>' . $item->post_title . '</option>';
     125                echo '<option data-name="' . $item->post_name . '" value="' . $item->ID . '"' . selected( is_array( $meta ) && in_array( $item->ID, $meta ), true, false ) . '>' . $item->post_title . '</option>';
    121126            $post_type_object = get_post_type_object( $post_type );
    122127            echo '</select> &nbsp;<br />' . $desc;
     
    523528                meta_box_find_field_type( 'file', $this->fields )
    524529            ) ) )
    525                 wp_enqueue_script( 'meta_box', CUSTOM_METABOXES_DIR . '/js/scripts.js', $deps );
     530                wp_enqueue_script( 'meta_box', CUSTOM_METABOXES_DIR . 'js/scripts.js', $deps );
    526531             
    527532            // css
  • artistpress/trunk/admin/views/artist-press-post-types.php

    r1746999 r2107115  
    306306    ));
    307307
    308     if( $total && count( $total ) == 1 ){
     308    if( $total && (count( $total ) >= 1) ){
    309309        wp_safe_redirect( "edit.php?post_type=artist");
    310310    } 
     
    327327    ));
    328328    if (($typenow == 'artist') && ($pagenow == 'edit.php')){
    329         if( $total && count( $total ) == 1 ) {
     329        if( $total && count( $total ) >= 1 ) {
    330330            echo '<div id="my-custom-warning" class="error fade"><p>The maximum number of published ArtistPress Artists has been met.</p></div>';
    331331        }
  • artistpress/trunk/admin/views/artist-press-settings.php

    r1785854 r2107115  
    272272            'show_list_display'         => 'show_date',
    273273            'display_show_artist'       => 'yes',
     274            'show_list_order'           =>'ASC',
    274275            'display_show_venue'        => 'yes',
    275276            'display_ticket_button'     => 'yes',
     
    300301        array(
    301302            'Choose how your ArtistPress show listing is displayed.'
     303        )
     304    );
     305
     306    // Adds a settings field to Show List settings section.
     307    add_settings_field(
     308        'show_list_order',
     309        'Show List Order',
     310        'artistpress_show_list_display_order',
     311        'artistpress_show_list_settings',
     312        'artistpress_show_list_settings_section',
     313        array(
     314            'Choose the order of your ArtistPress show list. Ascending (Z-A or 100-1 ) or Descending (A-Z or 1-100 ). Ascending is the default.',
    302315        )
    303316    );
     
    10281041}
    10291042
     1043function artistpress_show_list_display_order($args) {
     1044
     1045    $options = get_option( 'artistpress_show_list_settings' );
     1046    if( ! isset($options['show_list_order']) ) { $options['show_list_order'] = false; }
     1047
     1048    $html = '<select id="show_list_order" name="artistpress_show_list_settings[show_list_order]">';
     1049        $html .= '<option value="default">Select a list order ...</option>';
     1050        $html .= '<option value="ASC"' . selected( $options['show_list_order'], 'ASC', false) . '>Ascending</option>';
     1051        $html .= '<option value="DESC"' . selected( $options['show_list_order'], 'DESC', false) . '>Descending</option>';
     1052    $html .= '</select>';
     1053
     1054    $html .= '<label for="show_list_order"> '  . $args[0] . '</label>';
     1055   
     1056    echo $html;
     1057
     1058}
     1059
    10301060function artistpress_show_list_artist_callback($args) {
    10311061
  • artistpress/trunk/admin/views/artist-press-show-fields.php

    r1746999 r2107115  
    9090        'type'  => 'textarea' // type of field
    9191    ),
     92    array( // Hidden Input
     93        'label' => null, // <label>
     94        'desc'  => '', // description
     95        'id'    => $prefix.'show_artist_name', // field id and name
     96        'type'  => 'hidden' // type of field
     97    ),
     98    array( // Hidden Input
     99        'label' => null, // <label>
     100        'desc'  => '', // description
     101        'id'    => $prefix.'show_venue_name', // field id and name
     102        'type'  => 'hidden' // type of field
     103    ),
    92104);
    93105/**
  • artistpress/trunk/artist-press.php

    r1989964 r2107115  
    66* Author: Tim Scheman
    77* Author URI: http;//timscheman.com
    8 * Version: 1.2.1
     8* Version: 1.2.2
    99* License: GPLv2  //look into this to make sure you have ther right license listed.
    1010*
     
    3333 */
    3434require_once (plugin_dir_path(__FILE__) . 'admin/includes/artist-press-includes.php');
     35
     36/**
     37 * Includes the ArtistPress settings.
     38 */
     39require_once (plugin_dir_path(__FILE__) . 'admin/utilities/class-upgrader.php');
    3540
    3641/**
     
    178183    flush_rewrite_rules();
    179184}
     185
     186/**
     187 * Begins Execution of ArtistPress Upgrader
     188 *
     189 * @since 1.2.2
     190 *
     191 */
     192function run_artistpress_upgrader(){
     193    $upgrade = new ArtistPress_Utilities\Upgrader;
     194    $upgrade->run_upgrade();
     195}
     196run_artistpress_upgrader();
  • artistpress/trunk/public/includes/artist-press-events-functions.php

    r1746999 r2107115  
    278278
    279279        $showListSettings       = get_option('artistpress_show_list_settings');
    280         $showDisplayType        = sanitize_text_field( $showListSettings['show_list_display'] );
     280        $showDisplayType        = sanitize_text_field( $showListSettings['show_list_display'] );
     281        $showDisplayOrder       = sanitize_text_field( $showListSettings['show_list_order'] );
    281282        $showDisplayArtistName  = sanitize_text_field( $showListSettings['display_show_artist'] );
    282283        $showDisplayVenueName   = sanitize_text_field( $showListSettings['display_show_venue'] );
     
    290291        $current_meta_value     = NULL;
    291292
     293        if ( $showDisplayType == 'show_date') {
     294            $show_meta_key = 'artistpress_show_date';
     295
     296        }elseif( $showDisplayType == 'show_venue' ){
     297            $show_meta_key = 'artistpress_show_venue_name';
     298
     299        }elseif( $showDisplayType == 'show_artist' ){
     300            $show_meta_key = 'artistpress_show_artist_name';
     301        }
     302       
    292303        $args = array(
    293304                'post_type' => 'show',               
    294                 'meta_key'  => 'artistpress_' . $showDisplayType,
     305                'meta_key'  => $show_meta_key,
    295306                'orderby'   => 'meta_value',
    296                 'order'     => 'ASC',
     307                'order'     => $showDisplayOrder,
    297308                'posts_per_page' => -1,
    298309        );
  • artistpress/trunk/readme.txt

    r1989964 r2107115  
    33Tags: band, artist, artists, shows, venues, gallery, events, event, event listing, custom post types
    44Requires at least: 4.8
    5 Tested up to: 5.0
     5Tested up to: 5.2.1
    66Requires PHP: 7.0
    7 Stable tag: 1.2.1
     7Stable tag: 1.2.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6565
    6666= Q. I have a question about ArtistPress =
    67 A. As this is a new and growing project I ask that you are patient with me.  Answers to your questions can be found at https://www.artistpress-plugin.com/documentation/ . If you have any concerns with ArtistPress or feel you need to leave a bad review, pleas contact me first at contact@artistpress-plugin.com.  I will make every effort possible to get your question answered.
     67A. As this is a new and growing project I ask that you are patient with me.  Answers to your questions can be found at https://www.artistpress-plugin.com/documentation/ . If you have any concerns with ArtistPress or feel you need to leave a bad review, please contact me first at contact@artistpress-plugin.com.  I will make every effort possible to get your question answered.
    6868
    6969
     
    105105= 1.2.1 =
    106106* Conditionally enqueued jQuery for gallery lightboxes as it was not available in new "Twenty Nineteen" theme.
     107
     108= 1.2.2 =
     109* Changed ArtistPress Show meta data to save the venue name in addition to venue ID.
     110* Added setting to order show archive in Descending or Ascending order. This setting still defaults to ascending order.
     111* Added Upgrader class to update meta on all shows. Upgrader runs once in the background when the plugin is updated.
Note: See TracChangeset for help on using the changeset viewer.