/**
  * Enqueue install assets
  *
  * @since  1.0.0
  * @access public
  */
 public function enqueue_install_assets()
 {
     global $wp_scripts;
     wp_enqueue_style('rp4wp-install-css', plugins_url('/assets/css/install.css', RP4WP::get_plugin_file()), array(), RP4WP::VERSION);
     wp_enqueue_script('rp4wp-install-js', plugins_url('/assets/js/install' . (!SCRIPT_DEBUG ? '.min' : '') . '.js', RP4WP::get_plugin_file()), array('jquery', 'jquery-ui-core', 'jquery-ui-progressbar'), RP4WP::VERSION);
     wp_enqueue_script('rp4wp-tipped', plugins_url('/assets/js/lib/tipped.js', RP4WP::get_plugin_file()), array(), RP4WP::VERSION);
     // Make JavaScript strings translatable
     wp_localize_script('rp4wp-install-js', 'rp4wp_js', RP4WP_Javascript_Strings::get());
     wp_enqueue_style('jquery-ui-smoothness', "https://ajax.googleapis.com/ajax/libs/jqueryui/" . $wp_scripts->query('jquery-ui-core')->ver . "/themes/smoothness/jquery-ui.css", false, null);
 }
 public function run()
 {
     global $pagenow;
     // Post screen
     if ($pagenow == 'post.php' || $pagenow == 'post-new.php') {
         // Load PL JS
         wp_enqueue_script('rp4wp_edit_post_js', plugins_url('/assets/js/edit-post' . (!SCRIPT_DEBUG ? '.min' : '') . '.js', RP4WP::get_plugin_file()), array('jquery', 'jquery-ui-sortable'));
         // Make JavaScript strings translatable
         wp_localize_script('rp4wp_edit_post_js', 'rp4wp_js', RP4WP_Javascript_Strings::get());
         // CSS
         wp_enqueue_style('rp4wp_edit_post_css', plugins_url('/assets/css/edit-post.css', RP4WP::get_plugin_file()));
     }
 }
 public function run()
 {
     global $pagenow;
     // Post screen
     if ($pagenow == 'post.php' || $pagenow == 'post-new.php') {
         // Load PL JS
         wp_enqueue_script('rp4wp_edit_post_js', plugins_url('/assets/js/edit-post' . (!SCRIPT_DEBUG ? '.min' : '') . '.js', RP4WP::get_plugin_file()), array('jquery', 'jquery-ui-sortable'), RP4WP::VERSION);
         // Make JavaScript strings translatable
         wp_localize_script('rp4wp_edit_post_js', 'rp4wp_js', RP4WP_Javascript_Strings::get());
         // CSS
         wp_enqueue_style('rp4wp_edit_post_css', plugins_url('/assets/css/edit-post.css', RP4WP::get_plugin_file()), array(), RP4WP::VERSION);
     }
     if ('options-general.php' == $pagenow && isset($_GET['page']) && $_GET['page'] === 'rp4wp') {
         // Main settings JS
         wp_enqueue_script('rp4wp_settings_js', plugins_url('/assets/js/settings' . (!SCRIPT_DEBUG ? '.min' : '') . '.js', RP4WP::get_plugin_file()), array('jquery'), RP4WP::VERSION);
     }
 }
 public function run()
 {
     global $pagenow;
     // Post screen
     if ($pagenow == 'post.php' || $pagenow == 'post-new.php') {
         // Load PL JS
         wp_enqueue_script('rp4wp_edit_post_js', plugins_url('/assets/js/edit-post' . (!SCRIPT_DEBUG ? '.min' : '') . '.js', RP4WP::get_plugin_file()), array('jquery', 'jquery-ui-sortable'), RP4WP::VERSION);
         // Make JavaScript strings translatable
         wp_localize_script('rp4wp_edit_post_js', 'rp4wp_js', RP4WP_Javascript_Strings::get());
         // CSS
         wp_enqueue_style('rp4wp_edit_post_css', plugins_url('/assets/css/edit-post.css', RP4WP::get_plugin_file()), array(), RP4WP::VERSION);
     }
     if ('options-general.php' == $pagenow && isset($_GET['page']) && 0 === strpos($_GET['page'], 'rp4wp_')) {
         // Configurator
         if ('rp4wp_configurator' === $_GET['page']) {
             // Load the configurator file
             /*
             wp_enqueue_script(
             	'rp4wp_lodash',
             	plugins_url( '/assets/js/configurator/lodash.min.js', RP4WP::get_plugin_file() ),
             	array( 'jquery' ),
             	RP4WP::VERSION
             );
             */
             wp_enqueue_script('jquery-ui-core');
             wp_enqueue_script('jquery-ui-widget');
             wp_enqueue_script('jquery-ui-mouse');
             wp_enqueue_script('jquery-ui-draggable');
             wp_enqueue_script('jquery-ui-resizable');
             // Load the configurator file
             wp_enqueue_script('rp4wp_configurator_js', plugins_url('/assets/js/configurator/configurator.min.js', RP4WP::get_plugin_file()), array('jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-draggable', 'jquery-ui-resizable'), RP4WP::VERSION);
             // Configurator CSS
             wp_enqueue_style('rp4wp_configurator_css', plugins_url('/assets/css/configurator.css', RP4WP::get_plugin_file()), array(), RP4WP::VERSION);
         }
         // Weights JS
         if ('rp4wp_weights' === $_GET['page']) {
             wp_enqueue_script('rp4wp_settings_weight_js', plugins_url('/assets/js/settings-weight' . (!SCRIPT_DEBUG ? '.min' : '') . '.js', RP4WP::get_plugin_file()), array('jquery'), RP4WP::VERSION);
         }
         // Main settings JS
         wp_enqueue_script('rp4wp_settings_js', plugins_url('/assets/js/settings' . (!SCRIPT_DEBUG ? '.min' : '') . '.js', RP4WP::get_plugin_file()), array('jquery'), RP4WP::VERSION);
     }
 }
 private static function fill()
 {
     self::$value = array('confirm_delete_related_post' => __('Are you sure you want to delete this related post?', 'related-posts-for-wp'));
 }
 private static function fill()
 {
     $js_strings = array('confirm_delete_related_post' => __('Are you sure you want to delete this related post?', 'related-posts-for-wp'), 'lbl_delete' => __('Delete this post type', 'related-posts-for-wp'), 'lbl_relink' => __('Relink related posts', 'related-posts-for-wp'), 'lbl_reinstall' => __('Reinstall this post type', 'related-posts-for-wp'), 'lbl_save' => __('Save post type', 'related-posts-for-wp'), 'lbl_add_pt' => __('Add post type', 'related-posts-for-wp'));
     $ptm = new RP4WP_Post_Type_Manager();
     self::$value = array_merge($js_strings, $ptm->get_available_post_types());
 }