Plugin Directory

Changeset 3014307


Ignore:
Timestamp:
12/26/2023 11:01:54 AM (2 years ago)
Author:
thangnv27
Message:

+ do_shortcode in excerpt
+ do_shortcode in title, description of yoast seo, rank math

Location:
wp-multitasking/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-multitasking/trunk/includes/shortcodes.php

    r3014283 r3014307  
    1515    add_filter('the_title', array(&$this, 'custom_the_title_output'));
    1616    add_filter('get_the_title', array(&$this, 'custom_get_the_title'));
     17    add_filter('the_excerpt', array(&$this, 'custom_excerpt_shortcode'));
     18    add_filter('get_the_excerpt', array(&$this, 'custom_excerpt_shortcode'));
     19    add_filter('rank_math/frontend/title', array(&$this, 'custom_seo_title'));
     20    add_filter('rank_math/frontend/description', array(&$this, 'custom_seo_description'));
     21    add_filter('wpseo_title', array(&$this, 'custom_seo_title') );
     22    add_filter('wpseo_twitter_title', array(&$this, 'custom_seo_title') );
     23    add_filter('wpseo_opengraph_title', array(&$this, 'custom_seo_title') );
     24    add_filter('wpseo_metadesc', array(&$this, 'custom_seo_description') );
     25    add_filter('wpseo_twitter_description', array(&$this, 'custom_seo_description') );
     26    add_filter('wpseo_opengraph_desc', array(&$this, 'custom_seo_description') );
    1727  }
    1828
     
    4454  <div class="wrap">
    4555    <h2>Shortcodes</h2>
    46     <table class="form-table" width="100%">
     56    <table class="form-table" style="max-width:800px">
    4757        <tr>
    4858            <td>
     
    5060            </td>
    5161            <td>
    52                 <input type="text" id="wpmt_shortcode_currentyear" value="[currentyear]" class="regular-text" disabled />
     62                <input type="text" id="wpmt_shortcode_currentyear" value="[currentyear]" data-value="[currentyear]" class="regular-text" />
    5363            </td>
    5464            <td>
     
    6171            </td>
    6272            <td>
    63                 <input type="text" id="wpmt_shortcode_currentmonth" value="[currentmonth]" class="regular-text" disabled />
     73                <input type="text" id="wpmt_shortcode_currentmonth" value="[currentmonth]" data-value="[currentmonth]" class="regular-text" />
    6474            </td>
    6575            <td>
     
    7282            </td>
    7383            <td>
    74                 <input type="text" id="wpmt_shortcode_currentmonth_text" value='[currentmonth format="F"]' class="regular-text" disabled />
     84                <input type="text" id="wpmt_shortcode_currentmonth_text" value='[currentmonth format="F"]' data-value='[currentmonth format="F"]' class="regular-text" />
    7585            </td>
    7686            <td>
     
    93103    $title = do_shortcode($title);
    94104    return $title;
     105  }
     106  /* ----------------------------------------------------------------------------------- */
     107  # Custom excerpt output
     108  /* ----------------------------------------------------------------------------------- */
     109  function custom_excerpt_shortcode() {
     110    global $post;
     111    $excerpt = $post->post_excerpt;
     112    if (!empty($excerpt)) {
     113      $excerpt = do_shortcode($excerpt);
     114    }
     115    $excerpt = strip_tags($excerpt);
     116    return $excerpt;
     117  }
     118  /* ----------------------------------------------------------------------------------- */
     119  # Custom rankmath/yoastseo output
     120  /* ----------------------------------------------------------------------------------- */
     121  function custom_seo_title( $title ) {
     122    return do_shortcode($title);
     123  }
     124  function custom_seo_description( $description ) {
     125    return do_shortcode($description);
    95126  }
    96127  /* ----------------------------------------------------------------------------------- */
     
    117148          this.select()
    118149        })
     150        $('input[id^=wpmt_shortcode_]').change(function(){
     151          var val = $(this).data('value');
     152          if ($(this).val() != val) {
     153            $(this).val(val);
     154          }
     155        })
    119156      })
    120157      /* ]]> */
  • wp-multitasking/trunk/readme.txt

    r3014283 r3014307  
    55Requires at least: 2.1.0
    66Tested up to: 6.4.2
    7 Stable tag: 0.1.9
     7Stable tag: 0.1.10
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8282== Changelog ==
    8383
     84= 0.1.10 =
     85* do_shortcode in excerpt
     86* do_shortcode in title, description of yoast seo, rank math
     87
    8488= 0.1.9 =
    8589* Fix bug: Function create_function() is deprecated
  • wp-multitasking/trunk/wp-multitasking.php

    r3014283 r3014307  
    44Plugin URI:  http://wordpress.org/plugins/wp-multitasking/
    55Description: This plugin is synthetic utility for your WordPress site: Shortcode, BBCode, AddQuickTag, Exit pop-up, Welcome pop-up, Remove base slug, SMTP, Classic Editor, Classic widgets...
    6 Version:     0.1.9
     6Version:     0.1.10
    77Author:      thangnv27
    88Author URI:  https://ngothang.me/
Note: See TracChangeset for help on using the changeset viewer.