Changeset 3088355
- Timestamp:
- 05/17/2024 01:29:52 PM (19 months ago)
- Location:
- custom-post-type-layout/trunk
- Files:
-
- 2 edited
-
custom-post-layout.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
custom-post-type-layout/trunk/custom-post-layout.php
r2576389 r3088355 4 4 * Plugin URI: https://viitorcloud.com/ 5 5 * Description: This simple plugin allows to generate shortcode for any post type 6 * Version: 1.0.06 * Version:2.0.0 7 7 * Author: VIITORCLOUD 8 8 * Author URI: https://viitorcloud.com/ 9 9 * License: GPL2 10 */ 10 * 11 * @package Custom_post_type_layout 12 */ 11 13 12 // Exit if accessed directly 13 if ( !defined( 'ABSPATH' ) ) exit; 14 // Exit if accessed directly. 15 if ( ! defined( 'ABSPATH' ) ) { 16 exit; 17 } 14 18 15 19 global $wpdb; 16 20 17 if ( !defined( 'Custom_Post_Type_Layout' ) ) {18 define( 'Custom_Post_Type_Layout', dirname( __FILE__ ) ); // plugin dir21 if ( ! defined( 'Custom_Post_Type_Layout' ) ) { 22 define( 'Custom_Post_Type_Layout', __DIR__ ); // plugin dir. 19 23 } 20 24 21 if ( !defined( 'Custom_Post_Type_Layout_URL' ) ) {22 define( 'Custom_Post_Type_Layout_URL', plugin_dir_url( __FILE__ ) ); // plugin url 25 if ( ! defined( 'Custom_Post_Type_Layout_URL' ) ) { 26 define( 'Custom_Post_Type_Layout_URL', plugin_dir_url( __FILE__ ) ); // plugin url. 23 27 } 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 28 if ( ! defined( 'Custom_Post_Type_Layout_IMG_URL' ) ) { 29 define( 'Custom_Post_Type_Layout_IMG_URL', Custom_Post_Type_Layout . '/images' ); // plugin images url. 26 30 } 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 31 if ( ! defined( 'Custom_Post_Type_Layout_TEXT_DOMAIN' ) ) { 32 define( 'Custom_Post_Type_Layout_TEXT_DOMAIN', 'vc_cpt_layout' ); // text domain for doing language translation. 29 33 } 30 34 31 35 /** 32 36 * Load Text Domain 33 * 37 * 34 38 * This gets the plugin ready for translation. 35 * 39 * 36 40 * @package Custom_Post_Type_Layout 37 * @since 1.0.041 * @since 2.0.0 38 42 */ 39 43 load_plugin_textdomain( 'vc_cpt_layout', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); 40 44 /** 41 45 * Activation hook 42 * 46 * 43 47 * Register plugin activation hook. 44 * 48 * 45 49 * @package Custom_Post_Type_Layout 46 *@since 1.0.050 *@since 2.0.0 47 51 */ 48 52 register_activation_hook( __FILE__, 'VC_Custom_Post_Type_Layout_install' ); … … 52 56 * 53 57 * Register plugin deactivation hook. 54 * 58 * 55 59 * @package Custom_Post_Type_Layout 56 * @since 1.0.060 * @since 2.0.0 57 61 */ 58 62 register_deactivation_hook( __FILE__, 'VC_Custom_Post_Type_Layout_uninstall' ); 59 63 60 64 /** 61 * Plugin Setup Activation hook call back 65 * Plugin Setup Activation hook call back 62 66 * 63 * Initial setup of the plugin setting default options 67 * Initial setup of the plugin setting default options 64 68 * and database tables creations. 65 * 69 * 66 70 * @package Custom_Post_Type_Layout 67 * @since 1.0.071 * @since 2.0.0 68 72 */ 69 73 function VC_Custom_Post_Type_Layout_install() { 70 74 71 75 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' ); 75 79 } 76 77 80 } 78 81 /** … … 83 86 * 84 87 * @package Custom_Post_Type_Layout 85 * @since 1.0.088 * @since 2.0.0 86 89 */ 87 90 function VC_Custom_Post_Type_Layout_uninstall() { 88 91 89 92 global $wpdb; 90 91 93 } 92 94 … … 97 99 * 98 100 * @package Custom_Post_Type_Layout 99 * @since 1.0.0101 * @since 2.0.0 100 102 */ 101 103 102 // require options file103 include('custom-post-layout-options.php');104 // require options file. 105 require 'custom-post-layout-options.php'; -
custom-post-type-layout/trunk/readme.txt
r3025706 r3088355 4 4 Tags: postdesign 5 5 Requires at least: 3.8 6 Tested up to: 6. 4.27 Requires PHP: 5.2.48 Stable tag: 1.0.06 Tested up to: 6.5.3 7 Requires PHP: 7.4 8 Stable tag: 2.0.0 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset
for help on using the changeset viewer.