Example #1
1
 function lingotek_wordpress_importer_init()
 {
     $class = new ReflectionClass('WP_Import');
     load_plugin_textdomain('wordpress-importer', false, basename(dirname($class->getFileName())) . '/languages');
     $GLOBALS['wp_import'] = new Lingotek_WP_Import();
     register_importer('wordpress', 'WordPress', __('Import <strong>posts, pages, comments, custom fields, categories, and tags</strong> from a WordPress export file.', 'wordpress-importer'), array($GLOBALS['wp_import'], 'dispatch'));
 }
Example #2
1
		function nospamnx() {		
			if (function_exists('load_plugin_textdomain'))
				load_plugin_textdomain('nospamnx', PLUGINDIR.'/nospamnx');
				
			if (REQWP27 != true) {
				add_action('admin_notices', array(&$this, 'wpVersionFail'));
				return;
			}

			//tell wp what to do when plugin is activated and uninstalled
			if (function_exists('register_activation_hook'))
				register_activation_hook(__FILE__, array(&$this, 'activate'));
			if (function_exists('register_deactivation_hook'))
				register_deactivation_hook(__FILE__, array(&$this, 'deactivate'));
			if (function_exists('register_uninstall_hook'))
				register_uninstall_hook(__FILE__, array(&$this, 'uninstall'));	
				
			//load nospamnx options
			$this->getOptions();

			//add nospamnx wordpress actions	
			add_action('init', array(&$this, 'checkCommentForm'));		
			add_action('admin_menu', array(&$this, 'nospamnxAdminMenu'));		
			add_action('rightnow_end', array(&$this, 'nospamnxStats'));		
			add_action('comment_form', array(&$this, 'addHiddenFields'));	
			
			//check if we have to include the nospamnx css default style
			if (empty($this->nospamnx_cssname) || (strtolower(trim($this->nospamnx_cssname)) == DEFAULTCSS))
				add_action('wp_head', array(&$this, 'nospamnxStyle'));
		}
Example #3
1
 function cherry_plugin_settings()
 {
     global $wpdb;
     if (!function_exists('get_plugin_data')) {
         require_once ABSPATH . 'wp-admin/includes/plugin.php';
     }
     $upload_dir = wp_upload_dir();
     $plugin_data = get_plugin_data(plugin_dir_path(__FILE__) . 'cherry-plugin.php');
     //Cherry plugin constant variables
     define('CHERRY_PLUGIN_DIR', plugin_dir_path(__FILE__));
     define('CHERRY_PLUGIN_URL', plugin_dir_url(__FILE__));
     define('CHERRY_PLUGIN_DOMAIN', $plugin_data['TextDomain']);
     define('CHERRY_PLUGIN_DOMAIN_DIR', $plugin_data['DomainPath']);
     define('CHERRY_PLUGIN_VERSION', $plugin_data['Version']);
     define('CHERRY_PLUGIN_NAME', $plugin_data['Name']);
     define('CHERRY_PLUGIN_SLUG', plugin_basename(__FILE__));
     define('CHERRY_PLUGIN_DB', $wpdb->prefix . CHERRY_PLUGIN_DOMAIN);
     define('CHERRY_PLUGIN_REMOTE_SERVER', esc_url('http://tmbhtest.com/cherryframework.com/components_update/'));
     //Other constant variables
     define('CURRENT_THEME_DIR', get_stylesheet_directory());
     define('CURRENT_THEME_URI', get_stylesheet_directory_uri());
     define('UPLOAD_BASE_DIR', str_replace("\\", "/", $upload_dir['basedir']));
     define('UPLOAD_DIR', str_replace("\\", "/", $upload_dir['path'] . '/'));
     // if ( !defined('API_URL') ) {
     // 	define( 'API_URL', esc_url( 'http://updates.cherry.template-help.com/cherrymoto/v3/api/' ) );
     // }
     load_plugin_textdomain(CHERRY_PLUGIN_DOMAIN, false, dirname(plugin_basename(__FILE__)) . '/' . CHERRY_PLUGIN_DOMAIN_DIR);
     do_action('cherry_plugin_settings');
 }
function geodir_load_translation_geodirpayment()
{
    $locale = apply_filters('plugin_locale', get_locale(), GEODIRPAYMENT_TEXTDOMAIN);
    load_textdomain(GEODIRPAYMENT_TEXTDOMAIN, WP_LANG_DIR . '/' . GEODIRPAYMENT_TEXTDOMAIN . '/' . GEODIRPAYMENT_TEXTDOMAIN . '-' . $locale . '.mo');
    load_plugin_textdomain(GEODIRPAYMENT_TEXTDOMAIN, false, dirname(plugin_basename(__FILE__)) . '/geodir-payment-languages');
    include_once 'language.php';
}
 public function init()
 {
     add_filter('jpeg_quality', $this->get_static_method('jpeg_quality'));
     add_filter('wp_editor_set_quality', $this->get_static_method('jpeg_quality'));
     add_filter('wp_generate_attachment_metadata', $this->get_method('compress_on_upload'), 10, 2);
     load_plugin_textdomain(self::NAME, false, dirname(plugin_basename(__FILE__)) . '/languages');
 }
function kebo_twitter_plugin_setup()
{
    /**
     * Include Plugin Options.
     */
    require_once KEBO_TWITTER_PLUGIN_PATH . 'inc/options.php';
    /**
     * Include Menu Page.
     */
    require_once KEBO_TWITTER_PLUGIN_PATH . 'inc/menu.php';
    /**
     * Include Custom Widget.
     */
    require_once KEBO_TWITTER_PLUGIN_PATH . 'inc/widget.php';
    /**
     * Include Request for the Twitter Feed.
     */
    require_once KEBO_TWITTER_PLUGIN_PATH . 'inc/get_tweets.php';
    /**
     * Include Shortcode.
     */
    require_once KEBO_TWITTER_PLUGIN_PATH . 'inc/shortcode.php';
    /**
     * Include AJAX.
     */
    require_once KEBO_TWITTER_PLUGIN_PATH . 'inc/ajax.php';
    /**
     * Load Text Domain for Translations.
     */
    load_plugin_textdomain('kebo_twitter', false, dirname(plugin_basename(__FILE__)) . '/languages');
}
Example #7
0
 public static function registerLocale($dir)
 {
     if (!defined("DAQ_DOMAIN")) {
         define("DAQ_DOMAIN", "daq-framework-locale");
         load_plugin_textdomain(DAQ_DOMAIN, false, $dir);
     }
 }
 /**
  * Load textdomain
  */
 function load_textdomain()
 {
     $domain = 'wp_jwt_auth';
     $locale = apply_filters('plugin_locale', get_locale(), $domain);
     load_textdomain($domain, WP_LANG_DIR . '/wp-jwt-authentication/' . $domain . '-' . $locale . '.mo');
     load_plugin_textdomain($domain, FALSE, dirname(plugin_basename(__FILE__)) . '/languages/');
 }
Example #9
0
function ywctm_premium_init()
{
    /* Load YWCTM text domain */
    load_plugin_textdomain('ywctm', false, dirname(plugin_basename(__FILE__)) . '/languages/');
    global $YITH_WC_Catalog_Mode;
    $YITH_WC_Catalog_Mode = new YITH_WC_Catalog_Mode_Premium();
}
 public function __construct()
 {
     load_plugin_textdomain('mapboxadv', false, basename(dirname(__FILE__)) . '/languages');
     //widget builder
     $this->wbuilder = new Mapbox_Builder();
     parent::__construct('Mapboxadv', 'Mapbox for WP Advanced', array('description' => 'Mapbox for WP Advanced'));
 }
Example #11
0
function ft_op_init()
{
    if (!file_exists(get_template_directory() . '/ft-options.php')) {
        return;
    }
    //  If user can't edit theme options, exit
    if (!current_user_can('edit_theme_options')) {
        return;
    }
    // Load translation files
    load_plugin_textdomain('ft_optionsframework', false, dirname(plugin_basename(__FILE__)) . '/languages/');
    // Loads the required Options Framework classes.
    require plugin_dir_path(__FILE__) . 'includes/class-options-framework.php';
    require plugin_dir_path(__FILE__) . 'includes/class-options-framework-admin.php';
    require plugin_dir_path(__FILE__) . 'includes/class-options-interface.php';
    require plugin_dir_path(__FILE__) . 'includes/class-options-media-uploader.php';
    require plugin_dir_path(__FILE__) . 'includes/class-options-sanitization.php';
    // Instantiate the main plugin class.
    $options_framework = new FT_OP();
    $options_framework->init();
    // Instantiate the options page.
    $options_framework_admin = new FT_OP_Admin();
    $options_framework_admin->init();
    // Instantiate the media uploader class
    $options_framework_media_uploader = new FT_OP_Media_Uploader();
    $options_framework_media_uploader->init();
}
Example #12
0
 function eshop_load_lang()
 {
     $eshoplanguage = apply_filters('eshop_language_dir', dirname(plugin_basename(__FILE__)));
     load_plugin_textdomain('eshop', false, $eshoplanguage);
     //grab all options here in one go
     $eshopoptions = get_option('eshop_plugin_settings');
 }
Example #13
0
function run_woorule()
{
    $lang_dir = basename(dirname(__FILE__ . '/languages'));
    load_plugin_textdomain('woorule', false, $lang_dir);
    $plugin = new WooRule();
    $plugin->run();
}
 /**
  * Set up our panel
  */
 public function init()
 {
     load_plugin_textdomain(self::DBS_NAME, false, dirname(plugin_basename(__FILE__)) . '/languages/');
     $this->title(__('Shortcodes', self::DBS_NAME));
     add_action('wp_enqueue_scripts', array($this, 'dbs_enqueue_scripts'));
     add_action('admin_enqueue_scripts', array($this, 'dbs_enqueue_scripts'));
 }
Example #15
0
 public function load_translation()
 {
     $this->l = get_locale();
     if (!empty($this->l)) {
         load_plugin_textdomain('gd-bbpress-attachments', false, 'gd-bbpress-attachments/languages');
     }
 }
function wp_migrate_db_pro_media_files_init()
{
    if (!class_exists('WPMDBPro_Addon')) {
        return;
    }
    load_plugin_textdomain('wp-migrate-db-pro-media-files', false, dirname(plugin_basename(__FILE__)) . '/languages/');
}
 function postHighlights()
 {
     $pluginFolder = plugin_basename(dirname(__FILE__));
     load_plugin_textdomain('ph', "wp-content/plugins/{$pluginFolder}/languages", "{$pluginFolder}/languages");
     $this->basepath = WP_CONTENT_DIR . "/plugins/{$pluginFolder}/";
     $this->baseurl = WP_CONTENT_URL . "/plugins/{$pluginFolder}/";
     $this->optionsPrefix = 'post_highlights_';
     $this->custom_thumb_name = 'posthighlightscustomthumb';
     $this->checkForOldSettings();
     $this->loadTheme();
     register_deactivation_hook(__FILE__, array(&$this, 'ph_deactivate'));
     if (current_user_can('manage-post-highlights')) {
         add_action('admin_print_scripts-edit.php', array(&$this, 'addJS'));
         add_action('admin_print_styles-edit.php', array(&$this, 'addCSS'));
         add_action('admin_print_scripts-edit-pages.php', array(&$this, 'addJS'));
         add_action('admin_print_styles-edit-pages.php', array(&$this, 'addCSS'));
         add_action('manage_posts_custom_column', array(&$this, 'highlight_It'), 10, 2);
         add_filter('manage_posts_columns', array(&$this, 'add_column'));
         add_action('manage_pages_custom_column', array(&$this, 'highlight_It'), 10, 2);
         add_filter('manage_pages_columns', array(&$this, 'add_column'));
         add_action('restrict_manage_posts', array(&$this, 'posts_filter'));
         add_action('admin_print_scripts-toplevel_page_post-highlights', array(&$this, 'addJS'));
         add_action('admin_print_styles-toplevel_page_post-highlights', array(&$this, 'addCSS'));
         global $pagenow;
         if ($pagenow == 'edit.php' && isset($_GET['showhighlighted'])) {
             query_posts('meta_key=ph_order&orderby=meta_value&order=ASC&m=' . $_GET['m'] . '&cat=' . $_GET['cat'] . '&paged=' . $_GET['paged']);
         }
     }
     add_action('admin_menu', array(&$this, 'add_options_page'));
     add_action('admin_init', array(&$this, 'global_settings'));
     if ($this->get_option('custom_thumb')) {
         add_filter('intermediate_image_sizes', array(&$this, 'register_custom_thumb'));
     }
 }
 /**
  * Internationalization setup
  *
  * @return void
  */
 public function i18n()
 {
     $domain = 'better-blockquotes';
     $locale = apply_filters('plugin_locale', get_locale(), $domain);
     load_textdomain($domain, WP_LANG_DIR . "/tinymce-email-button/{$domain}-{$locale}.mo");
     load_plugin_textdomain($domain, false, dirname(plugin_basename(__FILE__)) . '/languages/');
 }
 function __construct()
 {
     // vars
     $this->dir = plugins_url('', __FILE__);
     $this->path = plugin_dir_path(__FILE__);
     $this->version = '0.1.4';
     // actions
     add_action('init', array($this, 'init'));
     add_action('init', array($this, 'cptm_create_custom_post_types'));
     add_action('admin_menu', array($this, 'cptm_admin_menu'));
     add_action('admin_enqueue_scripts', array($this, 'cptm_styles'));
     add_action('add_meta_boxes', array($this, 'cptm_create_meta_boxes'));
     add_action('save_post', array($this, 'cptm_save_post'));
     add_action('manage_posts_custom_column', array($this, 'cptm_custom_columns'), 10, 2);
     add_action('manage_posts_custom_column', array($this, 'cptm_tax_custom_columns'), 10, 2);
     add_action('admin_footer', array($this, 'cptm_admin_footer'));
     add_action('wp_prepare_attachment_for_js', array($this, 'wp_prepare_attachment_for_js'), 10, 3);
     // filters
     add_filter('manage_cptm_posts_columns', array($this, 'cptm_change_columns'));
     add_filter('manage_edit-cptm_sortable_columns', array($this, 'cptm_sortable_columns'));
     add_filter('manage_cptm_tax_posts_columns', array($this, 'cptm_tax_change_columns'));
     add_filter('manage_edit-cptm_tax_sortable_columns', array($this, 'cptm_tax_sortable_columns'));
     add_filter('post_updated_messages', array($this, 'cptm_post_updated_messages'));
     // set textdomain
     load_plugin_textdomain('cptm', false, basename(dirname(__FILE__)) . '/lang');
 }
 /**
  * Class constructor
  */
 function __construct()
 {
     //Language Setup
     $locale = get_locale();
     load_plugin_textdomain($this->localization_domain, false, dirname(plugin_basename(__FILE__)) . '/lang/');
     $this->hooks();
 }
 /**
  * Constructor
  * @since 1.8
  * @uses bool $show_avatars
  * @uses add_action()
  * @uses add_filter()
  * @uses load_plugin_textdomain()
  * @uses register_activation_hook()
  * @uses register_deactivation_hook()
  */
 public function __construct()
 {
     global $show_avatars;
     // Initialize default settings
     register_activation_hook(WPUA_DIR . 'wp-user-avatar.php', array($this, 'wpua_options'));
     // Settings saved to wp_options
     add_action('admin_init', array($this, 'wpua_options'));
     // Remove subscribers edit_posts capability
     // Translations
     load_plugin_textdomain('wp-user-avatar', "", WPUA_FOLDER . '/lang');
     // Admin menu settings
     add_action('admin_menu', array($this, 'wpua_admin'));
     add_action('admin_init', array($this, 'wpua_register_settings'));
     // Default avatar
     add_filter('default_avatar_select', array($this, 'wpua_add_default_avatar'), 10);
     add_filter('whitelist_options', array($this, 'wpua_whitelist_options'), 10);
     // Additional plugin info
     add_filter('plugin_action_links', array($this, 'wpua_action_links'), 10, 2);
     add_filter('plugin_row_meta', array($this, 'wpua_row_meta'), 10, 2);
     // Hide column in Users table if default avatars are enabled
     if ((bool) $show_avatars == 0) {
         add_filter('manage_users_columns', array($this, 'wpua_add_column'), 10, 1);
         add_filter('manage_users_custom_column', array($this, 'wpua_show_column'), 10, 3);
     }
     // Media states
     add_filter('display_media_states', array($this, 'wpua_add_media_state'), 10, 1);
 }
Example #22
0
function wpcf7_load_textdomain($locale = null)
{
    global $l10n;
    $domain = 'contact-form-7';
    if (get_locale() == $locale) {
        $locale = null;
    }
    if (empty($locale)) {
        if (is_textdomain_loaded($domain)) {
            return true;
        } else {
            return load_plugin_textdomain($domain, false, $domain . '/languages');
        }
    } else {
        $mo_orig = $l10n[$domain];
        unload_textdomain($domain);
        $mofile = $domain . '-' . $locale . '.mo';
        $path = WP_PLUGIN_DIR . '/' . $domain . '/languages';
        if ($loaded = load_textdomain($domain, $path . '/' . $mofile)) {
            return $loaded;
        } else {
            $mofile = WP_LANG_DIR . '/plugins/' . $mofile;
            return load_textdomain($domain, $mofile);
        }
        $l10n[$domain] = $mo_orig;
    }
    return false;
}
 /**
  * Load languages and a bit of paranoia
  */
 function action_init()
 {
     load_plugin_textdomain('frontend-uploader', false, dirname(plugin_basename(__FILE__)) . '/languages/');
     // Hooking to wp_ajax
     add_action('wp_ajax_approve_ugc', array($this, 'approve_media'));
     add_action('wp_ajax_approve_ugc_post', array($this, 'approve_post'));
     add_action('wp_ajax_delete_ugc', array($this, 'delete_post'));
     add_action('wp_ajax_upload_ugc', array($this, 'upload_content'));
     add_action('wp_ajax_nopriv_upload_ugc', array($this, 'upload_content'));
     // Adding media submenu
     add_action('admin_menu', array($this, 'add_menu_items'));
     // Currently supported shortcodes
     add_shortcode('fu-upload-form', array($this, 'upload_form'));
     add_shortcode('fu-upload-response', array($this, 'upload_response_shortcode'));
     // Since 4.01 we need to explicitly disable texturizing of shortcode's inner content
     add_filter('no_texturize_shortcodes', array($this, 'filter_no_texturize_shortcodes'));
     // Static assets
     add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
     // Unautop the shortcode
     add_filter('the_content', 'shortcode_unautop', 100);
     // Hiding not approved attachments from Media Gallery
     // @since core 3.5-beta-1
     add_filter('posts_where', array($this, 'filter_posts_where'));
     $this->allowed_mime_types = $this->_get_mime_types();
     // Configuration filter to change manage permissions
     $this->manage_permissions = apply_filters('fu_manage_permissions', 'edit_posts');
     // Debug mode filter
     $this->is_debug = (bool) apply_filters('fu_is_debug', defined('WP_DEBUG') && WP_DEBUG);
     add_filter('upload_mimes', array($this, '_get_mime_types'), 999);
     // Maybe enable Akismet protection
     $this->_enable_akismet_protection();
 }
Example #24
0
 function __construct()
 {
     if (!defined('PREMISE_VERSION')) {
         define('PREMISE_VERSION', '2.2.1');
         define('PREMISE_SETTINGS_FIELD', $this->_metakey_Settings);
         define('PREMISE_DIR', plugin_dir_path(__FILE__));
         define('PREMISE_URL', plugin_dir_url(__FILE__));
         define('PREMISE_BASENAME', plugin_basename(__FILE__));
         define('PREMISE_LIB_DIR', PREMISE_DIR . 'lib/');
         define('PREMISE_THEMES_DIR', PREMISE_DIR . 'themes/');
         define('PREMISE_THEMES_URL', PREMISE_URL . 'themes/');
         define('PREMISE_VIEWS_DIR', PREMISE_DIR . 'views/');
         define('PREMISE_RESOURCES_URL', PREMISE_URL . 'resources/');
         define('PREMISE_POST_TYPE', 'landing_page');
         define('PREMISE_MEMBER_DIR', PREMISE_DIR . 'member-access/');
         define('PREMISE_MEMBER_INCLUDES_DIR', PREMISE_MEMBER_DIR . 'includes/');
     }
     $settings = $this->get_settings();
     if (!empty($settings['main']['member-access']) && '1' == $settings['main']['member-access']) {
         require_once PREMISE_LIB_DIR . 'functions.php';
         require_once PREMISE_LIB_DIR . 'class-admin.php';
         require_once PREMISE_MEMBER_DIR . 'member-access.php';
     }
     $this->_use_premise_theme = empty($settings['main']['theme-support']) || $settings['main']['theme-support'] != '1';
     add_filter('generate_rewrite_rules', array($this, 'generate_rewrite_rules'));
     add_action('setup_theme', array($this, 'register_post_type'));
     if (!is_admin()) {
         add_action('setup_theme', array($this, 'setup_theme'), 11);
     }
     add_action('init', array($this, 'init'));
     add_action('update_option_' . $this->_option_DesignSettings, array($this, 'create_stylesheets'), 11, 2);
     add_filter('post_type_link', array($this, 'post_type_link'), 10, 3);
     load_plugin_textdomain('premise', false, '/premise/languages/');
 }
Example #25
0
 function Acf()
 {
     // vars
     $this->path = plugin_dir_path(__FILE__);
     $this->dir = plugins_url('', __FILE__);
     $this->version = '3.5.0';
     $this->upgrade_version = '3.4.1';
     // this is the latest version which requires an upgrade
     $this->cache = array();
     // basic array cache to hold data throughout the page load
     // set text domain
     load_plugin_textdomain('acf', false, basename(dirname(__FILE__)) . '/lang');
     // controllers
     $this->setup_controllers();
     // actions
     add_action('init', array($this, 'init'));
     add_filter('post_updated_messages', array($this, 'post_updated_messages'));
     add_filter('manage_edit-acf_columns', array($this, 'acf_columns_filter'));
     add_action('admin_menu', array($this, 'admin_menu'));
     add_action('admin_head', array($this, 'admin_head'));
     add_action('acf_save_post', array($this, 'acf_save_post'), 10);
     // save post, called from many places (api, input, everything, options)
     // ajax
     add_action('wp_ajax_get_input_metabox_ids', array($this, 'get_input_metabox_ids'));
     return true;
 }
Example #26
0
 function __construct()
 {
     $this->load_default_options();
     // register text domain
     load_plugin_textdomain('yarpp', false, dirname(plugin_basename(__FILE__)) . '/lang');
     // load cache object
     require_once YARPP_DIR . '/class-cache.php';
     require_once YARPP_DIR . '/cache-' . YARPP_CACHE_TYPE . '.php';
     $this->storage_class = $yarpp_storage_class;
     $this->cache = new $this->storage_class($this);
     $this->cache_bypass = new YARPP_Cache_Bypass($this);
     register_activation_hook(__FILE__, array($this, 'activate'));
     // update cache on save
     add_action('save_post', array($this->cache, 'save_post'));
     // new in 3.2: update cache on delete
     add_action('delete_post', array($this->cache, 'delete_post'));
     // new in 3.2.1: handle post_status transitions
     add_action('transition_post_status', array($this->cache, 'transition_post_status'), 10, 3);
     // automatic display hooks:
     add_filter('the_content', array($this, 'the_content'), 1200);
     add_filter('the_content_rss', array($this, 'the_content_rss'), 600);
     add_filter('the_excerpt_rss', array($this, 'the_excerpt_rss'), 600);
     if (isset($_REQUEST['yarpp_debug'])) {
         $this->debug = true;
     }
     // new in 3.4: only load UI if we're in the admin
     if (is_admin()) {
         require_once YARPP_DIR . '/class-admin.php';
         $this->admin = new YARPP_Admin($this);
     }
 }
Example #27
0
 /**
  * Plugin init
  */
 public static function init()
 {
     // Make plugin available for translation
     load_plugin_textdomain('su', false, dirname(plugin_basename(SU_PLUGIN_FILE)) . '/languages/');
     // Setup admin class
     $admin = new Sunrise4(array('file' => SU_PLUGIN_FILE, 'slug' => 'su', 'prefix' => 'su_option_', 'textdomain' => 'su'));
     // Top-level menu
     $admin->add_menu(array('page_title' => __('Settings', 'su') . ' &lsaquo; ' . __('Shortcodes Ultimate', 'su'), 'menu_title' => apply_filters('su/menu/shortcodes', __('Shortcodes', 'su')), 'capability' => 'manage_options', 'slug' => 'shortcodes-ultimate', 'icon_url' => 'dashicons-editor-code', 'position' => '80.11', 'options' => array(array('type' => 'opentab', 'name' => __('About', 'su')), array('type' => 'about', 'callback' => array('Su_Admin_Views', 'about')), array('type' => 'closetab', 'actions' => false), array('type' => 'opentab', 'name' => __('Settings', 'su')), array('type' => 'checkbox', 'id' => 'custom-formatting', 'name' => __('Custom formatting', 'su'), 'desc' => __('Disable this option if you have some problems with other plugins or content formatting', 'su') . '<br /><a href="http://gndev.info/kb/custom-formatting/" target="_blank">' . __('Documentation article', 'su') . '</a>', 'default' => 'on', 'label' => __('Enabled', 'su')), array('type' => 'checkbox', 'id' => 'skip', 'name' => __('Skip default values', 'su'), 'desc' => __('Enable this option and the generator will insert a shortcode without default attribute values that you have not changed. As a result, the generated code will be shorter.', 'su'), 'default' => 'on', 'label' => __('Enabled', 'su')), array('type' => 'text', 'id' => 'prefix', 'name' => __('Shortcodes prefix', 'su'), 'desc' => sprintf(__('This prefix will be added to all shortcodes by this plugin. For example, type here %s and you\'ll get shortcodes like %s and %s. Please keep in mind: this option is not affects your already inserted shortcodes and if you\'ll change this value your old shortcodes will be broken', 'su'), '<code>su_</code>', '<code>[su_button]</code>', '<code>[su_column]</code>'), 'default' => 'su_'), array('type' => 'text', 'id' => 'skin', 'name' => __('Skin', 'su'), 'desc' => __('Choose global skin for shortcodes', 'su'), 'default' => 'default'), array('type' => 'closetab'), array('type' => 'opentab', 'name' => __('Custom CSS', 'su')), array('type' => 'custom_css', 'id' => 'custom-css', 'default' => '', 'callback' => array('Su_Admin_Views', 'custom_css')), array('type' => 'closetab'))));
     // Settings submenu
     $admin->add_submenu(array('parent_slug' => 'shortcodes-ultimate', 'page_title' => __('Settings', 'su') . ' &lsaquo; ' . __('Shortcodes Ultimate', 'su'), 'menu_title' => apply_filters('su/menu/settings', __('Settings', 'su')), 'capability' => 'manage_options', 'slug' => 'shortcodes-ultimate', 'options' => array()));
     // Examples submenu
     $admin->add_submenu(array('parent_slug' => 'shortcodes-ultimate', 'page_title' => __('Examples', 'su') . ' &lsaquo; ' . __('Shortcodes Ultimate', 'su'), 'menu_title' => apply_filters('su/menu/examples', __('Examples', 'su')), 'capability' => 'edit_others_posts', 'slug' => 'shortcodes-ultimate-examples', 'options' => array(array('type' => 'examples', 'callback' => array('Su_Admin_Views', 'examples')))));
     // Cheatsheet submenu
     $admin->add_submenu(array('parent_slug' => 'shortcodes-ultimate', 'page_title' => __('Cheatsheet', 'su') . ' &lsaquo; ' . __('Shortcodes Ultimate', 'su'), 'menu_title' => apply_filters('su/menu/examples', __('Cheatsheet', 'su')), 'capability' => 'edit_others_posts', 'slug' => 'shortcodes-ultimate-cheatsheet', 'options' => array(array('type' => 'cheatsheet', 'callback' => array('Su_Admin_Views', 'cheatsheet')))));
     // Add-ons submenu
     $admin->add_submenu(array('parent_slug' => 'shortcodes-ultimate', 'page_title' => __('Add-ons', 'su') . ' &lsaquo; ' . __('Shortcodes Ultimate', 'su'), 'menu_title' => apply_filters('su/menu/addons', __('Add-ons', 'su')), 'capability' => 'edit_others_posts', 'slug' => 'shortcodes-ultimate-addons', 'options' => array(array('type' => 'addons', 'callback' => array('Su_Admin_Views', 'addons')))));
     // Translate plugin meta
     __('Shortcodes Ultimate', 'su');
     __('Vladimir Anokhin', 'su');
     __('Supercharge your WordPress theme with mega pack of shortcodes', 'su');
     // Add plugin actions links
     add_filter('plugin_action_links_' . plugin_basename(SU_PLUGIN_FILE), array(__CLASS__, 'actions_links'), -10);
     // Add plugin meta links
     add_filter('plugin_row_meta', array(__CLASS__, 'meta_links'), 10, 2);
     // Shortcodes Ultimate is ready
     do_action('su/init');
 }
Example #28
0
function sdm_plugins_loaded_tasks()
{
    //Load language
    load_plugin_textdomain('simple-download-monitor', false, dirname(plugin_basename(__FILE__)) . '/langs/');
    //Handle db upgrade stuff
    sdm_db_update_check();
}
function limit_login_setup()
{
    load_plugin_textdomain('limit-login-attempts', false, dirname(plugin_basename(__FILE__)));
    limit_login_setup_options();
    /* Filters and actions */
    add_action('wp_login_failed', 'limit_login_failed');
    if (limit_login_option('cookies')) {
        limit_login_handle_cookies();
        add_action('auth_cookie_bad_username', 'limit_login_failed_cookie');
        global $wp_version;
        if (version_compare($wp_version, '3.0', '>=')) {
            add_action('auth_cookie_bad_hash', 'limit_login_failed_cookie_hash');
            add_action('auth_cookie_valid', 'limit_login_valid_cookie', 10, 2);
        } else {
            add_action('auth_cookie_bad_hash', 'limit_login_failed_cookie');
        }
    }
    add_filter('wp_authenticate_user', 'limit_login_wp_authenticate_user', 99999, 2);
    add_filter('shake_error_codes', 'limit_login_failure_shake');
    add_action('login_head', 'limit_login_add_error_message');
    add_action('login_errors', 'limit_login_fixup_error_messages');
    add_action('admin_menu', 'limit_login_admin_menu');
    /*
     * This action should really be changed to the 'authenticate' filter as
     * it will probably be deprecated. That is however only available in
     * later versions of WP.
     */
    add_action('wp_authenticate', 'limit_login_track_credentials', 10, 2);
}
 /**
  * Load the plugin text domain for translation.
  *
  * @since 1.7.0
  */
 public function load_plugin_textdomain()
 {
     $domain = 'optionsframework';
     $locale = apply_filters('plugin_locale', get_locale(), $domain);
     load_textdomain($domain, trailingslashit(WP_LANG_DIR) . $domain . '/' . $domain . '-' . $locale . '.mo');
     load_plugin_textdomain($domain, FALSE, basename(dirname(__FILE__)) . '/languages');
 }