Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make button texts and urls translatable with WPML. #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions ssb-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ public function __construct() {
// Migration
add_action('init', array($this, 'ssb_icons_migration'));

// User interfaces object
$this->ui = new ssb_ui;

// Pull stored data
$this->settings = get_option( 'ssb_settings' );
// Initialize plugin
add_action( 'init', array( $this, 'ssb_init' ) );

// Plugin text domain
add_action( 'init', array( $this, 'ssb_textdomain' ) );
Expand All @@ -42,9 +39,6 @@ public function __construct() {
// Admin notices
add_action( 'admin_notices', array( $this, 'ssb_admin_notices' ) );

// Icons UI
add_action( 'wp_footer', array( $this->ui, 'icons' ) );

add_action( 'wp_enqueue_scripts', array( $this, 'ssb_ui_assets' ) );


Expand All @@ -65,6 +59,24 @@ public function ssb_textdomain() {
}


/**
* Initialize settings and ui
*
*/
public function ssb_init() {

// User interfaces object
$this->ui = new ssb_ui;

// Pull stored data
$this->settings = get_option( 'ssb_settings' );

// Icons UI
add_action( 'wp_footer', array( $this, 'icons' ) );

}


/**
* Register settings
*
Expand Down
12 changes: 12 additions & 0 deletions wpml-config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<wpml-config>
<admin-texts>
<key name="ssb_buttons">
<key name="btns">
<key name="*">
<key name="btn_text" />
<key name="btn_link" />
</key>
</key>
</key>
</admin-texts>
</wpml-config>