Plugin Directory

Changeset 3334213


Ignore:
Timestamp:
07/25/2025 01:50:20 PM (6 months ago)
Author:
wpchill
Message:

Update to version 5.0.30 from GitHub

Location:
download-monitor
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • download-monitor/tags/5.0.30/changelog.txt

    r3332774 r3334213  
     1= 5.0.30 - 25.07.2025 =
     2Fixed: Downloads without a default WPML language were not showing in the admin table.
    13
    24= 5.0.29 - 23.07.2025 =
  • download-monitor/tags/5.0.30/download-monitor.php

    r3332774 r3334213  
    44    Plugin URI: https://www.download-monitor.com
    55    Description: A full solution for managing and selling downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
    6     Version: 5.0.29
     6    Version: 5.0.30
    77    Author: WPChill
    88    Author URI: https://wpchill.com
     
    3535
    3636// Define DLM Version
    37 define( 'DLM_VERSION', '5.0.29' );
     37define( 'DLM_VERSION', '5.0.30' );
    3838define( 'DLM_UPGRADER_VERSION', '4.6.0' );
    3939
  • download-monitor/tags/5.0.30/includes/installer-functions.php

    r3332245 r3334213  
    2424    // check if.
    2525    if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
    26         require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
     26        require_once ABSPATH . '/wp-admin/includes/plugin.php';
    2727    }
    2828
     
    5252        $installer->install();
    5353    }
     54
     55    // sets the default language of dlm_downloads post types
     56    dlm_set_wpml_language_default();
    5457}
    5558
     
    202205    }
    203206}
     207
     208function dlm_set_wpml_language_default() {
     209    if ( ! defined( 'ICL_SITEPRESS_VERSION' ) || ! function_exists( 'wpml_get_default_language' ) || ! class_exists( 'WP_Query' ) ) {
     210        return;
     211    }
     212
     213    global $sitepress;
     214
     215    if ( ! method_exists( $sitepress, 'set_element_language_details' ) ) {
     216        return;
     217    }
     218
     219    $default_lang = apply_filters( 'wpml_default_language', null );
     220    if ( ! $default_lang ) {
     221        return;
     222    }
     223
     224    $args = array(
     225        'post_type'      => 'dlm_download',
     226        'post_status'    => 'any',
     227        'posts_per_page' => -1,
     228        'fields'         => 'ids',
     229        'meta_query'     => array(
     230            array(
     231                'key'     => '_icl_lang_duplicate',
     232                'compare' => 'NOT EXISTS',
     233            ),
     234        ),
     235    );
     236
     237    $downloads = get_posts( $args );
     238
     239    foreach ( $downloads as $post_id ) {
     240        $has_language = apply_filters(
     241            'wpml_element_language_code',
     242            null,
     243            array(
     244                'element_id'   => $post_id,
     245                'element_type' => 'post_dlm_download',
     246            )
     247        );
     248
     249        if ( ! $has_language ) {
     250            $sitepress->set_element_language_details(
     251                $post_id,
     252                'post_dlm_download',
     253                null,
     254                $default_lang,
     255                null
     256            );
     257        }
     258    }
     259}
  • download-monitor/tags/5.0.30/readme.txt

    r3332774 r3334213  
    44Requires at least: 5.5 
    55Tested up to: 6.8 
    6 Stable tag: 5.0.29
     6Stable tag: 5.0.30
    77License: GPLv3 
    88Requires PHP: 7.6 
     
    115115
    116116== Changelog ==
     117= 5.0.30 - 25.07.2025 =
     118Fixed: Downloads without a default WPML language were not showing in the admin table.
     119
    117120= 5.0.29 - 23.07.2025 =
    118121Fixed: Compatibility with Admin Columns plugin.
  • download-monitor/tags/5.0.30/vendor/composer/installed.php

    r3332774 r3334213  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '84d211b59ddd524622e77813678f264e9b32b931',
     6        'reference' => '96e33c8ecd5ffc6be98692ce847faa5a66f0d3f0',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '84d211b59ddd524622e77813678f264e9b32b931',
     16            'reference' => '96e33c8ecd5ffc6be98692ce847faa5a66f0d3f0',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • download-monitor/trunk/changelog.txt

    r3332774 r3334213  
     1= 5.0.30 - 25.07.2025 =
     2Fixed: Downloads without a default WPML language were not showing in the admin table.
    13
    24= 5.0.29 - 23.07.2025 =
  • download-monitor/trunk/download-monitor.php

    r3332774 r3334213  
    44    Plugin URI: https://www.download-monitor.com
    55    Description: A full solution for managing and selling downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
    6     Version: 5.0.29
     6    Version: 5.0.30
    77    Author: WPChill
    88    Author URI: https://wpchill.com
     
    3535
    3636// Define DLM Version
    37 define( 'DLM_VERSION', '5.0.29' );
     37define( 'DLM_VERSION', '5.0.30' );
    3838define( 'DLM_UPGRADER_VERSION', '4.6.0' );
    3939
  • download-monitor/trunk/includes/installer-functions.php

    r3332245 r3334213  
    2424    // check if.
    2525    if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
    26         require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
     26        require_once ABSPATH . '/wp-admin/includes/plugin.php';
    2727    }
    2828
     
    5252        $installer->install();
    5353    }
     54
     55    // sets the default language of dlm_downloads post types
     56    dlm_set_wpml_language_default();
    5457}
    5558
     
    202205    }
    203206}
     207
     208function dlm_set_wpml_language_default() {
     209    if ( ! defined( 'ICL_SITEPRESS_VERSION' ) || ! function_exists( 'wpml_get_default_language' ) || ! class_exists( 'WP_Query' ) ) {
     210        return;
     211    }
     212
     213    global $sitepress;
     214
     215    if ( ! method_exists( $sitepress, 'set_element_language_details' ) ) {
     216        return;
     217    }
     218
     219    $default_lang = apply_filters( 'wpml_default_language', null );
     220    if ( ! $default_lang ) {
     221        return;
     222    }
     223
     224    $args = array(
     225        'post_type'      => 'dlm_download',
     226        'post_status'    => 'any',
     227        'posts_per_page' => -1,
     228        'fields'         => 'ids',
     229        'meta_query'     => array(
     230            array(
     231                'key'     => '_icl_lang_duplicate',
     232                'compare' => 'NOT EXISTS',
     233            ),
     234        ),
     235    );
     236
     237    $downloads = get_posts( $args );
     238
     239    foreach ( $downloads as $post_id ) {
     240        $has_language = apply_filters(
     241            'wpml_element_language_code',
     242            null,
     243            array(
     244                'element_id'   => $post_id,
     245                'element_type' => 'post_dlm_download',
     246            )
     247        );
     248
     249        if ( ! $has_language ) {
     250            $sitepress->set_element_language_details(
     251                $post_id,
     252                'post_dlm_download',
     253                null,
     254                $default_lang,
     255                null
     256            );
     257        }
     258    }
     259}
  • download-monitor/trunk/readme.txt

    r3332774 r3334213  
    44Requires at least: 5.5 
    55Tested up to: 6.8 
    6 Stable tag: 5.0.29
     6Stable tag: 5.0.30
    77License: GPLv3 
    88Requires PHP: 7.6 
     
    115115
    116116== Changelog ==
     117= 5.0.30 - 25.07.2025 =
     118Fixed: Downloads without a default WPML language were not showing in the admin table.
     119
    117120= 5.0.29 - 23.07.2025 =
    118121Fixed: Compatibility with Admin Columns plugin.
  • download-monitor/trunk/vendor/composer/installed.php

    r3332774 r3334213  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '84d211b59ddd524622e77813678f264e9b32b931',
     6        'reference' => '96e33c8ecd5ffc6be98692ce847faa5a66f0d3f0',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '84d211b59ddd524622e77813678f264e9b32b931',
     16            'reference' => '96e33c8ecd5ffc6be98692ce847faa5a66f0d3f0',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.