• Resolved mokummusic

    (@mokummusic)


    Hi David

    I’ve noticed that a previously working piece of code to change the captions on gallery items, no longer works for me.
    I get a fatal error that warns me the class MLAOptions doesn’t exist, whenever my code runs into:

    $my_setting = array(
    	        'data_source' => 'inserted_in',
    	        'option' => 'raw'
    	    );
    	    $inserted_in = MLAOptions::mla_get_data_source( $item_values['attachment_ID'], 'single_attachment_mapping', $my_setting, NULL );
    	}

    Any idea what could have changed? I thought at first it may have been my plugin loading order, but have tried checking class_exists, hooked into after ‘plugins_loaded’ and it doesn’t seem to exist then either.

    Thank you
    Neil

    https://www.ads-software.com/plugins/media-library-assistant/

Viewing 1 replies (of 1 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your report and for the investigation you’ve done into the plugin loading order.

    Over the past few MLA versions I have re-arranged the code base to reduce the time and memory requirements for front-end and Ajax server requests. As part of this effort I moved the mla_get_data_source code because the entire MLAOptions class is not required for those requests. If you change your code to call MLAData_Source::mla_get_data_source you should get a better result. If the MLAData_Source does not exist in your application scenario, any additional information you can supply regarding the context in which your code appears will help me be more specific.

    I am marking this topic resolved, but please update it if the above suggestion doesn’t work or if you have other problems or further questions regarding access to the mla_get_data_source code. Thanks for your understanding and your interest in the plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘MLAOptions::mla_get_data_source() Class doesn't exist’ is closed to new replies.