Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
Clean up after RCSearch script. #168
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrommen committed Jan 19, 2016
1 parent 19270fd commit 7e5486a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/inc/nav-menu/Mlp_Language_Nav_Menu_Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function load_script( $hook ) {

wp_localize_script( 'mlp-admin', 'mlpNavMenusSettings', array(
'action' => $this->handle,
'ajaxURL' => admin_url( 'admin-ajax.php' ),
'ajaxURL' => esc_url( admin_url( 'admin-ajax.php', 'relative' ) ),
'metaBoxID' => $this->handle,
'nonce' => wp_create_nonce( $this->nonce->get_action() ),
'nonceName' => $this->nonce->get_name(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ public function __construct(
$this->data = $data;
$this->updater = $updater;
$this->search_input_id = "mlp_post_search_$this->remote_blog_id";

add_action(
"admin_footer-" . $GLOBALS[ 'hook_suffix' ],
array ( $this, 'print_jquery' )
);
}

public function render() {
Expand Down Expand Up @@ -169,7 +164,7 @@ private function localize_script() {

wp_localize_script( 'mlp-admin', 'mlpRelationshipControlSettings', array(
'ajaxURL' => esc_url( admin_url( 'admin-ajax.php', 'relative' ) ),
'L10n' => array(
'L10n' => array(
'noPostSelected' => __( 'Please select a post.', 'multilingual-press' ),
'unsavedRelationships' => __(
'You have unsaved changes in your post relationships. The changes you made will be lost if you navigate away from this page.',
Expand All @@ -179,21 +174,6 @@ private function localize_script() {
) );
}

public function print_jquery() {

return;
?>
<script>
jQuery('.mlp_search_field').mlp_search({
action: 'mlp_rsc_search',
remote_blog_id: <?php print $this->remote_blog_id; ?>,
result_container: '#mlp_search_results_<?php print $this->remote_blog_id; ?>',
search_field: '#<?php print $this->search_input_id; ?>'
});
</script>
<?php
}

/**
* @param string $id
* @return string
Expand Down

0 comments on commit 7e5486a

Please sign in to comment.