This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Validates the widget title and returns it only if it contains non-whitespace characters. | |
| * | |
| * This filter checks if the title is not empty and contains at least one | |
| * character that is not a space (using the \S regex pattern). If the title | |
| * consists only of whitespace, it returns an empty string to prevent | |
| * empty titles from rendering. | |
| * | |
| * @param string $title The original widget title. | |
| * @return string The original title if it has content, otherwise an empty string. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Customizes W3 Total Cache admin interface for non-super admin users in multisite WordPress environments. | |
| * | |
| * This code provides three main functionalities: | |
| * 1. Customizes access to W3 Total Cache admin bar menu items by defining specific user capabilities | |
| * for each menu item using the 'w3tc_capability_admin_bar' and 'w3tc_capability_admin_bar_*' filters. | |
| * In multisite, site administrators with 'manage_options' can access the main W3TC menu and certain sub-menus, | |
| * while restricted items (e.g., 'Purge All Caches', 'General Settings') require 'setup_network' (super admin). | |
| * In single-site environments, the default capability ('manage_options') is retained for all menu items. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery(document).ready(function ($) { | |
| var slider = $('.range-slider'), | |
| range = $('.range-slider__range'), | |
| value = $('.range-slider__value'); | |
| slider.each(function(){ | |
| value.each(function(){ | |
| var value = $(this).prev().attr('value'); | |
| $(this).html(value + 'px'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Removes unwanted keys from JSON string | |
| * @param string $response | |
| * @param array $exclude | |
| * @return string | |
| * | |
| * | |
| */ | |
| function ls_remove_unwanted_from_json($response , $exclude) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * | |
| * @param array $form_options | |
| * @param type $widget | |
| * @return array | |
| */ | |
| function ls_extend_sow_slider_form_add_hide_frame($form_options, $widget) { | |
| $form_options['frames']['fields']['hide_frame'] = array('type' => 'checkbox', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Add the user id column after the user's checkbox | |
| * @param array $array | |
| * @param int $index | |
| * @param array $insert | |
| * @return array | |
| */ | |
| function ls_array_insert($array, $index, $insert) { | |
| return array_slice($array, 0, $index, true) + $insert + array_slice($array, $index, count($array) - $index, true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Add the user id column after the user's checkbox | |
| * @param array $array | |
| * @param int $index | |
| * @param array $insert | |
| * @return array | |
| */ | |
| function ls_array_insert($array, $index, $insert) { | |
| return array_slice($array, 0, $index, true) + $insert + array_slice($array, $index, count($array) - $index, true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Filter the WP Users List Table views to override 'bp-signups' with 'new-user-approve-admin'. | |
| * | |
| * | |
| * @param array $views WP List Table views. | |
| * @return array The views with the signup view replaced with 'new-user-approve-admin' link. | |
| * @author lenasterg | |
| */ | |
| function ls_change_signup_filter_view_to_new_user_approve_admin($views = array()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once( dirname( __FILE__ ) . '/wp-load.php' ); | |
| header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true ); | |
| /* | |
| Plugin Name: Export Blogroll in OPML Format | |
| Plugin URI: http://w3.ipublicis.com/ | |
| Description: Exports your public blogroll in OPML format to a file on blog root. | |
| Version: 1.0 | |
| Author: Lopo Lencastre de Almeida - iPublicis.com |
NewerOlder