Plugin Directory

Changeset 2577176


Ignore:
Timestamp:
08/03/2021 01:00:20 PM (5 years ago)
Author:
eclouds
Message:

Add hook read parameters when posting status changes

Location:
detabess/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • detabess/trunk/detabess-functions.php

    r2576333 r2577176  
    11111111 */
    11121112function dtbs_post_counter_update( $new_status, $old_status, $post ) {
    1113     $dtbs_list = dtbs_get_list();
    1114     foreach ( $dtbs_list as $no => $val ) {
    1115         dtbs_reg_count_update( $val['cd_id'] );
     1113    if ( $new_status != $old_status ) {
     1114        $dtbs_list = dtbs_get_list();
     1115        foreach ( $dtbs_list as $no => $val ) {
     1116            dtbs_reg_count_update( $val['cd_id'] );
     1117        }
    11161118    }
    11171119    return;
    11181120}
    11191121
    1120 add_action( 'transition_post_status',   'dtbs_post_counter_update');
     1122add_action( 'transition_post_status', 'dtbs_post_counter_update', 10, 3 );
  • detabess/trunk/readme.txt

    r2576333 r2577176  
    44Requires at least: 4.7.0
    55Tested up to: 5.8
    6 Stable tag: 1.0
     6Stable tag: 1.0.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    117117== Upgrade Notice ==
    118118
     119= 1.0.1 =
     120投稿ステータスが変更された際の、フック読み出しのパラメータを追加
     121Add hook read parameters when posting status changes
     122
    119123= 1.0 =
    120124Initial Release
Note: See TracChangeset for help on using the changeset viewer.