Plugin Directory

Changeset 3088355


Ignore:
Timestamp:
05/17/2024 01:29:52 PM (19 months ago)
Author:
viitorcloudvc
Message:

Tested plugin with the latest WordPress version

Location:
custom-post-type-layout/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • custom-post-type-layout/trunk/custom-post-layout.php

    r2576389 r3088355  
    44 * Plugin URI: https://viitorcloud.com/
    55 * Description: This simple plugin allows to generate shortcode for any post type
    6  * Version:1.0.0
     6 * Version:2.0.0
    77 * Author: VIITORCLOUD
    88 * Author URI: https://viitorcloud.com/
    99 * License: GPL2
    10  */
     10 *
     11 * @package Custom_post_type_layout
     12 */
    1113
    12 // Exit if accessed directly
    13 if ( !defined( 'ABSPATH' ) ) exit;
     14// Exit if accessed directly.
     15if ( ! defined( 'ABSPATH' ) ) {
     16    exit;
     17}
    1418
    1519global $wpdb;
    1620
    17 if( !defined( 'Custom_Post_Type_Layout' ) ) {
    18     define( 'Custom_Post_Type_Layout', dirname( __FILE__ ) ); // plugin dir
     21if ( ! defined( 'Custom_Post_Type_Layout' ) ) {
     22    define( 'Custom_Post_Type_Layout', __DIR__ ); // plugin dir.
    1923}
    2024
    21 if( !defined( 'Custom_Post_Type_Layout_URL' ) ) {
    22     define( 'Custom_Post_Type_Layout_URL', plugin_dir_url( __FILE__ ) ); // plugin url
     25if ( ! defined( 'Custom_Post_Type_Layout_URL' ) ) {
     26    define( 'Custom_Post_Type_Layout_URL', plugin_dir_url( __FILE__ ) ); // plugin url.
    2327}
    24 if( !defined( 'Custom_Post_Type_Layout_IMG_URL' ) ) {
    25     define( 'Custom_Post_Type_Layout_IMG_URL', Custom_Post_Type_Layout . '/images' ); // plugin images url
     28if ( ! defined( 'Custom_Post_Type_Layout_IMG_URL' ) ) {
     29    define( 'Custom_Post_Type_Layout_IMG_URL', Custom_Post_Type_Layout . '/images' ); // plugin images url.
    2630}
    27 if( !defined( 'Custom_Post_Type_Layout_TEXT_DOMAIN' ) ) {
    28     define( 'Custom_Post_Type_Layout_TEXT_DOMAIN', 'vc_cpt_layout' ); // text domain for doing language translation
     31if ( ! defined( 'Custom_Post_Type_Layout_TEXT_DOMAIN' ) ) {
     32    define( 'Custom_Post_Type_Layout_TEXT_DOMAIN', 'vc_cpt_layout' ); // text domain for doing language translation.
    2933}
    3034
    3135/**
    3236 * Load Text Domain
    33  * 
     37 *
    3438 * This gets the plugin ready for translation.
    35  * 
     39 *
    3640 * @package Custom_Post_Type_Layout
    37  * @since 1.0.0
     41 * @since 2.0.0
    3842 */
    3943load_plugin_textdomain( 'vc_cpt_layout', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
    4044/**
    4145 * Activation hook
    42  * 
     46 *
    4347 * Register plugin activation hook.
    44  * 
     48 *
    4549 * @package Custom_Post_Type_Layout
    46  *@since 1.0.0
     50 *@since 2.0.0
    4751 */
    4852register_activation_hook( __FILE__, 'VC_Custom_Post_Type_Layout_install' );
     
    5256 *
    5357 * Register plugin deactivation hook.
    54  * 
     58 *
    5559 * @package Custom_Post_Type_Layout
    56  * @since 1.0.0
     60 * @since 2.0.0
    5761 */
    5862register_deactivation_hook( __FILE__, 'VC_Custom_Post_Type_Layout_uninstall' );
    5963
    6064/**
    61  * Plugin Setup Activation hook call back 
     65 * Plugin Setup Activation hook call back
    6266 *
    63  * Initial setup of the plugin setting default options 
     67 * Initial setup of the plugin setting default options
    6468 * and database tables creations.
    65  * 
     69 *
    6670 * @package Custom_Post_Type_Layout
    67  * @since 1.0.0
     71 * @since 2.0.0
    6872 */
    6973function VC_Custom_Post_Type_Layout_install() {
    70    
     74
    7175    global $wpdb;
    72     $primarykey = get_option('cbw_primary_key');
    73     if(empty($primarykey)) {
    74         update_option('cbw_primary_key','1');
     76    $primarykey = get_option( 'cbw_primary_key' );
     77    if ( empty( $primarykey ) ) {
     78        update_option( 'cbw_primary_key', '1' );
    7579    }
    76        
    7780}
    7881/**
     
    8386 *
    8487 * @package Custom_Post_Type_Layout
    85  * @since 1.0.0
     88 * @since 2.0.0
    8689 */
    8790function VC_Custom_Post_Type_Layout_uninstall() {
    88    
     91
    8992    global $wpdb;
    90            
    9193}
    9294
     
    9799 *
    98100 * @package Custom_Post_Type_Layout
    99  * @since 1.0.0
     101 * @since 2.0.0
    100102 */
    101103
    102 //require options file
    103 include('custom-post-layout-options.php');
     104// require options file.
     105require 'custom-post-layout-options.php';
  • custom-post-type-layout/trunk/readme.txt

    r3025706 r3088355  
    44Tags: postdesign
    55Requires at least: 3.8
    6 Tested up to: 6.4.2
    7 Requires PHP: 5.2.4
    8 Stable tag: 1.0.0 
     6Tested up to: 6.5.3
     7Requires PHP: 7.4
     8Stable tag: 2.0.0 
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset for help on using the changeset viewer.