' . __( 'Settings', 'plugins-condition' ) . ''; } return $links; } /** ================================================== * Settings page * * @since 1.01 */ public function plugin_menu() { add_options_page( 'PluginsCondition Options', 'Plugins Condition & Site Check', 'manage_options', 'PluginsCondition', array( $this, 'plugin_options' ) ); } /** ================================================== * Settings page * * @since 1.01 */ public function plugin_options() { if ( ! current_user_can( 'manage_options' ) ) { wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'plugins-condition' ) ); } $this->options_updated(); $scriptname = admin_url( 'options-general.php?page=PluginsCondition' ); $plg_cond_notify_interval = get_option( 'plg_cond_notify_interval', 30 ); ?>

Plugins Condition & Site Check

credit(); ?>

  

'Plugin Name', 'version' => 'Version', ) ); if ( array_key_exists( 'name', $plugin_datas ) && ! empty( $plugin_datas['name'] ) && array_key_exists( 'version', $plugin_datas ) && ! empty( $plugin_datas['version'] ) ) { $plugin_name = $plugin_datas['name']; $plugin_ver_num = $plugin_datas['version']; break; } } } } $plugin_version = __( 'Version:', 'plugins-condition' ) . ' ' . $plugin_ver_num; /* translators: FAQ Link & Slug */ $faq = sprintf( __( 'https://wordpress.org/plugins/%s/faq', 'plugins-condition' ), $slug ); $support = 'https://wordpress.org/support/plugin/' . $slug; $review = 'https://wordpress.org/support/view/plugin-reviews/' . $slug; $translate = 'https://translate.wordpress.org/projects/wp-plugins/' . $slug; $facebook = 'https://www.facebook.com/katsushikawamori/'; $twitter = 'https://twitter.com/dodesyo312'; $youtube = 'https://www.youtube.com/channel/UC5zTLeyROkvZm86OgNRcb_w'; $donate = __( 'https://shop.riverforest-wp.info/donate/', 'plugins-condition' ); ?>
| FAQ | Support Forums | Reviews
| | |

Plugin Author Katsushi Kawamori
'; } } } if ( isset( $_POST['plg-cache-remove'] ) && ! empty( $_POST['plg-cache-remove'] ) ) { if ( check_admin_referer( 'plg_cond_settings', 'pluginscondition_settings' ) ) { $del_cash_count = $this->delete_all_cash(); if ( 0 < $del_cash_count ) { echo '
'; } else { echo '
'; } } } } /** ================================================== * Delete all cache * * @return int $del_cash_count(int) * @since 1.00 */ private function delete_all_cash() { global $wpdb; $search_transients = '%plg_cond_datas_%'; $del_transients = $wpdb->get_results( $wpdb->prepare( " SELECT option_name FROM {$wpdb->prefix}options WHERE option_name LIKE %s ", $search_transients ) ); $del_cash_count = 0; foreach ( $del_transients as $del_transient ) { $transient = str_replace( '_transient_', '', $del_transient->option_name ); $value_del_cash = get_transient( $transient ); if ( false <> $value_del_cash ) { delete_transient( $transient ); ++$del_cash_count; } } return $del_cash_count; } /** ================================================== * Settings register * * @since 1.07 */ public function register_settings() { if ( ! get_option( 'plg_cond_notify_interval' ) ) { /* ver 1.06 -> 1.07 */ do_action( 'plugins_condition_notify_cron_stop' ); update_option( 'plg_cond_notify_interval', 30 ); do_action( 'plugins_condition_notify_cron_start' ); } } }