prefix . 'huge_it_reslider_sliders', true );
define( "RESLIDE_TABLE_SLIDES", $wpdb->prefix . 'huge_it_reslider_slides', true );
/**
* hooks
*/
add_action( 'media_buttons_context', 'reslide_add_media_button' );
add_action( 'admin_footer', 'reslide_media_button_popup' );
add_action( "wp_loaded", "reslide_loaded_slider_callback" );
add_action( "wp_loaded", "reslide_duplicate_slider" );
add_action( 'admin_menu', 'reslide_slider_options_panels' );
add_action( 'admin_enqueue_scripts', 'reslide_admin_scripts' );
add_action( 'wp_enqueue_scripts', 'reslide_frontend_scripts' );
add_action( 'wp_ajax_reslide_actions', 'reslide_ajax_action_callback' );
add_action( 'wp_ajax_nopriv_reslide_actions', 'reslide_ajax_action_callback' );
add_action('widgets_init', 'hugeit_reslider_register_widget' );
/**
* shortcode hooks
*/
add_shortcode( 'R-slider', 'reslide_resliders_shortcode' );
/**
* activation hook
*/
register_activation_hook( __FILE__, 'reslide_slider_activate');
/**
* @param $_str
*
* @return mixed|string
*/
function reslide_text_sanitize($_str ) {
$d = html_entity_decode( $_str );
$d = wp_kses_stripslashes( $d );
$d = str_replace( "\n", "
", $d );
$d = stripslashes( $d );
return $d;
}
/**
* media button for editor
*/
function reslide_add_media_button($context) {
$container_id = 'reslide_slider_insert_popup';
$title = __("Insert Responsive Slider","reslide");
$context .= 'Add Slider';
return $context;
}
include_once("widget.php");
function hugeit_reslider_register_widget() {
register_widget('Hugeit_ReSlider_Widget');
}
/**
* popup for media button in editor
*/
function reslide_media_button_popup() {
global $wpdb;
$screen = get_current_screen();
$screen_id = $screen->id;
$s = 1;
$table = RESLIDE_TABLE_SLIDERS;
$row = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $table WHERE %d", $s ) );
?>