How to fix issues with Media Uploader with Minimatica in WordPress 3.5

Viewing 15 posts - 16 through 30 (of 32 total)
  • #13568
    GreenGriot
    Participant

    Hi All,

    Has anyone been able to get this to work in the “functions.php” of a child Theme?
    I’m unsure of the correct syntax.
    I started with this:

    but it didn’t work.
    It works when I change the lines in the “functions.php” original theme but not in the child. Even when I use an exact copy of the entire original file (with Daniel’s changes of course) as the child theme’s functions file it still doesn’t work.

    Any Help would be appreciated.

    Cheers!

    #13569
    GreenGriot
    Participant

    Sorry my Pastebin code disappeared.

    http://pastebin.com/embed_js.php?i=atmYxmNZ
    jmw

    #13644
    GreenGriot
    Participant

    Found it!

    Thanks to a WP forum post found here:

    http://wordpress.org/support/topic/problem-redeclaring-funtion-in-functionsphp-in-a-child-theme?replies=7

    For the sake of future beginners like myself the answer seems to be use of the “add_” and “remove_” function references (or “hooks) in the child ‘functions.php’ file. In this case the “add_filter”/”remove_filter” and “add_action”/”remove_action”

    When I added the following code to the functions.php of my child theme the override worked perfectly (so far).

    <?php

    //code to override theme function fixing Image loader problem of 3.5 update

    add_action('wp_enqueue_scripts', 'minimatica_register_styles');
    add_filter( 'ext2type', 'minimatica_file_types' );

    remove_action('init', 'minimatica_register_styles');
    remove_filter( 'ext2type', 'minimatica_mime_types' );

    //

    http://pastebin.com/RKNpytxB

    More about these hooks and others can be found here in the codex:
    http://codex.wordpress.org/Function_Reference/remove_filter

    http://codex.wordpress.org/Function_Reference/add_filter

    Hope This Helps!

    jmw

    #13683
    ileana
    Participant

    I registered here just to say Thank YOU!
    It works like a charm. Thank you so much!

    #13684
    GreenGriot
    Participant

    Glad to help.

    jmw

    #13760
    begemotobegemotov
    Participant

    hi guys,
    im using minimatica and have the same problem, i read the whole theme, but i can’t find where is “function.php” can anyone show to me?

    #13761
    GreenGriot
    Participant

    B:

    Functions.php is a file in the themes folder. From the dashboard you will find it when you go to Appearance -> Editor on the far right you will see it listed as “Theme Functions” (functions.php).

    Hope this helps

    Cheers!

    jmw

    #13763
    begemotobegemotov
    Participant

    hey, now i have the same problem like donindovinati
    Parse error: syntax error, unexpected T_STRING in /www/begemoto.eu/www/root/wp-content/themes/minimatica/functions.php on line 227

    now i can’t do anything with the dashboard… can someone send me the whole code on the mail? – [email protected]

    #13764
    begemotobegemotov
    Participant

    i can’t get in editor now… i think that i fucked up my all blog.. am I ?

    #13765
    GreenGriot
    Participant

    If you can, try activating your default theme (twenty twelve or twenty eleven) and rebuild from there.
    Do a fresh install of Minimatica and see if that still works.
    Look into creating a child theme for your customizations if you can.

    The WordPress forum may have the answer to the Parse error

    Cheers!
    jmw

    #13766
    begemotobegemotov
    Participant

    if i press everyone of the buttons on the dashboard there is this error Parse error: syntax error, unexpected T_STRING in /www/begemoto.eu/www/root/wp-content/themes/minimatica/functions.php on line 227

    i can’t use the menus and can’t do nothing

    some solution on this problem ?

    #13779
    jdimo
    Participant

    Great fix!
    I had installed this theme at one hosting company and there were no problems. When I migrated it to a different hosting company the Ädd Media”functionality vanished. This edit did the trick. many thanks!

    #13916
    mchivis
    Participant

    Thank you!

    #14085
    [email protected]
    Participant

    Thank you for the hint!
    Leo

    #14184
    shawnhoefer
    Participant

    Worked as advertised, and I must say that this type of pre-emptive support for a free theme is astounding. You are to be commended!

Viewing 15 posts - 16 through 30 (of 32 total)

You must be logged in to reply to this topic.