Redux Framework Custom Rest Api / Export

183 Views Asked by At

I want to learn how I can change this export link to custom?

wp-admin/admin-ajax.php?action=redux_download_options-custom&secret=c232a146b76ca2976c6a7a345f3c7432

Like :

wp-admin/admin-ajax.php?action=redux_download_options-custom&secret=custom_export

I need to see what they change something for mobile apps.

Thanks for helping me ;)

1

There are 1 best solutions below

0
On

extentions_import_export.php line 136 change md5 checks to "custom_export_uri"

    function link_options() {
        if ( ! isset( $_GET['secret'] ) || $_GET['secret'] != 'custom_export_uri' ) {
            wp_die( 'Invalid Secret for options use' );
            exit;
        }

        $var                 = $this->parent->options;
        $var['redux-backup'] = '1';
        if ( isset( $var['REDUX_imported'] ) ) {
            unset( $var['REDUX_imported'] );
        }

        echo json_encode( $var );

        die();
    }

    public function download_options() {
        if ( ! isset( $_GET['secret'] ) || $_GET['secret'] != 'custom_export_uri' ) {
            wp_die( 'Invalid Secret for options use' );
            exit;
        }

Then "field_import_export.php" line 74

    public function render() {

        $secret = 'custom_export_uri';

admin-ajax.php?action=redux_download_options-port&secret=custom_export_uri