Plugin Directory

Changeset 1505113


Ignore:
Timestamp:
09/29/2016 01:23:18 PM (10 years ago)
Author:
stevorevo
Message:

updated URL parsing to get ID if page is child

Location:
virtuous/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • virtuous/trunk/lib/core/class-virtuous-project.php

    r1495983 r1505113  
    260260        global $VirtuousUtilities;
    261261        $get_variable = $VirtuousUtilities->vdrm_extract_variables();
    262         $id = isset( $get_variable[1] ) ? $get_variable[1] : '';
     262        $id = $get_variable[count( $get_variable ) - 1];
    263263        $return_val = '';
    264264        $ajax_url = plugin_dir_url(  __FILE__  ) . 'listener.php';
     
    276276        $virtuous_api_project_types = implode( ', ', array_keys( $virtuous_api_project_types_array ) );
    277277
    278         if ( ! empty( $id ) ) {
     278        if ( ! empty( $id ) && is_numeric( $id ) ) {
    279279
    280280            global $VirtuousProject;
Note: See TracChangeset for help on using the changeset viewer.