Plugin Directory

Changeset 3022194


Ignore:
Timestamp:
01/16/2024 08:00:41 AM (2 years ago)
Author:
wptaskforce
Message:

Fix depreciated wordpress codex

Location:
wpcargo
Files:
790 added
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • wpcargo/trunk/admin/classes/class-wpc-admin.php

    r2191286 r3022194  
    2929    }
    3030    public static function add_wpc_custom_pages() {
    31         if (get_page_by_title('Track') == NULL) {
     31        if (get_page_id_by_title('Track') == NULL) {
    3232            $form    = array(
    3333                'comment_status' => 'closed',
     
    4343            $trackf  = wp_insert_post($form, false);
    4444        }
    45         if (get_page_by_title('Account') == NULL) {
     45        if (get_page_id_by_title('Account') == NULL) {
    4646            $form    = array(
    4747                'comment_status' => 'closed',
  • wpcargo/trunk/admin/includes/functions.php

    r2952534 r3022194  
    811811
    812812}
     813
     814function get_page_id_by_title( $page_title, $output = OBJECT, $post_type = 'page'  ){
     815    global $wpdb;
     816
     817    if ( is_array( $post_type ) ) {
     818        $post_type           = esc_sql( $post_type );
     819        $post_type_in_string = "'" . implode( "','", $post_type ) . "'";
     820        $sql                 = $wpdb->prepare(
     821            "SELECT ID
     822            FROM $wpdb->posts
     823            WHERE post_title = %s
     824            AND post_type IN ($post_type_in_string)",
     825            $page_title
     826        );
     827    } else {
     828        $sql = $wpdb->prepare(
     829            "SELECT ID
     830            FROM $wpdb->posts
     831            WHERE post_title = %s
     832            AND post_type = %s",
     833            $page_title,
     834            $post_type
     835        );
     836    }
     837
     838    $page = $wpdb->get_var( $sql );
     839
     840    if ( $page ) {
     841        return get_post( $page, $output );
     842    }
     843
     844    return NULL;
     845}
  • wpcargo/trunk/readme.txt

    r3014509 r3022194  
    8383* [Driver Mobile App](https://play.google.com/store/apps/details?id=com.test.driverapp&hl=en&gl=US) - Android based app use to gather  photo and signature of the receiver   and update the shipment status
    8484
     85= Contribution Addons =
     86* [Categorize Shipment Display by Type of Shipment Custom Field - WPCargo Custom Addons](https://www.wpcargo.com/product/categorize-shipment-display-by-type-of-shipment-custom-field/) -  Opensource and it display your shipment using shortcode by category and u
    8587
    8688= Demos =
     
    136138
    137139== Changelog ==
     140
     141== Version: 6.13.5 =
     142- fixed deprecated functions and warnings
     143
    138144= 6.13.3   
    139145- Hook to allow branch  for multi prefix and suffix
  • wpcargo/trunk/wpcargo.php

    r3014509 r3022194  
    77 * Text Domain: wpcargo
    88 * Domain Path: /languages
    9  * Version: 6.13.4
     9 * Version: 6.13.5
    1010 */
    1111/*
Note: See TracChangeset for help on using the changeset viewer.