Changeset 2830837
- Timestamp:
- 12/08/2022 10:53:30 PM (3 years ago)
- Location:
- promote-my-extensions/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (1 diff)
-
admin/init.php (modified) (1 diff)
-
promote-my-plugins.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
promote-my-extensions/trunk/README.txt
r2830830 r2830837 5 5 Requires at least: 4.7 6 6 Tested up to: 6.1.1 7 Stable tag: 0.2. 07 Stable tag: 0.2.1 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later -
promote-my-extensions/trunk/admin/init.php
r2830830 r2830837 22 22 register_activation_hook( __FILE__, 'wpe_plugin_rewrite_flush' ); 23 23 24 function wpe_plugin_rewrite_flush() { 25 // Check if any default options are missing 26 $options = array( 27 'wpe_pmp_plural_label' => __('My Extensions', 'promote-my-extensions'), 28 'wpe_pmp_singular_label' => __('My Extension', 'promote-my-extensions'), 29 'wpe_pmp_index_slug' => 'extensions', 30 'wpe_pmp_use_excerpt' => 'yes', 31 'wpe_pmp_use_thumbnails' => 'yes', 32 'wpe_pmp_use_custom_fields' => 'yes', 33 'wpe_pmp_use_comments' => 'yes', 34 'wpe_pmp_use_trackbacks' => 'yes', 35 'wpe_pmp_use_revisions' => 'yes', 36 'wpe_pmp_use_taxonomies' => 'yes', 37 'wpe_pmp_use_documentation' => 'yes', 38 ); 39 40 foreach ($options as $key => $value) { 41 if (!get_option($key)) { 42 add_option($key, esc_attr($value)); 43 } 44 } 45 24 function wpe_plugin_rewrite_flush() { 46 25 wpe_plugin_admin_init(); 47 26 flush_rewrite_rules(); -
promote-my-extensions/trunk/promote-my-plugins.php
r2830830 r2830837 5 5 * @package Promote_My_Extensions 6 6 * @author Shane Lambert 7 * @copyright 2022 GrandSlambert7 * @copyright 2022 WP Empowered 8 8 * @license GPL-2.0-or-later 9 9 * … … 12 12 * Plugin URI: https://grandslambert.com/plugins/promote-my-extensions 13 13 * Description: This plugin creates a custom post type to allow you to provide information about the plugins you have developed. 14 * Version: 0.2. 014 * Version: 0.2.1 15 15 * Requires at least: 5.2 16 16 * Requires PHP: 7.2 17 * Author: GrandSlambert17 * Author: WP Empowered 18 18 * Author URI: https://grandslambert.com 19 19 * Text Domain: wpe-promote-my-plugins … … 44 44 add_action('admin_enqueue_scripts', 'wpeplugin_admin_styles'); 45 45 46 function Promote_My_Extensions_activation() { 47 // Check if any default options are missing 48 $options = array( 49 'wpe_pmp_plural_label' => __('My Extensions', 'promote-my-extensions'), 50 'wpe_pmp_singular_label' => __('My Extension', 'promote-my-extensions'), 51 'wpe_pmp_index_slug' => 'extensions', 52 'wpe_pmp_use_excerpt' => 'yes', 53 'wpe_pmp_use_thumbnails' => 'yes', 54 'wpe_pmp_use_custom_fields' => 'yes', 55 'wpe_pmp_use_comments' => 'yes', 56 'wpe_pmp_use_trackbacks' => 'yes', 57 'wpe_pmp_use_revisions' => 'yes', 58 'wpe_pmp_use_taxonomies' => 'yes', 59 'wpe_pmp_use_documentation' => 'yes', 60 ); 61 62 foreach ($options as $key => $value) { 63 if (!get_option($key)) { 64 add_option($key, esc_attr($value)); 65 } 66 } 67 68 flush_rewrite_rules(); 69 } 70 register_activation_hook(__FILE__, 'Promote_My_Extensions_activation'); 71
Note: See TracChangeset
for help on using the changeset viewer.