芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/recent-tweets-widget/recent-tweets.php
Settings', ); return array_merge( $links, $mylinks ); } // Settings menu /* add_action('admin_menu', 'tp_twitter_plugin_menu_item'); function tp_twitter_plugin_menu_item() { add_options_page( 'Recent Tweets', 'Recent Tweets', 'manage_options', 'recent-tweets', 'tp_twitter_plugin_settings_page'); } */ function tp_twitter_plugin_settings_page() { include(plugin_dir_path( __FILE__ ).'/settings.php'); } function tp_twitter_other_plugins_page() { include(plugin_dir_path( __FILE__ ).'/other_plugins.php'); } function recent_tweets_admin_init() { register_setting( 'tp_twitter_plugin_options', 'tp_twitter_plugin_options'); recent_tweets_handle_external_redirects(); wp_enqueue_script('recent-tweets-admin',plugin_dir_url( __FILE__ ). 'scripts/recent-tweets-scripts.js',array('jquery')); wp_enqueue_style('recent-tweets-admin-style',plugin_dir_url( __FILE__ ).'styles/recent-tweets-style-common.css', array(), '3.1.1'); } function recent_tweets_handle_external_redirects() { if ( empty( $_GET['page'] ) ) { return; } if ( 'recent_tweets_go_appsumo_pro' === $_GET['page'] ) { wp_redirect( ( 'https://appsumo.com/tools/wordpress/?utm_source=sumo&utm_medium=wp-widget&utm_campaign=recent_tweets' ) ); die; } } add_action( 'admin_init', 'recent_tweets_admin_init' ); //delete_option('tp_twitter_global_notification'); add_option('tp_twitter_global_notification', 1); function tp_twitter_plugin_top_level_menu() { add_menu_page( 'Recent Tweets', 'Recent Tweets', 'manage_options', 'recent-tweets', 'tp_twitter_plugin_settings_page', 'dashicons-twitter'); //add_submenu_page( 'recent-tweets', 'Other Plugins', 'Other Plugins', 'manage_options', 'other-plugins', 'tp_twitter_other_plugins_page'); add_submenu_page( 'recent-tweets', 'Other Tools', 'Other Tools', 'manage_options', 'recent-tweets-plugin-other-tools', 'recent_tweets_other_tools_page'); add_submenu_page( 'recent-tweets', 'Appsumo', '
AppSumo
', 'manage_options', 'recent_tweets_go_appsumo_pro', 'recent_tweets_handle_external_redirects' ); add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'recent_tweets_filter_plugin_actions', 10, 2 ); } add_action( 'admin_menu', 'tp_twitter_plugin_top_level_menu' ); function tp_twitter_plugin_global_notice() { } function recent_tweets_other_tools_page() { include(plugin_dir_path( __FILE__ ).'/other_tools.php'); } function recent_tweets_filter_plugin_actions($links, $file) { $settings_link = '
' . __('Settings') . '
'; array_unshift( $links, $settings_link ); // before other links return $links; } add_action( 'admin_notices', 'tp_twitter_plugin_global_notice' ); function tp_twitter_plugin_deactivate() { delete_option('tp_twitter_global_notification'); } register_deactivation_hook( __FILE__, 'tp_twitter_plugin_deactivate' ); function tp_twitter_plugin_load_plugin_textdomain() { load_plugin_textdomain( TP_RECENT_TEXT_DOMAIN, FALSE, basename( dirname( __FILE__ ) ) . '/languages/' ); } add_action( 'plugins_loaded', 'tp_twitter_plugin_load_plugin_textdomain' );