Automatically populating a date parameter within a shortcode

you can generate shortcodes and launch them with this function : https://developer.wordpress.org/reference/functions/do_shortcode/ so you can do that in your plugin : add_shortcode(“MY_PLUGIN__forms_with_dates”, function ($atts, $content, $tag) { $atts = shortcode_atts([ “months” => 11, “id_form” => NULL, ], $atts, $tag); if (!isset($atts[“id_form”])) { return “shortcode $tag : the argument id_form is missing.”; } $shortcodes = “”; … Read more

shortcode causes broken paragraph tags

I worked around my problem by minifying my html in my plugin. So I made a function called wl_minify_html(String $htmlString) (which I found some another stack overflow answer somewhere). So here’s what my plugin looks like now: <?php function wl_minify_html($htmlString) { $search = array( ‘/\>(\s)+\</s’, // strip white space between tags ‘/\>[^\S ]+/s’, // strip … Read more

Which PlugIns have a [subpages] shortcode? [closed]

I found “Subpage Lister” and it solved the problem. If there are others that use the exact same [subpages] code, then I would like to know. https://wordpress.com/plugins/subpage-view Now, I need to find one that supports the [previous_page] [next_page] shortcodes. It’s possible I wrote custom shortcodes and lost the code or forgot how to do them. … Read more

How to get next day date of a specific day

Use the parameters of the shortcode with lowercase: [recurring_event short=”Wed” full=”wednesday”] Try to follow the next code: // NAV: Custom Code function wpcoder_recurring_event_att( $atts ){ $date=””; $default = array( ‘short’ => ‘Sun’, ‘full’ => ‘sunday’ ); $eventday = shortcode_atts($default, $atts); date_default_timezone_set(‘US/Eastern’); if(date(‘D’) == $eventday[“short”]) { echo date(‘F d, Y’); } else { // Create a … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)