Forum Replies Created

Viewing 13 replies - 16 through 28 (of 28 total)
  • Thread Starter dbrabyn

    (@dbrabyn)

    That makes sense.

    I checked the use of get_current_screen with an options page but for some reason this isn’t working.

    function get_icons( $results ) {
      $screen = get_current_screen();
    	if (strpos($screen->id, "my-slug") == true) {
        $results = array(
          ...
        );
    	}
      return $results;
    }
    add_filter( 'ACFFA_get_icons', 'get_icons', 10, 1 );

    Thanks so much for your help.

    • This reply was modified 4 years, 2 months ago by dbrabyn.
    Thread Starter dbrabyn

    (@dbrabyn)

    Not the acf/get_options_page hook?

    I am really bad at all this but isn’t that what is suggested here? https://www.acf-extended.com/features/modules/dynamic-options-pages

    If it is, I unfortunately don’t know how to put this all together.

    Thread Starter dbrabyn

    (@dbrabyn)

    Yes, exactly, with the get_icons filter.

    I can’t use the plugin settings as I need to roll out this as a finished solution for my client, i.e. I can’t ask them to pick a set for in a given option page. It has to be ready to go.

    So I need something like if_is_optionpage('slug') {}

    Thanks.

    Thread Starter dbrabyn

    (@dbrabyn)

    Here is te PHO dump for the sticky Options page:

    if( function_exists('acf_add_options_page') ):
    
    acf_add_options_page(array(
    	'page_title' => 'Gear',
    	'menu_title' => 'Gear',
    	'menu_slug' => 'gear',
    	'capability' => 'edit_posts',
    	'position' => '49',
    	'parent_slug' => '',
    	'icon_url' => 'dashicons-performance',
    	'redirect' => true,
    	'post_id' => 'options',
    	'autoload' => false,
    	'update_button' => 'Update',
    	'updated_message' => 'Gear Updated',
    ));
    
    endif;

    And the value for Option 173 acfe:

    Array
    (
        [version] => 0.8.7
        [modules] => Array
            (
                [author] => Array
                    (
                        [active] => 1
                    )
    
                [dev] => Array
                    (
                        [active] => 
                    )
    
                [meta] => Array
                    (
                        [active] => 
                    )
    
                [option] => Array
                    (
                        [active] => 1
                    )
    
                [ui] => Array
                    (
                        [active] => 1
                    )
    
                [dynamic_block_type] => Array
                    (
                        [active] => 1
                        [settings] => Array
                            (
                            )
    
                        [data] => Array
                            (
                            )
    
                    )
    
                [dynamic_form] => Array
                    (
                        [active] => 1
                        [settings] => Array
                            (
                            )
    
                        [data] => Array
                            (
                            )
    
                    )
    
                [dynamic_option] => Array
                    (
                        [active] => 1
                        [settings] => Array
                            (
                            )
    
                        [data] => Array
                            (
                                [gear] => Array
                                    (
                                        [page_title] => Gear
                                        [menu_title] => Gear
                                        [menu_slug] => gear
                                        [capability] => edit_posts
                                        [position] => 49
                                        [parent_slug] => 
                                        [icon_url] => dashicons-performance
                                        [redirect] => 1
                                        [post_id] => options
                                        [autoload] => 
                                        [update_button] => Update
                                        [updated_message] => Gear Updated
                                    )
    
                                [image-gallery] => Array
                                    (
                                        [page_title] => Image Gallery
                                        [menu_title] => Image Gallery
                                        [menu_slug] => image-gallery
                                        [capability] => edit_posts
                                        [position] => 1.8
                                        [parent_slug] => 
                                        [icon_url] => dashicons-images-alt2
                                        [redirect] => 1
                                        [post_id] => imagegallery
                                        [autoload] => 
                                        [update_button] => Update
                                        [updated_message] => Image Gallery Updated
                                    )
    
                                [intro] => Array
                                    (
                                        [page_title] => Intro
                                        [menu_title] => Intro
                                        [menu_slug] => intro
                                        [capability] => edit_posts
                                        [position] => 1.2
                                        [parent_slug] => 
                                        [icon_url] => dashicons-admin-users
                                        [redirect] => 1
                                        [post_id] => intro
                                        [autoload] => 
                                        [update_button] => Update
                                        [updated_message] => Intro Updated
                                    )
    
                                [press] => Array
                                    (
                                        [page_title] => Press
                                        [menu_title] => Press
                                        [menu_slug] => press
                                        [capability] => edit_posts
                                        [position] => 1.7
                                        [parent_slug] => 
                                        [icon_url] => dashicons-media-document
                                        [redirect] => 1
                                        [post_id] => press
                                        [autoload] => 
                                        [update_button] => Update
                                        [updated_message] => Press Updated
                                    )
    
                                [profile] => Array
                                    (
                                        [page_title] => Profile
                                        [menu_title] => Profile
                                        [menu_slug] => profile
                                        [capability] => edit_posts
                                        [position] => 1.3
                                        [parent_slug] => 
                                        [icon_url] => dashicons-search
                                        [redirect] => 1
                                        [post_id] => profile
                                        [autoload] => 
                                        [update_button] => Update
                                        [updated_message] => Profile Updated
                                    )
    
                                [race-calendar] => Array
                                    (
                                        [page_title] => Race Calendar
                                        [menu_title] => Race Calendar
                                        [menu_slug] => race-calendar
                                        [capability] => edit_posts
                                        [position] => 1.6
                                        [parent_slug] => 
                                        [icon_url] => dashicons-calendar-alt
                                        [redirect] => 1
                                        [post_id] => racecalendar
                                        [autoload] => 
                                        [update_button] => Update
                                        [updated_message] => Race Celandar Updated
                                    )
    
                                [results] => Array
                                    (
                                        [page_title] => Results
                                        [menu_title] => Results
                                        [menu_slug] => results
                                        [capability] => edit_posts
                                        [position] => 1.4
                                        [parent_slug] => 
                                        [icon_url] => dashicons-awards
                                        [redirect] => 1
                                        [post_id] => results
                                        [autoload] => 
                                        [update_button] => Update
                                        [updated_message] => Results Updated
                                    )
    
                                [site-options] => Array
                                    (
                                        [page_title] => Site Options
                                        [menu_title] => Site Options
                                        [menu_slug] => site-options
                                        [capability] => edit_posts
                                        [position] => 1.1
                                        [parent_slug] => 
                                        [icon_url] => dashicons-admin-generic
                                        [redirect] => 1
                                        [post_id] => siteoptions
                                        [autoload] => 
                                        [update_button] => Update
                                        [updated_message] => Site Options Updated
                                    )
    
                                [sponsors] => Array
                                    (
                                        [page_title] => Sponsors
                                        [menu_title] => Sponsors
                                        [menu_slug] => sponsors
                                        [capability] => edit_posts
                                        [position] => 1.9
                                        [parent_slug] => 
                                        [icon_url] => dashicons-thumbs-up
                                        [redirect] => 1
                                        [post_id] => sponsors
                                        [autoload] => 
                                        [update_button] => Update
                                        [updated_message] => Sponsors Updated
                                    )
    
                                [teams] => Array
                                    (
                                        [page_title] => Teams
                                        [menu_title] => Teams
                                        [menu_slug] => teams
                                        [capability] => edit_posts
                                        [position] => 1.5
                                        [parent_slug] => 
                                        [icon_url] => dashicons-groups
                                        [redirect] => 1
                                        [post_id] => teams
                                        [autoload] => 
                                        [update_button] => Update
                                        [updated_message] => Teams Updated
                                    )
    
                            )
    
                    )
    
                [dynamic_post_type] => Array
                    (
                        [active] => 1
                        [settings] => Array
                            (
                            )
    
                        [data] => Array
                            (
                            )
    
                    )
    
                [dynamic_taxonomy] => Array
                    (
                        [active] => 1
                        [settings] => Array
                            (
                            )
    
                        [data] => Array
                            (
                            )
    
                    )
    
            )
    
        [upgrades] => Array
            (
            )
    
    )
    Thread Starter dbrabyn

    (@dbrabyn)

    PHP 7.4.1
    Web server: Nginx
    No cache-ing that I know of. Just now I stopped and re=started the site in Local to see if that flushed anything. Nope.

    Thread Starter dbrabyn

    (@dbrabyn)

    Good to hear.

    The Trash option is also unappealing because normally WP deletes content in the trash after 30 days.

    Thread Starter dbrabyn

    (@dbrabyn)

    @imagy Thank Imagy.

    @hwk-fr I have the fastest version of ACF, ACFE and WP. I still see that Options page, both in the menu and in the option value (BTW there is a typo in the Edit Option page: “serilized”) despite deleting it.

    This issue occurs on a local WP install using Local by FlyWheel. On the server version it disappeared as expected when I deleted it. Hope this tells you something.

    Thanks.

    dbrabyn

    (@dbrabyn)

    WP Discuz, if I were you I would use the term first-time commenters instead of first commenters to describe this tool in the UI. The later means first person to comment.

    Same problem in the French translation: “Rediriger le premier commentateur vers”.

    Would you mind spelling out the snippet?

    Here.

    Another support thread said something about old php versions. Could that be it?

    Same here on a French hosted server (OVH). No js error.

    Not working for me inside an is_front_page conditional statement.

    https://www.gstatic.com/recaptcha/api2/r20160208154954/recaptcha__en.js is loading which it shouldn’t do anyway (no form of any kind).

    Any help much appreciated.

    I’m having the same problem with my WordPress 2.8.1 (& now 2.8.2) blog on a shared Godaddy server.

    If I am reading Firebug correctly there is a 5sec or so delay between connecting to the database and the first download.

    If never had problems with any previous WP installation on similar GoDaddy accounts. I have tried the Super-Cache plugin. No difference.

    I would appreciate any help from anyone that has solved this or from GoDaddy themselves. I will not however switch to a dedicated server, nor will I teach myself mysql in order to optimize the database (their sole suggestion so far).

    Thanks.

    David
    https://www.digitaltechparis.com/

Viewing 13 replies - 16 through 28 (of 28 total)