Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Sam

    (@figaroo)

    The pix_thickbox.js script is the cause of the problem. All this script does is overwrite the already defined tb_remove function, but it does so forgetting the removal of the modal-open class on the body element. Why is this file necessary? WP already defines this tb_remove function. I commented this file out and things are working better now. Scroll will resume back to normal after closing the modal window.

    Is there a github page for this project so that way I can give you pull-requests for these fixes that I’m doing?

    Thread Starter Sam

    (@figaroo)

    I found that I can include wp-admin/admin.php for all the wordpress functions. But my uploads.php file is located in a theme directory (/wp-content/themes/mytheme/functions/admin/uploads.php), and because of this WordPress logs me out of admin whenever I visit uploads.php. Weird. The login system for WordPress is probably limited to only wp-admin?

    It would be a bad thing if I just move my uploads.php file to the wp-admin directory because then that’s modifying the standard WordPress install. I’d much rather keep all my files in the theme directory (wp-content).

    WordPress obviously include my theme files for every page visit, including pages in the admin area. For example, WordPress includes functions.php on both the admin area and the site. Though, before WordPress includes functions.php it includes some of it’s API. I need to do this on my own in uploads.php (my custom file). I need uploads.php to include the right files for authentication. I need it also to include the right files for wp_handle_upload and get_option.

    I’ll keep looking into the WP source code till I get a reply. ??

    Thread Starter Sam

    (@figaroo)

    Actually, from the looks of it, PHP stores widget options in the wp_options table in the database. All I need to do is this:

    $options = get_option('widget_mywidgetname');
    $options[$_POST['instance_number']]['someoption'] = 'new value';
    update_options('widget_mywidgetname', $options);

    I just need to know how to include these WordPress functions into a custom file.

Viewing 3 replies - 1 through 3 (of 3 total)