parametrs; $parametrs_array = array( 'fitToScreen' => (int) get_option('jqlb_resize_on_demand'), 'resizeSpeed' => (int) get_option('jqlb_resize_speed'), 'displayDownloadLink' => (int) get_option('jqlb_show_download'), 'navbarOnTop' => (int) get_option('jqlb_navbarOnTop'), 'loopImages' => (int) get_option('jqlb_loopImages'), 'resizeCenter' => (int) get_option('jqlb_resizeCenter'), 'marginSize' => (int) get_option('jqlb_margin_size'), 'linkTarget' => esc_js( get_option('jqlb_link_target') ), 'help' => esc_js( get_option('jqlb_help_text') ), 'prevLinkTitle' => esc_js( $wp_lightbox_2->parametrs->get_design_settings['jqlb_previous_image_title'] ), 'nextLinkTitle' => esc_js( $wp_lightbox_2->parametrs->get_design_settings['jqlb_next_image_title'] ), 'closeTitle' => esc_js( $wp_lightbox_2->parametrs->get_design_settings['jqlb_close_image_title'] ), 'prevLinkText' => __( '« Previous', 'jqlb' ), 'nextLinkText' => __( 'Next »', 'jqlb' ), 'image' => __( 'Image ', 'jqlb' ), 'of' => __( ' of ', 'jqlb' ), 'download' => __( 'Download', 'jqlb' ) ); foreach ( $wp_lightbox_2->parametrs->get_design_settings as $key => $value ) { $parametrs_array[ $key ] = $value; } wp_localize_script( 'wp-jquery-lightbox', 'JQLBSettings', $parametrs_array ); } function jqlb_lightbox_comment( $comment = '' ) { $comment = str_replace('rel=\'external nofollow\'','', $comment); $comment = str_replace('rel=\'nofollow\'','', $comment); $comment = str_replace('rel="external nofollow"','', $comment); $comment = str_replace('rel="nofollow"','', $comment); return jqlb_autoexpand_rel_wlightbox($comment); } function jqlb_autoexpand_rel_wlightbox( $content = '' ) { if ( 1 === (int) get_option('jqlb_automate') ) { global $post; $id = ($post->ID) ? $post->ID : -1; $content = jqlb_do_regexp($content, $id); //legacy regex function when images don't have rel tags $content = wplbtwo_do_regexp($content, $id); } return $content; } function jqlb_apply_lightbox($content, $id = -1) { if(!isset($id) || $id === -1) { $id = time() . wp_rand( 0, 32768 ); } return jqlb_do_regexp($content, $id); } /* automatically insert rel="lightbox[nameofpost]" to every image with no manual work. if there are already rel="lightbox[something]" attributes, they are not clobbered. Michael Tyson, you are a regular expressions god! - https://atastypixel.com */ function jqlb_do_regexp($content, $id) { $pattern = "/(]*?rel=['\"]lightbox.*)(?![^>]*?rel=.*)[^>]*?href=['\"][^'\"]+?\.(?:bmp|gif|jpg|jpeg|png)\?{0,1}\S{0,}['\"][^\>]*)>/i"; $replacement = '$1 rel="lightbox[' . esc_attr( $id ) . ']">'; return preg_replace($pattern, $replacement, $content); } /** * Automatically includes 'lightbox[$id]' into rel tag of images. * * @param $content * @param $id * * @return mixed * * @since 3.0.6.2 */ function wplbtwo_do_regexp($content, $id) { $pattern = "/(]*?rel=['\"]lightbox.*)[^>]*?href=['\"][^'\"]+?\.(?:bmp|gif|jpg|jpeg|png)\?{0,1}\S{0,}['\"][^\>]*)(rel=['\"])(.*?)>/i"; $replacement = '$1 $2lightbox[' . esc_attr( $id ) . '] $3>'; return preg_replace($pattern, $replacement, $content); } function jqlb_bool_intval( $v = 0 ) { return ( 1 === (int) $v ) ? '1' : '0'; } function jqlb_pos_intval($v) { return abs(intval($v)); } function jplb_help_kses($t) { return wp_kses_post($t); } function jqlb_options_panel() { if ( ! function_exists( 'current_user_can' ) || ! current_user_can( 'manage_options' ) ) { die(__('Cheatin’ uh?', 'jqlb')); } ?>

WP Lightbox 2

/>
/>
/>
/>
/>

The documentation files are missing! Try downloading and re-installing this lightbox plugin.

'; } echo $text; ?>
1) { $opacity = 1.0; } $output = 'rgba('.implode(",",$rgb).','.$opacity.')'; } else { $output = 'rgb('.implode(",",$rgb).')'; } return $output; } class wp_lightbox_2{ private $plugin_url; private $plugin_path; private $version; public $options; public $parametrs; public function __construct() { $this->plugin_url = trailingslashit( plugins_url('', __FILE__ ) ); $this->plugin_path = trailingslashit( plugin_dir_path( __FILE__ ) ); $this->version = 1.0; require_once $this->plugin_path . 'includes/install_database.php'; $this->parametrs = new wp_lightbox2_database_params(); $this->call_base_filters(); $this->create_admin_menu(); } private function create_admin_menu() { require_once $this->plugin_path.'admin/admin_menu.php'; $admin_menu = new wp_lightbox_admin_menu( array( 'plugin_url' => $this->plugin_url, 'plugin_path' => $this->plugin_path, 'databese_parametrs' => $this->parametrs ) ); add_action('admin_menu', array( $admin_menu, 'create_menu' ) ); } public function registr_requeried_scripts() { wp_register_script('angularejs',$this->plugin_url . 'admin/scripts/angular.min.js'); wp_register_style('admin_style_wp_lightbox',$this->plugin_url . 'admin/styles/admin_themplate.css'); wp_register_style('jquery-ui-style',$this->plugin_url . 'admin/styles/jquery-ui.css'); } public function enqueue_requeried_scripts() { wp_enqueue_style("jquery-ui-style"); wp_enqueue_script("jquery-ui-slider"); } public function call_base_filters() { add_action( 'init', array($this,'registr_requeried_scripts') ); add_action( 'admin_head', array($this,'enqueue_requeried_scripts') ); } } $wp_lightbox_2 = new wp_lightbox_2();