PluginProbe ʕ •ᴥ•ʔ
Auto Post Cleaner / trunk
Auto Post Cleaner vtrunk
3.12.0 3.13.1 3.2.4 3.2.5 3.3.0 3.3.10 3.3.11 3.3.8 3.4.2 3.5.3 3.6.0 3.7.0 3.7.1 3.7.2 3.7.3 3.7.5 3.7.6 3.8.0 3.9.0 3.9.4 3.9.6 3.9.7 trunk 3.0.0 3.1.0 3.10.1 3.10.2 3.11.4
delete-old-posts-programmatically / delete-old-posts.php
delete-old-posts-programmatically Last commit date
assets 1 month ago freemius 1 month ago inc 1 month ago languages 3 years ago README.md 1 month ago composer.json 5 years ago delete-old-posts-premium.php 3 years ago delete-old-posts-programmatically.php 3 years ago delete-old-posts.php 1 month ago package-lock.json 1 month ago package.json 1 year ago postcss.config.js 5 years ago readme.txt 1 month ago styles.css 1 month ago tailwind.config.js 2 years ago
delete-old-posts.php
90 lines
1 <?php
2
3 /**
4 * Plugin Name: Auto Post Cleaner
5 * Description: Automatically delete and redirect posts to similar ones to keep your site clean.
6 * Author: WPMagic
7 * Author URI: https://wpmagic.pwa.cloud
8 * License: GPL3
9 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
10 * Version: 3.13.1
11 * Text Domain: delete-old-posts
12 *
13 * @package headless-cms
14 */
15 use DEL\OLD\Posts\Cls;
16 use DEL\OLD\Posts\Cls\Assets;
17 // If this file is accessed directory, then abort.
18 if ( !defined( 'WPINC' ) ) {
19 die;
20 }
21 if ( function_exists( 'dop_fs' ) ) {
22 dop_fs()->set_basename( false, __FILE__ );
23 } else {
24 // DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE `function_exists` CALL ABOVE TO PROPERLY WORK.
25 // ... Freemius integration snippet ...
26 /*******************
27 * freemius
28 * *************** */
29 if ( !function_exists( 'dop_fs' ) ) {
30 // Create a helper function for easy SDK access.
31 function dop_fs() {
32 global $dop_fs;
33 if ( !isset( $dop_fs ) ) {
34 // Include Freemius SDK.
35 require_once dirname( __FILE__ ) . '/freemius/start.php';
36 $dop_fs = fs_dynamic_init( array(
37 'id' => '8165',
38 'slug' => 'delete-old-posts',
39 'type' => 'plugin',
40 'public_key' => 'pk_344033c43756e8fcfcd1e6a2c6b17',
41 'is_premium' => false,
42 'premium_suffix' => 'Professional',
43 'has_addons' => false,
44 'has_paid_plans' => true,
45 'menu' => array(
46 'slug' => 'delete-old-posts',
47 'support' => false,
48 ),
49 'is_live' => true,
50 'is_org_compliant' => true,
51 ) );
52 }
53 return $dop_fs;
54 }
55
56 // Init Freemius.
57 dop_fs();
58 // Signal that SDK was initiated.
59 do_action( 'dop_fs_loaded' );
60 }
61 // ... Plugin's main file logic ...
62 /********************
63 * Main Plugin Code
64 ********************/
65 // register plugin classes
66 require_once plugin_dir_path( __FILE__ ) . 'inc/class-enqueue-assets.php';
67 require_once plugin_dir_path( __FILE__ ) . 'inc/class-delete-old-posts.php';
68 require_once plugin_dir_path( __FILE__ ) . 'inc/class-delete-old-posts-redirects.php';
69 require_once plugin_dir_path( __FILE__ ) . 'inc/class-delete-old-posts-filters.php';
70 /**
71 * Starts the plugin by initializing the class
72 * Set the plugin in motion.
73 */
74 add_action( 'plugins_loaded', 'deloldp_class_load' );
75 function deloldp_class_load() {
76 new Assets\Enqueue_Assets();
77 new Cls\Delete_Old_Posts();
78 new Cls\Delete_Old_Posts_Filters();
79 new Cls\Delete_Old_Posts_Redirects();
80 }
81
82 /**
83 * add plugin translations
84 */
85 add_action( 'init', 'delop_load_textdomain' );
86 function delop_load_textdomain() {
87 load_plugin_textdomain( 'delete-old-posts', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
88 }
89
90 }