Changeset 2156202
- Timestamp:
- 09/13/2019 03:30:41 PM (7 years ago)
- Location:
- wp-writup
- Files:
-
- 34 added
- 23 deleted
- 4 edited
-
1.1.6 (deleted)
-
trunk/_assets (deleted)
-
trunk/_inc/class (added)
-
trunk/_inc/class/class.app.php (added)
-
trunk/_inc/class/class.tpl.php (added)
-
trunk/_inc/class/index.php (added)
-
trunk/_inc/config.php (added)
-
trunk/_inc/fcnt (added)
-
trunk/_inc/fcnt/fcnt.assets_svg_code.php (added)
-
trunk/_inc/fcnt/fcnt.tpl.php (added)
-
trunk/_inc/index.php (modified) (1 diff)
-
trunk/_inc/init.php (deleted)
-
trunk/_inc/wpw_ajax.php (deleted)
-
trunk/_inc/wpw_ajx_translate.php (deleted)
-
trunk/_inc/wpw_box_top.php (deleted)
-
trunk/_inc/wpw_core.php (deleted)
-
trunk/_inc/wpw_define.php (deleted)
-
trunk/_inc/wpw_enqueue.php (deleted)
-
trunk/_inc/wpw_fnc.php (deleted)
-
trunk/_inc/wpw_format.php (deleted)
-
trunk/_inc/wpw_genrandom_string.php (deleted)
-
trunk/_inc/wpw_get_data.php (deleted)
-
trunk/_inc/wpw_setting_callback.php (deleted)
-
trunk/_inc/wpw_subscription_callback.php (deleted)
-
trunk/assets (added)
-
trunk/assets/css (added)
-
trunk/assets/css/index.php (added)
-
trunk/assets/css/lib (added)
-
trunk/assets/css/lib/lib.smj.min.css (added)
-
trunk/assets/css/stylesheet.css (added)
-
trunk/assets/img (added)
-
trunk/assets/img/header-dots.png (added)
-
trunk/assets/img/logo_r4w.png (added)
-
trunk/assets/index.php (added)
-
trunk/assets/js (added)
-
trunk/assets/js/index.php (added)
-
trunk/assets/js/lib (added)
-
trunk/assets/js/lib/lib.modal.min.js (added)
-
trunk/assets/svg (added)
-
trunk/assets/svg/wpw.svg (added)
-
trunk/index.php (modified) (1 diff)
-
trunk/languages/app_wpwritup-fr_FR.mo (added)
-
trunk/languages/app_wpwritup-fr_FR.po (added)
-
trunk/languages/index.php (modified) (1 diff)
-
trunk/languages/wp-writup-ar.mo (deleted)
-
trunk/languages/wp-writup-ar.po (deleted)
-
trunk/languages/wp-writup-fr_FR.mo (deleted)
-
trunk/languages/wp-writup-fr_FR.po (deleted)
-
trunk/languages/wp-writup.mo (deleted)
-
trunk/languages/wp-writup.po (deleted)
-
trunk/languages/wp-writup.pot (deleted)
-
trunk/readme.txt (deleted)
-
trunk/tpl (added)
-
trunk/tpl/box_finish (added)
-
trunk/tpl/box_finish/_root.php (added)
-
trunk/tpl/box_finish/contained.tpl (added)
-
trunk/tpl/box_finish/index.php (added)
-
trunk/tpl/box_finish/script.js (added)
-
trunk/tpl/box_finish/style.css (added)
-
trunk/tpl/index.php (added)
-
trunk/wpwritup.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-writup/trunk/_inc/index.php
r1725676 r2156202 1 1 <?php 2 // Silence is golden.2 // Silence is golden. 3 3 ?> -
wp-writup/trunk/index.php
r1725676 r2156202 1 1 <?php 2 // Silence is golden.3 ?> 2 // Silence is golden. 3 ?> -
wp-writup/trunk/languages/index.php
r1725676 r2156202 1 1 <?php 2 // Silence is golden.2 // Silence is golden. 3 3 ?> -
wp-writup/trunk/wpwritup.php
r1916055 r2156202 1 1 <?php 2 2 /* 3 Plugin Name: WP WritUp 4 Plugin URI: https://wp-writup.fr 5 Description: Le compagnon idéal pour la rédaction de vos pages de contenu WordPress. 6 Author: Dailycom Agency. 7 Version: 1.1.9 8 Text Domain: wp-writup 9 Domain Path: /languages/ 10 */ 3 * Plugin Name: WP Writup 4 * Plugin URI: https://wp-writup.fr 5 * Description: WP Writup becomes rank4win, powerful, with new tools. Available in the plugins library, we invite you to download it. When rank4win is activated this plugin is automatically disabled. 6 * Version: 1.2.0 7 * Author: WP Writup 8 * Author URI: https://wp-writup.fr 9 * Text Domain: app_wpwritup 10 * Domain Path: /languages/ 11 */ 11 12 12 /** 13 * I LOVE WORDPRESS 14 */ 15 global $wpdb; 13 /** 14 * Quitter si on y accède directement 15 */ 16 if ( ! defined( 'ABSPATH' ) ) { 17 exit; 18 } 16 19 17 /** 18 * Returns current plugin version. 19 * @return string Plugin version 20 */ 21 function WPW_get_version() { 22 if ( ! function_exists( 'get_plugins' ) ) 23 require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 24 $plugin_folder = get_plugins( '/' . plugin_basename( dirname( __FILE__ ) ) ); 25 $plugin_file = basename( ( __FILE__ ) ); 26 return $plugin_folder[$plugin_file]['Version']; 27 } 28 // Récupération des indispensable 29 require_once dirname( __FILE__ ) . '/_inc/init.php'; 30 $Cleaning = 'xed25'; 31 WPW_get_define( WPW_get_version(), $Cleaning ); 20 /** 21 * Récupération des constante définit 22 */ 23 require_once("_inc/config.php"); 32 24 33 // Activate, Disabled 34 register_activation_hook( __FILE__, 'WPWriting_activation' ); 35 register_deactivation_hook ( __FILE__, 'WPWriting_desactivation' ); 36 /** 37 * START ACTION 38 */ 25 /** 26 * Récupération automatique des fonctions 27 */ 28 foreach (glob( dirname(__FILE__)."/_inc/fcnt/fcnt.*.php") as $require_file) { 29 if (is_file($require_file)) { 30 require_once($require_file); 31 } 32 } 39 33 40 add_action( 'plugins_loaded', 'WPWriting_init' ); 41 add_action( 'wpmu_new_blog', 'WPWriting_CreateBlog', 10, 6 ); 42 add_filter( 'wpmu_drop_tables', 'WPWriting_RemoveBlog' ); 43 add_action( 'admin_print_styles-post-new.php', 'wpw_enqueue' ); 44 add_action( 'admin_print_styles-post.php', 'wpw_enqueue' ); 45 add_action( 'edit_form_top', 'wpw_box_top' ); 46 add_filter( 'tiny_mce_before_init', 'wpw_mce_init' ); 47 add_filter( 'script_loader_tag', 'wpw_add_attribute', 10, 3 ); 48 add_filter( 'mce_css', 'wpw_editor_style' ); 49 add_action( 'wp_head', 'wpw_metatags', 1); 50 add_filter( 'document_title_parts', 'wpw_metatitle' ); 51 add_action( 'wp_ajax_wpw_update_act', 'wpw_update_act' ); 52 add_action( 'wp_ajax_wpw_update_acc', 'wpw_update_acc' ); 53 add_action( 'wp_ajax_wpw_update_acs', 'wpw_update_acs' ); 54 add_action( 'wp_ajax_wpw_update_dls', 'wpw_update_dls' ); 55 add_action( 'wp_ajax_wpw_update_clhlp', 'wpw_update_clhlp' ); 56 add_action( 'admin_enqueue_scripts', 'wpw_setting_style' ); 57 add_action( 'admin_enqueue_scripts', 'wpw_subscribes_style' ); 58 add_filter( 'manage_posts_columns', 'wpw_posts_columns', 10, 2 ); 59 add_action( 'manage_posts_custom_column', 'wpw_posts_columns_contenu', 10, 2 ); 60 add_filter( 'manage_pages_columns', 'wpw_pages_columns', 10 ); 61 add_action( 'manage_pages_custom_column', 'wpw_posts_columns_contenu', 10, 2 ); 62 add_action('admin_head', 'wpw_style_admin'); 63 /** 64 * LOAD LANGUAGE 65 */ 66 function WPWriting_init(){ 67 global $WPWriting; 68 load_plugin_textdomain ( 'wp-writup', false, basename(rtrim(dirname(__FILE__), '/')) . '/languages' ); 69 } 70 /** 71 * ACTIVATING THE PLUGIN 72 */ 73 function WPWriting_activation($network_wide) { 74 global $wpdb; 75 if ( is_multisite() && $network_wide ) { 76 $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" ); 77 foreach ( $blog_ids as $blog_id ) { 78 switch_to_blog( $blog_id ); 79 WPWriting_CreateTable(); 80 restore_current_blog(); 34 /** 35 * Récupération automatique des class 36 */ 37 foreach (glob( dirname(__FILE__)."/_inc/class/class.*.php") as $require_file) { 38 if (is_file($require_file)) { 39 require_once($require_file); 40 } 81 41 } 82 } else {83 WPWriting_CreateTable();84 }85 }86 /**87 * DEACTIVATION THE PLUGIN88 */89 function WPWriting_desactivation() {90 global $wpdb;91 if ( is_multisite() && $network_wide ) {92 $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );93 foreach ( $blog_ids as $blog_id ) {94 switch_to_blog( $blog_id );95 WPWriting_DelectTable();96 restore_current_blog();97 }98 } else {99 WPWriting_DelectTable();100 }101 }102 /**103 * CREATING THE DATABASE104 */105 function WPWriting_CreateTable(){106 global $wpdb;107 $wpw_db = $wpdb->prefix."wp_writup";108 if($wpdb->get_var("show tables like '{$wpw_db}'") != $wpw_db)109 {110 $wpw_sql_creat = "CREATE TABLE " . $wpw_db . " (`id` mediumint(9) NOT NULL AUTO_INCREMENT,`license` text,`agreement` text,`wpkey` text,`path` text,`install` text,`registration` text, `wpw_ukey` text, `wpw_token` text, `wpw_help` char(1), UNIQUE KEY id (id));";111 $wpdb->query($wpw_sql_creat);112 $wpw_install = wpw_genrandom_string(18);113 $wpdb->query($wpdb->prepare("INSERT INTO $wpw_db (id,license,agreement,wpkey,path,install,wpw_ukey,wpw_token,wpw_help) VALUES(%d,%s,%s,%s,%s,%s,%s,%s,%d)", array(1,'','','','',$wpw_install,'','',1)));114 }115 }116 /**117 * DELECT THE DATABASE118 */119 function WPWriting_DelectTable(){120 global $wpdb;121 $wpw_table = $wpdb->prefix."wp_writup";122 $sql = "DROP TABLE IF EXISTS " . $wpw_table. ";";123 $wpdb->query($sql);124 }125 /**126 * ADDING A NEW BLOG127 */128 function WPWriting_CreateBlog(){129 if(is_plugin_active_for_network( 'plugin-name/plugin-name.php')){130 switch_to_blog($blog_id);131 WPWriting_CreateTable();132 restore_current_blog();133 }134 }135 /**136 * REMOVE A BLOG137 */138 function WPWriting_RemoveBlog($wpw_table) {139 global $wpdb;140 $wpw_table[] = $wpdb->prefix.'wp_writup';141 return $wpw_table;142 }143 /**144 * SOLVE PROBLEMES AUTOMATICALLY145 */146 function WPWriting_SolveProblemsAuto()147 {148 WPWriting_desactivation();149 WPWriting_activation($network_wide);150 return true;151 }152 153 154
Note: See TracChangeset
for help on using the changeset viewer.