Plugin Directory

Changeset 3089462


Ignore:
Timestamp:
05/20/2024 01:32:14 PM (19 months ago)
Author:
viitorcloudvc
Message:

Update deprecated function and tested with latest WordPress version

Location:
custom-product-list-table/trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • custom-product-list-table/trunk/custom-product-list-table.php

    r3025747 r3089462  
    55 * Plugin URI: https://viitorcloud.com/blog/
    66 * Description: This plugin handles Product's Add, Edit, and Delete functionalities with Category and product's status.
    7  * Version: 2.0.0
     7 * Version: 3.0.0
    88 * Author: Mitali, Viitorcloud
    99 * Author URI: https://viitorcloud.com/
    1010 *
    1111 * @package Custom_Product_List_Table
    12  * @since 1.0.0
     12 * @since 3.0.0
    1313 */
    1414
     
    1717 *
    1818 * @package   Category List Table
    19  * @since 1.0.0
     19 * @since 3.0.0
    2020 */
    2121
     
    5757 *
    5858 * @package  Category List Table
    59  * @since 1.0.0
     59 * @since 3.0.0
    6060 */
    6161load_plugin_textdomain( 'wwclt', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
     
    6767 *
    6868 * @package  Category List Table
    69  * @since 1.0.0
     69 * @since 3.0.0
    7070 */
    7171register_activation_hook( __FILE__, 'ww_clt_install' );
     
    7777 * It registers a custom post type and flushes rewrite rules.
    7878 *
    79  * @since 1.0.0
     79 * @since 3.0.0
    8080 */
    8181function ww_clt_install() {
     
    9898 *
    9999 * @package  Category List Table
    100  * @since 1.0.0
     100 * @since 3.0.0
    101101 */
    102102function ww_clt_uninstall() {
     
    114114 *
    115115 * @package  Category List Table
    116  * @since 1.0.0
     116 * @since 3.0.0
    117117 */
    118118global $ww_clt_model, $ww_clt_scripts, $ww_clt_admin;
  • custom-product-list-table/trunk/includes/admin/class-ww-clt-admin.php

    r3025747 r3089462  
    1212 *
    1313 * @packageCategory List Table
    14  * @since 1.0.0
     14 * @since 3.0.0
    1515 */
    1616class Ww_Clt_Admin_Pages {
     
    3232     *
    3333     * @packageCategory List Table
    34      * @since 1.0.0
     34     * @since 3.0.0
    3535     */
    3636    public function ww_clt_admin_menu() {
     
    5555     *
    5656     * @packageCategory List Table
    57      * @since 1.0.0
     57     * @since 3.0.0
    5858     */
    5959    public function ww_clt_add_submenu_list_table_page() {
     
    6868     *
    6969     * @packageCategory List Table
    70      * @since 1.0.0
     70     * @since 3.0.0
    7171     */
    7272    public function ww_clt_add_submenu_page() {
     
    8282     *
    8383     * @packageCategory List Table
    84      * @since 1.0.0
     84     * @since 3.0.0
    8585     */
    8686    public function ww_clt_admin_init() {
     
    9494     *
    9595     * @packageCategory List Table
    96      * @since 1.0.0
     96     * @since 3.0.0
    9797     */
    9898    public function ww_clt_admin_bulk_delete() {
     
    138138     *
    139139     * @packageCategory List Table
    140      * @since 1.0.0
     140     * @since 3.0.0
    141141     */
    142142    public function ww_clt_admin_change_status() {
     
    168168     *
    169169     * @packageCategory List Table
    170      * @since 1.0.0
     170     * @since 3.0.0
    171171     */
    172172    public function ww_clt_category_search( $where ) {
     
    189189     *
    190190     * @packageCategory List Table
    191      * @since 1.0.0
     191     * @since 3.0.0
    192192     */
    193193    public function add_hooks() {
  • custom-product-list-table/trunk/includes/admin/forms/ww-clt-add-edit-product.php

    r3025747 r3089462  
    1111 *
    1212 * @packageCategory List Table
    13  * @since 1.0.0
     13 * @since 3.0.0
    1414 */
    1515
     
    7979
    8080    <div class="wrap">
    81         <?php echo screen_icon( 'options-general' ); ?>
     81        <span class="dashicons dashicons-admin-generic" style="font-size: 32px; margin-right: 10px;"></span>
    8282   
    83         <h2> <?php echo __( $product_lable, 'wwclt' ); ?>   
     83        <h2> <?php echo __( $product_lable, 'wwclt' ); ?>
    8484            <a class="add-new-h2" href="admin.php?page=ww_clt_products"><?php echo __( 'Back to List', 'wwclt' ); ?></a>
    8585        </h2>
     
    8989        <div id="ww-clt-product" class="post-box-container">
    9090       
    91             <div class="metabox-holder">   
     91            <div class="metabox-holder">
    9292       
    9393                <div class="meta-box-sortables ui-sortable">
    9494       
    95                     <div id="product" class="postbox"> 
     95                    <div id="product" class="postbox">
    9696       
    9797                        <div class="handlediv" title="<?php echo __( 'Click to toggle', 'wwclt' ); ?>"><br />
    9898                        </div>
    9999       
    100                         <!-- product box title -->             
    101                         <h3 class="hndle">             
    102                             <span style="vertical-align: top;"><?php echo __( $product_lable, 'wwclt' ); ?></span>             
     100                        <!-- product box title -->
     101                        <h3 class="hndle">
     102                            <span style="vertical-align: top;"><?php echo __( $product_lable, 'wwclt' ); ?></span>
    103103                        </h3>
    104104       
     
    112112                                </div>
    113113                               
    114                                 <table class="form-table ww-clt-product-box"> 
     114                                <table class="form-table ww-clt-product-box">
    115115                                    <tbody>
    116116                                                       
     
    132132                                                ?>
    133133                                            </td>
    134                                         </tr>                                     
     134                                        </tr>
    135135                               
    136136                                        <tr>
     
    141141                                                </label>
    142142                                            </th>
    143                                             <td  width="35%">
     143                                            <td class="td-width">
    144144                                                <textarea id="ww_clt_product_desc" name="ww_clt_product_desc" rows="4" class="large-text"><?php echo $model->ww_clt_escape_attr( $data['ww_clt_product_desc'] ); ?></textarea><br />
    145145                                                <span class="description"><?php echo __( 'Enter the product description.', 'wwclt' ); ?></span>
     
    152152                                                ?>
    153153                                            </td>
    154                                         </tr>                                       
     154                                        </tr>
    155155                               
    156156                                        <tr>
     
    160160                                                </label>
    161161                                            </th>
    162                                             <td  width="35%">
     162                                            <td class="td-width">
    163163                                                <select id="ww_clt_product_status" name="ww_clt_product_status">
    164164                                                    <?php
     
    175175                                                <span class="description"><?php echo __( 'Select the product category.', 'wwclt' ); ?></span>
    176176                                            </td>
    177                                         </tr>                                       
     177                                        </tr>
    178178                               
    179179                                        <tr>
     
    183183                                                </label>
    184184                                            </th>
    185                                             <td  width="35%">
     185                                            <td class="td-width">
    186186                                                <select id="ww_clt_product_cat" name="ww_clt_product_cat">
    187187                                                    <span class="ww-clt-require"> * </span>
     
    226226                                                </label>
    227227                                            </th>
    228                                             <td class="ww-clt-avail-chk" width="35%">
     228                                            <td class="ww-clt-avail-chk td-width">
    229229                                                <input type="checkbox" name="ww_clt_product_avail[]" value="Client"<?php echo checked( in_array( 'Client', $data['ww_clt_product_avail'] ), true, false ); ?>/>
    230230                                                <label><?php echo __( ' Client', 'wwclt' ); ?></label>
     
    242242                                                </label>
    243243                                            </th>
    244                                             <td width="35%">
     244                                            <td class="td-width">
    245245                                                <input type="radio" id="ww_clt_featured_product" name="ww_clt_featured_product" value="1"<?php echo checked( '1', $data['ww_clt_featured_product'], false ); ?>/><?php echo __( 'Yes', 'wwclt' ); ?>
    246246                                                <input type="radio" id="ww_clt_featured_product" name="ww_clt_featured_product" value="0"<?php echo checked( '0', $data['ww_clt_featured_product'], false ); ?>/><?php echo __( 'No', 'wwclt' ); ?>
  • custom-product-list-table/trunk/includes/admin/forms/ww-clt-product-list.php

    r3025747 r3089462  
    1212 *
    1313 * @packageCategory List Table
    14  * @since 1.0.0
     14 * @since 3.0.0
    1515 */
    1616
     
    4545     *
    4646     * @packageCategory List Table
    47      * @since 1.0.0
     47     * @since 3.0.0
    4848     */
    4949    public function display_products() {
     
    9696     *
    9797     * @packageCategory List Table
    98      * @since 1.0.0
     98     * @since 3.0.0
    9999     */
    100100    public function column_default( $item, $column_name ) {
     
    122122     *
    123123     * @packageCategory List Table
    124      * @since 1.0.0
     124     * @since 3.0.0
    125125     */
    126126    public function column_post_title( $item ) {
     
    186186     *
    187187     * @packageCategory List Table
    188      * @since 1.0.0
     188     * @since 3.0.0
    189189     */
    190190    public function get_columns() {
     
    207207     *
    208208     * @packageCategory List Table
    209      * @since 1.0.0
     209     * @since 3.0.0
    210210     */
    211211    public function get_sortable_columns() {
     
    231231     *
    232232     * @packageCategory List Table
    233      * @since 1.0.0
     233     * @since 3.0.0
    234234     */
    235235    public function get_bulk_actions() {
     
    340340     * Generates content for a single row of the table
    341341     *
    342      * @since 3.1.0
     342     * @since 3.0.0
    343343     * @access protected
    344344     *
     
    499499<div class="wrap">
    500500   
    501     <?php echo screen_icon( 'options-general' ); ?>
     501<span class="dashicons dashicons-admin-generic" style="font-size: 32px; margin-right: 10px;"></span>
    502502   
    503503    <h2>
  • custom-product-list-table/trunk/includes/admin/forms/ww-clt-product-save.php

    r3025747 r3089462  
    1212 *
    1313 * @packageCategory List Table
    14  * @since 1.0.0
     14 * @since 3.0.0
    1515 */
    1616    global $errmsg, $wpdb, $user_ID, $ww_clt_model, $error;
  • custom-product-list-table/trunk/includes/class-ww-clt-model.php

    r3025747 r3089462  
    1717     *
    1818     * @packageCategory List Table
    19      * @since 1.0.0
     19     * @since 3.0.0
    2020     */
    2121    public function ww_clt_get_products( $args = array() ) {
     
    6666     *
    6767     * @packageCategory List Table
    68      * @since 1.0.0
     68     * @since 3.0.0
    6969     */
    7070    public function ww_clt_object_to_array( $result ) {
     
    8787     *
    8888     * @packageCategory List Table
    89      * @since 1.0.0
     89     * @since 3.0.0
    9090     */
    9191    public function ww_clt_escape_attr( $data ) {
     
    9999     *
    100100     * @packageCategory List Table
    101      * @since 1.0.0
     101     * @since 3.0.0
    102102     * @param mixed $data    Data to be processed. Can be an array or a string.
    103103     * @param bool  $flag    Optional. Flag to determine further processing. Default is false.
     
    125125     *
    126126     * @packageCategory List Table
    127      * @since 1.0.0
     127     * @since 3.0.0
    128128     * @param mixed $data Data to be sanitized. Can be an array or a string.
    129129     * @return mixed Sanitized data.
     
    149149     *
    150150     * @packageCategory List Table
    151      * @since 1.0.0
     151     * @since 3.0.0
    152152     * @param array $args {
    153153     *     Optional. Array of arguments.
     
    170170     *
    171171     * @packageCategory List Table
    172      * @since 1.0.0
     172     * @since 3.0.0
    173173     */
    174174    public function ww_clt_text_from_value_status( $value ) {
  • custom-product-list-table/trunk/includes/class-ww-clt-scripts.php

    r3025747 r3089462  
    1313 *
    1414 * @packageCategory List Table
    15  * @since 1.0.0
     15 * @since 3.0.0
    1616 */
    1717class Ww_Clt_Scripts {
     
    2626     *
    2727     * @packageCategory List Table
    28      * @since 1.0.0
     28     * @since 3.0.0
    2929     */
    3030    public function ww_clt_admin_print_styles() {
     
    4141     *
    4242     * @packageCategory List Table
    43      * @since 1.0.0
     43     * @since 3.0.0
    4444     */
    4545    public function ww_clt_add_product_page_load_scripts() {
     
    6262     *
    6363     * @packageCategory List Table
    64      * @since 1.0.0
     64     * @since 3.0.0
    6565     */
    6666    public function ww_clt_page_print_scripts( $hook_suffix ) {
     
    8484     *
    8585     * @packageCategory List Table
    86      * @since 1.0.0
     86     * @since 3.0.0
    8787     */
    8888    public function ww_select_category_submenu() {
     
    137137     *
    138138     * @packageCategory List Table
    139      * @since 1.0.0
     139     * @since 3.0.0
    140140     */
    141141    public function add_hooks() {
  • custom-product-list-table/trunk/includes/css/ww-clt-admin.css

    r1760074 r3089462  
    1919    background-color : #FFF0FF;
    2020}
     21.td-width {
     22    width: 35%;
     23}
  • custom-product-list-table/trunk/includes/ww-clt-post-types.php

    r3025747 r3089462  
    1515 *
    1616 * @package Category List Table
    17  * @since 1.0.0
     17 * @since 3.0.0
    1818 */
    1919function ww_clt_reg_create_post_type() {
     
    5757 *
    5858 * @packageCategory List Table
    59  * @since 1.0.0
     59 * @since 3.0.0
    6060 */
    6161function ww_clt_reg_taxonomy() {
  • custom-product-list-table/trunk/readme.txt

    r3025747 r3089462  
    44Tags: Product, List Table, Product category, without woocomemrce, Product List, Custom product Table
    55Requires at least: 3.8
    6 Tested up to: 6.4.2
     6Tested up to: 6.5.3
    77Requires PHP: 5.2.4
    88Stable tag: 3.2.0
  • custom-product-list-table/trunk/uninstall.php

    r3025747 r3089462  
    55 *
    66 * @package Custom_Product_List_Table
    7  * @since 1.0.0
     7 * @since 3.0.0
    88 */
    99
     
    2020 *
    2121 * @packageCategory List Table
    22  * @since 1.0.0
     22 * @since 3.0.0
    2323 */
    2424
Note: See TracChangeset for help on using the changeset viewer.