Forum Replies Created

Viewing 15 replies - 106 through 120 (of 5,192 total)
  • I typically lean towards grouping all similar items into an array. That way, you make a single db call; instead of 15 separate calls.

    In this case; all options (regardless if they are similar or not) are going to be saved to the post meta. You don’t have to worry about serialization or unserialization; because the update_post_meta() and get_post_meta() functions will handle the serializing for you.

    Just my $0.02 🙂

    Plugin Author Josh

    (@josh401)

    Hello, and thank you.

    I just tested this; and it seems to be working fine. What exactly is not working for you?

    Plugin Author Josh

    (@josh401)

    Totally Okay. Just trying to get a grip on this new forum structure 🙂

    Hmmm.. I’m at a loss. You are both on the same site; both administrators with the same privileges? What happens if you log in as him (from your computer); do you see the button or not?

    Forum: Plugins
    In reply to: [WP Edit] Can't Update
    Plugin Author Josh

    (@josh401)

    Just checking back on any progress here.

    Plugin Author Josh

    (@josh401)

    Just checking back on any progress here.

    Plugin Author Josh

    (@josh401)

    Just checking back on any updates here.

    Forum: Plugins
    In reply to: [WP Edit] php strict notice
    Plugin Author Josh

    (@josh401)

    You totally mentioned that in your first post. My apologies; I believe I was a bit brain-dead when I posted my reply.

    Yes, LOVE that plugin. Why have I not been using it all along?!

    Thanks again.

    NOTE that the old wp_get_sites() function returned an array of sites, with the details nested in another array.

    The new get_sites() function returns the same array, but the details are nested inside an object (instead of an array).

    This caused me to have to change my code in a foreach loop I ran against the returned results.

    OLD:

    
    $sites = wp_get_sites();
    $site_ids = array();
    
    foreach ($sites as $site ) {
    
        $site_ids[] = $site['blog_id'];
    }
    

    NEW:

    
    $sites = get_sites();
    $site_ids = array();
    
    foreach( $sites as $site ) {
    
      $site_ids[] = $site->blog_id;
    }
    

    Hope this helps!

    • This reply was modified 9 years, 11 months ago by Josh.
    Forum: Plugins
    In reply to: [WP Edit] php strict notice
    Plugin Author Josh

    (@josh401)

    Okay, after some extensive digging… I found the trac ticket here:
    https://core.trac.wordpress.org/ticket/29204

    It seems it is going to be fixed in version 4.7 of WordPress. Quickly, it has to do with “SimplePie” and how RSS feeds are pulled into dashboard widgets.

    As a workaround; you may go to the WP Edit Pro settings page (User tab); and check the option to disable the dashboard widget.

    Again, thank you for your time!

    Forum: Plugins
    In reply to: [WP Edit] php strict notice
    Plugin Author Josh

    (@josh401)

    Hi Derek,

    Sorry for my delay here. I’m getting ready to push a new version of WP Edit, and was wondering what tool you used to get that error? I’d like to use the same tool and ensure the issue is fixed entirely.

    Thank you.

    Plugin Author Josh

    (@josh401)

    Hello,

    Yes, I understand the search and replace only currently works in the visual mode. I am in the process of updating my premium plugins; and when I finish those, I will do my best to get this feature added to WP Edit.

    Thank you very much for the request.

    Plugin Author Josh

    (@josh401)

    If he goes to the WP Edit admin settings page; does he see the button for column shortcodes in the available buttons? Do you both see the checkbox is checked to enable column shortcodes?

    Forum: Plugins
    In reply to: [WP Edit] Can't Update
    Plugin Author Josh

    (@josh401)

    Hello,

    If you are referring to the Pro version of WP Edit; please Open a Ticket on our support site.

    Thank you.

    Plugin Author Josh

    (@josh401)

    Hello @paulalexandru,

    Can you please let me know if this is the free version or pro version of WP Edit? The original poster was asking about the pro version; which I cannot support on this forum. If it is the free version; please feel free to open a new ticket so I can deal with you more directly.

    Thank you.

    1) What parameter i have to set on “url:” in the latest code posted to make accessible the file click_counter.php

    In this case; you would need to use the full url to the click_counter.php file. (https://mysite.com/click_counter.php for example)

    2) how can I build the code that runs the counter as I described at the beginning of post (click_counter.php code)

    This is where I believe your approach may be inadequate. What I would do, is add the javascript so when a user clicks the button (in addition to showing the div), it also performs an AJAX rquest.

    Then, in your functions.php file, you add the handler for processing the server side request. Here is what I would do:

    1) Set javascript click function to show div.
    2) Add AJAX call.
    3) In functions.php, set an option you can use to keep the count.
    4) In the AJAX handler in your functions.php, you will a) get the option, b) increment by one, c) update the option with the new count.

    This way, every time the button is clicked, it executes the ajax (calling the php handler) and updates the count.

    Then, in the page where you want to use the count, simply call it from the option you created.

    Hope this helps!

Viewing 15 replies - 106 through 120 (of 5,192 total)