<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$" />
+<module type="WEB_MODULE" version="4">
+ <component name="NewModuleRootManager">
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/cesaretleonie.fr/wp-content/plugins/wp-mail-smtp/src" isTestSource="false" packagePrefix="WPMailSMTP" />
+ <sourceFolder url="file://$MODULE_DIR$/cesaretleonie.fr/wp-includes" isTestSource="false" packagePrefix="PHPMailer" />
+ <sourceFolder url="file://$MODULE_DIR$/mdryvescouzy.com/wp-content/mu-plugins/cube/src" isTestSource="false" packagePrefix="Cube" />
+ <sourceFolder url="file://$MODULE_DIR$/mdryvescouzy.com/wp-content/plugins/wp-mail-smtp/src" isTestSource="false" packagePrefix="WPMailSMTP" />
+ <sourceFolder url="file://$MODULE_DIR$/mdryvescouzy.com/wp-includes" isTestSource="false" packagePrefix="PHPMailer" />
+ <sourceFolder url="file://$MODULE_DIR$/pavillonmadeleine.fr/wp-content/plugins/wp-mail-smtp/src" isTestSource="false" packagePrefix="WPMailSMTP" />
+ <sourceFolder url="file://$MODULE_DIR$/pavillonmadeleine.fr/wp-includes" isTestSource="false" packagePrefix="PHPMailer" />
+ </content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
define( 'WP_POST_REVISIONS', 5 );
-define( 'AUTOMATIC_UPDATER_DISABLED', true );
-
/* C'est tout, ne touchez pas à ce qui suit ! Bon blogging ! */
/** Chemin absolu vers le dossier de WordPress. */
include_once (CHERRY_PLUGIN_DIR . 'includes/widgets/register-widgets.php');
// Exclude widget manager for customizer
- global $wp_customize;
+ /*global $wp_customize;
if ( !isset( $wp_customize ) ) {
include_once (CHERRY_PLUGIN_DIR . 'includes/widgets/widgets-manager.php');
- }
+ }*/
//-----------------------------------------------------------------------------
// Maintenance Mode
$site_uri = $_SERVER['PHP_SELF'];
} else {
$site_uri = $_SERVER['REQUEST_URI'];
- $https = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
+ $https = empty($_SERVER["HTTPS"]) ? '' : (($_SERVER["HTTPS"] == "on") ? "s" : "");
$site_protocol = strtolower($_SERVER["SERVER_PROTOCOL"]);
$site_protocol = substr($site_protocol,0,strpos($site_protocol,"/")).$https;
$site_port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
//------------------------------------------------------
if ( !function_exists('my_string_limit_words') ) {
function my_string_limit_words($string, $word_limit) {
- if ( empty($string{0}) )
- return;
+ if ( empty($string[0]) ) {
+ return;
+ }
$words = explode( ' ', $string, ( $word_limit + 1 ) );
if ( count( $words ) > $word_limit ) {
}\r
\r
// post title\r
- if ( !empty($post_title{0}) ) {\r
+ if ( !empty($post_title[0]) ) {\r
$output .= '<h5><a href="' . $post_permalink . '" title="' . $post_title_attr . '">';\r
$output .= $post_title;\r
$output .= '</a></h5>';\r
}\r
\r
// post excerpt\r
- if ( !empty($excerpt{0}) ) {\r
+ if ( !empty($excerpt[0]) ) {\r
$output .= $excerpt_count > 0 ? '<p class="excerpt">' . wp_trim_words( $excerpt, $excerpt_count ) . '</p>' : '';\r
}\r
\r
$itemcount = 0;\r
\r
$output = '<div class="carousel-wrap ' . $custom_class . '">';\r
- if ( !empty( $title{0} ) ) {\r
+ if ( !empty( $title[0] ) ) {\r
$output .= '<h2>' . esc_html( $title ) . '</h2>';\r
}\r
$output .= '<div id="carousel-' . $carousel_uniqid . '" class="es-carousel-wrapper">';\r
}\r
\r
// post title\r
- if ( !empty($post_title{0}) ) {\r
+ if ( !empty($post_title[0]) ) {\r
$output .= '<h5><a href="' . $post_permalink . '" title="' . $post_title_attr . '">';\r
$output .= $post_title;\r
$output .= '</a></h5>';\r
}\r
\r
// post excerpt\r
- if ( !empty($excerpt{0}) ) {\r
+ if ( !empty($excerpt[0]) ) {\r
$output .= $excerpt_count > 0 ? '<p class="excerpt">' . wp_trim_words( $excerpt, $excerpt_count ) . '</p>' : '';\r
}\r
\r
<?php
class Cherry_Banner_Widget extends WP_Widget {
/* constructor */
- public function Cherry_Banner_Widget() {
- parent::__construct(false, __('Cherry - Banner', CHERRY_PLUGIN_DOMAIN), array('description'=>'Cherry Banner Widget'));
+ public function __construct(){
+ parent::__construct("cherry-banner-widget", __('Cherry - Banner', CHERRY_PLUGIN_DOMAIN), array('description'=>'Cherry Banner Widget'));
add_action('admin_enqueue_scripts', array($this, 'upload_scripts'));
add_action('admin_enqueue_styles', array($this, 'upload_styles'));
}
<?php
class Cherry_Instagram_Widget extends WP_Widget {
/* constructor */
- public function Cherry_Instagram_Widget() {
- parent::__construct(false, __('Cherry - Instagram', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for popular social network Instagram', CHERRY_PLUGIN_DOMAIN)));
+ public function __construct(){
+ parent::__construct('cherry-instagram-widget', __('Cherry - Instagram', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for popular social network Instagram', CHERRY_PLUGIN_DOMAIN)));
}
/** @see WP_Widget::widget */
class Cherry_Pinterest_Embed_Widget extends WP_Widget {
/* constructor */
- public function Cherry_Pinterest_Embed_Widget() {
- parent::__construct(false, __('Cherry - Pinterest Embed', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for Pinterest embed content', CHERRY_PLUGIN_DOMAIN)));
+ public function __construct(){
+ parent::__construct('cherry-pinterest-embed-widget', __('Cherry - Pinterest Embed', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for Pinterest embed content', CHERRY_PLUGIN_DOMAIN)));
}
/** @see WP_Widget::widget */
class Cherry_Twitter_Embed_Widget extends WP_Widget {
/* constructor */
- public function Cherry_Twitter_Embed_Widget() {
- parent::__construct(false, __('Cherry - Twitter Embed', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for Twitter embed content', CHERRY_PLUGIN_DOMAIN)));
+ public function __construct(){
+ parent::__construct('cherry-twitter-embed-widget', __('Cherry - Twitter Embed', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for Twitter embed content', CHERRY_PLUGIN_DOMAIN)));
}
/** @see WP_Widget::widget */
<?php
class Ad_125_125_Widget extends WP_Widget {
- function Ad_125_125_Widget() {
+ public function __construct(){
$widget_ops = array(
'classname' => 'ad_125_125',
'description' => __( 'Add 125x125 ads.', CHERRY_PLUGIN_DOMAIN ),
<?php
class MY_CommentWidget extends WP_Widget {
- function MY_CommentWidget() {
+ public function __construct(){
parent::__construct( 'my-recent-comments', $name = __( 'Cherry - Recent Comments', CHERRY_PLUGIN_DOMAIN ) );
}
// =============================== My Flickr widget ======================================
class MY_FlickrWidget extends WP_Widget {
/* constructor */
- function MY_FlickrWidget() {
- parent::__construct( false, $name = __( 'Cherry - Flickr', CHERRY_PLUGIN_DOMAIN ) );
+ public function __construct(){
+ parent::__construct( 'my-flickr-widget', $name = __( 'Cherry - Flickr', CHERRY_PLUGIN_DOMAIN ) );
}
/** @see WP_Widget::widget */
// =============================== My Post Cycle widget ======================================
class MY_CycleWidget extends WP_Widget {
/* constructor */
- function MY_CycleWidget() {
- parent::__construct( false, $name = __( 'Cherry - Post Cycle', CHERRY_PLUGIN_DOMAIN ) );
+ public function __construct(){
+ parent::__construct( 'my-post-cycle-widget', $name = __( 'Cherry - Post Cycle', CHERRY_PLUGIN_DOMAIN ) );
}
/* @see WP_Widget::widget */
// =============================== My advanced cycle widget ======================================*/
class MY_PostsTypeWidget extends WP_Widget {
-function MY_PostsTypeWidget() {
+public function __construct(){
$widget_ops = array('classname' => 'my_posts_type_widget', 'description' => __('Show custom posts', CHERRY_PLUGIN_DOMAIN));
$control_ops = array('width' => 510, 'height' => 350);
- parent::__construct( false, $name = __( 'Cherry - Advanced Cycle', CHERRY_PLUGIN_DOMAIN ), $widget_ops, $control_ops );
+ parent::__construct( 'my-posts-type-widget', $name = __( 'Cherry - Advanced Cycle', CHERRY_PLUGIN_DOMAIN ), $widget_ops, $control_ops );
}
/**
// =============================== My Recent Posts (News widget) ======================================
class MY_PostWidget extends WP_Widget {
/** constructor */
- function MY_PostWidget() {
- parent::__construct( false, $name = __( 'Cherry - Recent Posts', CHERRY_PLUGIN_DOMAIN ) );
- }
+ public function __construct(){
+ parent::__construct( 'my-recent-posts', $name = __( 'Cherry - Recent Posts', CHERRY_PLUGIN_DOMAIN ) );
+ }
/** @see WP_Widget::widget */
function widget($args, $instance) {
// =============================== My Social Networks Widget ====================================== //
class My_SocialNetworksWidget extends WP_Widget {
- function My_SocialNetworksWidget() {
+ public function __construct(){
$widget_ops = array('classname' => 'social_networks_widget', 'description' => __('Link to your social networks.', CHERRY_PLUGIN_DOMAIN) );
- parent::__construct( false, $name = __( 'Cherry - Social Networks', CHERRY_PLUGIN_DOMAIN ), $widget_ops );
+ parent::__construct( 'my-social-widget', $name = __( 'Cherry - Social Networks', CHERRY_PLUGIN_DOMAIN ), $widget_ops );
}
function widget( $args, $instance ) {
<?php
class MY_Vcard_Widget extends WP_Widget {
- function MY_Vcard_Widget() {
+ public function __construct(){
$widget_ops = array('classname' => 'widget_cherry_vcard', 'description' => __('Use this widget to add a vCard', CHERRY_PLUGIN_DOMAIN));
parent::__construct( 'widget_cherry_vcard', $name = __( 'Cherry - vCard', CHERRY_PLUGIN_DOMAIN ), $widget_ops );
$this->alt_option_name = 'widget_cherry_vcard';
}\r
}\r
}\r
-add_action( 'widgets_init', 'cherry_load_widgets' );\r
-?>
\ No newline at end of file
+add_action( 'widgets_init', 'cherry_load_widgets' );
\ No newline at end of file
$_posts = $wpdb->get_row( $query );
// If we've got a post, loop through and get it's ID.
- if ( count( $_posts ) ) {
+ if ( count( (array)$_posts ) ) {
$_id = $_posts->ID;
} else {
}
// removes detailed login error information for security
- add_filter('login_errors',create_function('$a', "return null;"));
+ add_filter('login_errors',function($a){ return null;});
/*
* Loads the Options Panel
if ($suffix !== null &&
$subProp[0] == "assign" &&
is_string($subProp[1]) &&
- $subProp[1]{0} != $this->vPrefix)
+ $subProp[1][0] != $this->vPrefix)
{
$subProp[2] = array(
'list', ' ',
$this->pushEnv();
$parser = new lessc_parser($this, __METHOD__);
foreach ($args as $name => $strValue) {
- if ($name{0} != '@') $name = '@'.$name;
+ if ($name[0] != '@') $name = '@'.$name;
$parser->count = 0;
$parser->buffer = (string)$strValue;
if (!$parser->propertyValue($value)) {
$hidden = true;
if (!isset($block->args)) {
foreach ($block->tags as $tag) {
- if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) {
+ if (!is_string($tag) || $tag[0] != $this->lessc->mPrefix) {
$hidden = false;
break;
}
protected function fixTags($tags) {
// move @ tags out of variable namespace
foreach ($tags as &$tag) {
- if ($tag{0} == $this->lessc->vPrefix)
+ if ($tag[0] == $this->lessc->vPrefix)
$tag[0] = $this->lessc->mPrefix;
}
return $tags;
protected function end() {
if ($this->literal(';')) {
return true;
- } elseif ($this->count == strlen($this->buffer) || $this->buffer{$this->count} == '}') {
+ } elseif ($this->count == strlen($this->buffer) || $this->buffer[$this->count] == '}') {
// if there is end of file or a closing block next then we don't need a ;
return true;
}
function cherry_stylesheets() {
if ( CURRENT_THEME != 'cherry' ) {
if ( file_exists( CHILD_DIR . '/main-style.css' ) ) {
- wp_enqueue_style( CURRENT_THEME, CHILD_URL . '/main-style.css', false, null, 'all' );
+ $cache_buster = filemtime(CHILD_DIR . '/main-style.css');
+ wp_enqueue_style( CURRENT_THEME, CHILD_URL . '/main-style.css', false, $cache_buster, 'all' );
}
if ( file_exists( CHILD_DIR . '/includes/widgets/my-flickr-widget.php' ) ) {
}
}
add_action('admin_enqueue_scripts', 'tz_admin_js', 10, 1);
-?>
\ No newline at end of file
+?>
include_once (CHERRY_PLUGIN_DIR . 'includes/widgets/register-widgets.php');
// Exclude widget manager for customizer
- global $wp_customize;
+ /*global $wp_customize;
if ( !isset( $wp_customize ) ) {
include_once (CHERRY_PLUGIN_DIR . 'includes/widgets/widgets-manager.php');
- }
+ }*/
//-----------------------------------------------------------------------------
// Maintenance Mode
$site_uri = $_SERVER['PHP_SELF'];
} else {
$site_uri = $_SERVER['REQUEST_URI'];
- $https = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
+ $https = empty($_SERVER["HTTPS"]) ? '' : (($_SERVER["HTTPS"] == "on") ? "s" : "");
$site_protocol = strtolower($_SERVER["SERVER_PROTOCOL"]);
$site_protocol = substr($site_protocol,0,strpos($site_protocol,"/")).$https;
$site_port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
//------------------------------------------------------
if ( !function_exists('my_string_limit_words') ) {
function my_string_limit_words($string, $word_limit) {
- if ( empty($string{0}) )
- return;
+ if ( empty($string[0]) ) {
+ return;
+ }
$words = explode( ' ', $string, ( $word_limit + 1 ) );
if ( count( $words ) > $word_limit ) {
}
// post title
- if ( !empty($post_title{0}) ) {
+ if ( !empty($post_title[0]) ) {
$output .= '<h5><a href="' . $post_permalink . '" title="' . $post_title_attr . '">';
$output .= $post_title;
$output .= '</a></h5>';
}
// post excerpt
- if ( !empty($excerpt{0}) ) {
+ if ( !empty($excerpt[0]) ) {
$output .= $excerpt_count > 0 ? '<p class="excerpt">' . wp_trim_words( $excerpt, $excerpt_count ) . '</p>' : '';
}
$itemcount = 0;
$output = '<div class="carousel-wrap ' . $custom_class . '">';
- if ( !empty( $title{0} ) ) {
+ if ( !empty( $title[0] ) ) {
$output .= '<h2>' . esc_html( $title ) . '</h2>';
}
$output .= '<div id="carousel-' . $carousel_uniqid . '" class="es-carousel-wrapper">';
}
// post title
- if ( !empty($post_title{0}) ) {
+ if ( !empty($post_title[0]) ) {
$output .= '<h5><a href="' . $post_permalink . '" title="' . $post_title_attr . '">';
$output .= $post_title;
$output .= '</a></h5>';
}
// post excerpt
- if ( !empty($excerpt{0}) ) {
+ if ( !empty($excerpt[0]) ) {
$output .= $excerpt_count > 0 ? '<p class="excerpt">' . wp_trim_words( $excerpt, $excerpt_count ) . '</p>' : '';
}
<?php
class Cherry_Banner_Widget extends WP_Widget {
/* constructor */
- public function Cherry_Banner_Widget() {
- parent::__construct(false, __('Cherry - Banner', CHERRY_PLUGIN_DOMAIN), array('description'=>'Cherry Banner Widget'));
+ public function __construct(){
+ parent::__construct("cherry-banner-widget", __('Cherry - Banner', CHERRY_PLUGIN_DOMAIN), array('description'=>'Cherry Banner Widget'));
add_action('admin_enqueue_scripts', array($this, 'upload_scripts'));
add_action('admin_enqueue_styles', array($this, 'upload_styles'));
}
<?php
class Cherry_Instagram_Widget extends WP_Widget {
/* constructor */
- public function Cherry_Instagram_Widget() {
- parent::__construct(false, __('Cherry - Instagram', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for popular social network Instagram', CHERRY_PLUGIN_DOMAIN)));
+ public function __construct(){
+ parent::__construct('cherry-instagram-widget', __('Cherry - Instagram', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for popular social network Instagram', CHERRY_PLUGIN_DOMAIN)));
}
/** @see WP_Widget::widget */
class Cherry_Pinterest_Embed_Widget extends WP_Widget {
/* constructor */
- public function Cherry_Pinterest_Embed_Widget() {
- parent::__construct(false, __('Cherry - Pinterest Embed', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for Pinterest embed content', CHERRY_PLUGIN_DOMAIN)));
+ public function __construct(){
+ parent::__construct('cherry-pinterest-embed-widget', __('Cherry - Pinterest Embed', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for Pinterest embed content', CHERRY_PLUGIN_DOMAIN)));
}
/** @see WP_Widget::widget */
class Cherry_Twitter_Embed_Widget extends WP_Widget {
/* constructor */
- public function Cherry_Twitter_Embed_Widget() {
- parent::__construct(false, __('Cherry - Twitter Embed', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for Twitter embed content', CHERRY_PLUGIN_DOMAIN)));
+ public function __construct(){
+ parent::__construct('cherry-twitter-embed-widget', __('Cherry - Twitter Embed', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for Twitter embed content', CHERRY_PLUGIN_DOMAIN)));
}
/** @see WP_Widget::widget */
<?php
class Ad_125_125_Widget extends WP_Widget {
- function Ad_125_125_Widget() {
+ public function __construct(){
$widget_ops = array(
'classname' => 'ad_125_125',
'description' => __( 'Add 125x125 ads.', CHERRY_PLUGIN_DOMAIN ),
<?php
class MY_CommentWidget extends WP_Widget {
- function MY_CommentWidget() {
+ public function __construct(){
parent::__construct( 'my-recent-comments', $name = __( 'Cherry - Recent Comments', CHERRY_PLUGIN_DOMAIN ) );
}
// =============================== My Flickr widget ======================================
class MY_FlickrWidget extends WP_Widget {
/* constructor */
- function MY_FlickrWidget() {
- parent::__construct( false, $name = __( 'Cherry - Flickr', CHERRY_PLUGIN_DOMAIN ) );
+ public function __construct(){
+ parent::__construct( 'my-flickr-widget', $name = __( 'Cherry - Flickr', CHERRY_PLUGIN_DOMAIN ) );
}
/** @see WP_Widget::widget */
// =============================== My Post Cycle widget ======================================
class MY_CycleWidget extends WP_Widget {
/* constructor */
- function MY_CycleWidget() {
- parent::__construct( false, $name = __( 'Cherry - Post Cycle', CHERRY_PLUGIN_DOMAIN ) );
+ public function __construct(){
+ parent::__construct( 'my-post-cycle-widget', $name = __( 'Cherry - Post Cycle', CHERRY_PLUGIN_DOMAIN ) );
}
/* @see WP_Widget::widget */
// =============================== My advanced cycle widget ======================================*/
class MY_PostsTypeWidget extends WP_Widget {
-function MY_PostsTypeWidget() {
+public function __construct(){
$widget_ops = array('classname' => 'my_posts_type_widget', 'description' => __('Show custom posts', CHERRY_PLUGIN_DOMAIN));
$control_ops = array('width' => 510, 'height' => 350);
- parent::__construct( false, $name = __( 'Cherry - Advanced Cycle', CHERRY_PLUGIN_DOMAIN ), $widget_ops, $control_ops );
+ parent::__construct( 'my-posts-type-widget', $name = __( 'Cherry - Advanced Cycle', CHERRY_PLUGIN_DOMAIN ), $widget_ops, $control_ops );
}
/**
// =============================== My Recent Posts (News widget) ======================================
class MY_PostWidget extends WP_Widget {
/** constructor */
- function MY_PostWidget() {
- parent::__construct( false, $name = __( 'Cherry - Recent Posts', CHERRY_PLUGIN_DOMAIN ) );
- }
+ public function __construct(){
+ parent::__construct( 'my-recent-posts', $name = __( 'Cherry - Recent Posts', CHERRY_PLUGIN_DOMAIN ) );
+ }
/** @see WP_Widget::widget */
function widget($args, $instance) {
// =============================== My Social Networks Widget ====================================== //
class My_SocialNetworksWidget extends WP_Widget {
- function My_SocialNetworksWidget() {
+ public function __construct(){
$widget_ops = array('classname' => 'social_networks_widget', 'description' => __('Link to your social networks.', CHERRY_PLUGIN_DOMAIN) );
- parent::__construct( false, $name = __( 'Cherry - Social Networks', CHERRY_PLUGIN_DOMAIN ), $widget_ops );
+ parent::__construct( 'my-social-widget', $name = __( 'Cherry - Social Networks', CHERRY_PLUGIN_DOMAIN ), $widget_ops );
}
function widget( $args, $instance ) {
<?php
class MY_Vcard_Widget extends WP_Widget {
- function MY_Vcard_Widget() {
+ public function __construct(){
$widget_ops = array('classname' => 'widget_cherry_vcard', 'description' => __('Use this widget to add a vCard', CHERRY_PLUGIN_DOMAIN));
parent::__construct( 'widget_cherry_vcard', $name = __( 'Cherry - vCard', CHERRY_PLUGIN_DOMAIN ), $widget_ops );
$this->alt_option_name = 'widget_cherry_vcard';
}
}
}
-add_action( 'widgets_init', 'cherry_load_widgets' );
-?>
\ No newline at end of file
+add_action( 'widgets_init', 'cherry_load_widgets' );
\ No newline at end of file
$_posts = $wpdb->get_row( $query );
// If we've got a post, loop through and get it's ID.
- if ( count( $_posts ) ) {
+ if ( count( (array)$_posts ) ) {
$_id = $_posts->ID;
} else {
}
// removes detailed login error information for security
- add_filter('login_errors',create_function('$a', "return null;"));
+ add_filter('login_errors',function($a){ return null;});
/*
* Loads the Options Panel
if ($suffix !== null &&
$subProp[0] == "assign" &&
is_string($subProp[1]) &&
- $subProp[1]{0} != $this->vPrefix)
+ $subProp[1][0] != $this->vPrefix)
{
$subProp[2] = array(
'list', ' ',
$this->pushEnv();
$parser = new lessc_parser($this, __METHOD__);
foreach ($args as $name => $strValue) {
- if ($name{0} != '@') $name = '@'.$name;
+ if ($name[0] != '@') $name = '@'.$name;
$parser->count = 0;
$parser->buffer = (string)$strValue;
if (!$parser->propertyValue($value)) {
$hidden = true;
if (!isset($block->args)) {
foreach ($block->tags as $tag) {
- if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) {
+ if (!is_string($tag) || $tag[0] != $this->lessc->mPrefix) {
$hidden = false;
break;
}
protected function fixTags($tags) {
// move @ tags out of variable namespace
foreach ($tags as &$tag) {
- if ($tag{0} == $this->lessc->vPrefix)
+ if ($tag[0] == $this->lessc->vPrefix)
$tag[0] = $this->lessc->mPrefix;
}
return $tags;
protected function end() {
if ($this->literal(';')) {
return true;
- } elseif ($this->count == strlen($this->buffer) || $this->buffer{$this->count} == '}') {
+ } elseif ($this->count == strlen($this->buffer) || $this->buffer[$this->count] == '}') {
// if there is end of file or a closing block next then we don't need a ;
return true;
}
define( 'WP_POST_REVISIONS', 5 );
-define( 'AUTOMATIC_UPDATER_DISABLED', true );
-
/* C'est tout, ne touchez pas à ce qui suit ! Bon blogging ! */
/** Chemin absolu vers le dossier de WordPress. */
include_once (CHERRY_PLUGIN_DIR . 'includes/widgets/register-widgets.php');
// Exclude widget manager for customizer
- global $wp_customize;
+ /*global $wp_customize;
if ( !isset( $wp_customize ) ) {
include_once (CHERRY_PLUGIN_DIR . 'includes/widgets/widgets-manager.php');
- }
+ }*/
//-----------------------------------------------------------------------------
// Maintenance Mode
$site_uri = $_SERVER['PHP_SELF'];
} else {
$site_uri = $_SERVER['REQUEST_URI'];
- $https = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
+ $https = empty($_SERVER["HTTPS"]) ? '' : (($_SERVER["HTTPS"] == "on") ? "s" : "");
$site_protocol = strtolower($_SERVER["SERVER_PROTOCOL"]);
$site_protocol = substr($site_protocol,0,strpos($site_protocol,"/")).$https;
$site_port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
//------------------------------------------------------
if ( !function_exists('my_string_limit_words') ) {
function my_string_limit_words($string, $word_limit) {
- if ( empty($string{0}) )
- return;
+ if ( empty($string[0]) ) {
+ return;
+ }
$words = explode( ' ', $string, ( $word_limit + 1 ) );
if ( count( $words ) > $word_limit ) {
}\r
\r
// post title\r
- if ( !empty($post_title{0}) ) {\r
+ if ( !empty($post_title[0]) ) {\r
$output .= '<h5><a href="' . $post_permalink . '" title="' . $post_title_attr . '">';\r
$output .= $post_title;\r
$output .= '</a></h5>';\r
}\r
\r
// post excerpt\r
- if ( !empty($excerpt{0}) ) {\r
+ if ( !empty($excerpt[0]) ) {\r
$output .= $excerpt_count > 0 ? '<p class="excerpt">' . wp_trim_words( $excerpt, $excerpt_count ) . '</p>' : '';\r
}\r
\r
$itemcount = 0;\r
\r
$output = '<div class="carousel-wrap ' . $custom_class . '">';\r
- if ( !empty( $title{0} ) ) {\r
+ if ( !empty( $title[0] ) ) {\r
$output .= '<h2>' . esc_html( $title ) . '</h2>';\r
}\r
$output .= '<div id="carousel-' . $carousel_uniqid . '" class="es-carousel-wrapper">';\r
}\r
\r
// post title\r
- if ( !empty($post_title{0}) ) {\r
+ if ( !empty($post_title[0]) ) {\r
$output .= '<h5><a href="' . $post_permalink . '" title="' . $post_title_attr . '">';\r
$output .= $post_title;\r
$output .= '</a></h5>';\r
}\r
\r
// post excerpt\r
- if ( !empty($excerpt{0}) ) {\r
+ if ( !empty($excerpt[0]) ) {\r
$output .= $excerpt_count > 0 ? '<p class="excerpt">' . wp_trim_words( $excerpt, $excerpt_count ) . '</p>' : '';\r
}\r
\r
<?php
class Cherry_Banner_Widget extends WP_Widget {
/* constructor */
- public function Cherry_Banner_Widget() {
- parent::__construct(false, __('Cherry - Banner', CHERRY_PLUGIN_DOMAIN), array('description'=>'Cherry Banner Widget'));
+ public function __construct(){
+ parent::__construct("cherry-banner-widget", __('Cherry - Banner', CHERRY_PLUGIN_DOMAIN), array('description'=>'Cherry Banner Widget'));
add_action('admin_enqueue_scripts', array($this, 'upload_scripts'));
add_action('admin_enqueue_styles', array($this, 'upload_styles'));
}
<?php
class Cherry_Instagram_Widget extends WP_Widget {
/* constructor */
- public function Cherry_Instagram_Widget() {
- parent::__construct(false, __('Cherry - Instagram', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for popular social network Instagram', CHERRY_PLUGIN_DOMAIN)));
+ public function __construct(){
+ parent::__construct('cherry-instagram-widget', __('Cherry - Instagram', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for popular social network Instagram', CHERRY_PLUGIN_DOMAIN)));
}
/** @see WP_Widget::widget */
class Cherry_Pinterest_Embed_Widget extends WP_Widget {
/* constructor */
- public function Cherry_Pinterest_Embed_Widget() {
- parent::__construct(false, __('Cherry - Pinterest Embed', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for Pinterest embed content', CHERRY_PLUGIN_DOMAIN)));
+ public function __construct(){
+ parent::__construct('cherry-pinterest-embed-widget', __('Cherry - Pinterest Embed', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for Pinterest embed content', CHERRY_PLUGIN_DOMAIN)));
}
/** @see WP_Widget::widget */
class Cherry_Twitter_Embed_Widget extends WP_Widget {
/* constructor */
- public function Cherry_Twitter_Embed_Widget() {
- parent::__construct(false, __('Cherry - Twitter Embed', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for Twitter embed content', CHERRY_PLUGIN_DOMAIN)));
+ public function __construct(){
+ parent::__construct('cherry-twitter-embed-widget', __('Cherry - Twitter Embed', CHERRY_PLUGIN_DOMAIN), array('description' => __('Widget for Twitter embed content', CHERRY_PLUGIN_DOMAIN)));
}
/** @see WP_Widget::widget */
<?php
class Ad_125_125_Widget extends WP_Widget {
- function Ad_125_125_Widget() {
+ public function __construct(){
$widget_ops = array(
'classname' => 'ad_125_125',
'description' => __( 'Add 125x125 ads.', CHERRY_PLUGIN_DOMAIN ),
<?php
class MY_CommentWidget extends WP_Widget {
- function MY_CommentWidget() {
+ public function __construct(){
parent::__construct( 'my-recent-comments', $name = __( 'Cherry - Recent Comments', CHERRY_PLUGIN_DOMAIN ) );
}
// =============================== My Flickr widget ======================================
class MY_FlickrWidget extends WP_Widget {
/* constructor */
- function MY_FlickrWidget() {
- parent::__construct( false, $name = __( 'Cherry - Flickr', CHERRY_PLUGIN_DOMAIN ) );
+ public function __construct(){
+ parent::__construct( 'my-flickr-widget', $name = __( 'Cherry - Flickr', CHERRY_PLUGIN_DOMAIN ) );
}
/** @see WP_Widget::widget */
// =============================== My Post Cycle widget ======================================
class MY_CycleWidget extends WP_Widget {
/* constructor */
- function MY_CycleWidget() {
- parent::__construct( false, $name = __( 'Cherry - Post Cycle', CHERRY_PLUGIN_DOMAIN ) );
+ public function __construct(){
+ parent::__construct( 'my-post-cycle-widget', $name = __( 'Cherry - Post Cycle', CHERRY_PLUGIN_DOMAIN ) );
}
/* @see WP_Widget::widget */
// =============================== My advanced cycle widget ======================================*/
class MY_PostsTypeWidget extends WP_Widget {
-function MY_PostsTypeWidget() {
+public function __construct(){
$widget_ops = array('classname' => 'my_posts_type_widget', 'description' => __('Show custom posts', CHERRY_PLUGIN_DOMAIN));
$control_ops = array('width' => 510, 'height' => 350);
- parent::__construct( false, $name = __( 'Cherry - Advanced Cycle', CHERRY_PLUGIN_DOMAIN ), $widget_ops, $control_ops );
+ parent::__construct( 'my-posts-type-widget', $name = __( 'Cherry - Advanced Cycle', CHERRY_PLUGIN_DOMAIN ), $widget_ops, $control_ops );
}
/**
// =============================== My Recent Posts (News widget) ======================================
class MY_PostWidget extends WP_Widget {
/** constructor */
- function MY_PostWidget() {
- parent::__construct( false, $name = __( 'Cherry - Recent Posts', CHERRY_PLUGIN_DOMAIN ) );
- }
+ public function __construct(){
+ parent::__construct( 'my-recent-posts', $name = __( 'Cherry - Recent Posts', CHERRY_PLUGIN_DOMAIN ) );
+ }
/** @see WP_Widget::widget */
function widget($args, $instance) {
// =============================== My Social Networks Widget ====================================== //
class My_SocialNetworksWidget extends WP_Widget {
- function My_SocialNetworksWidget() {
+ public function __construct(){
$widget_ops = array('classname' => 'social_networks_widget', 'description' => __('Link to your social networks.', CHERRY_PLUGIN_DOMAIN) );
- parent::__construct( false, $name = __( 'Cherry - Social Networks', CHERRY_PLUGIN_DOMAIN ), $widget_ops );
+ parent::__construct( 'my-social-widget', $name = __( 'Cherry - Social Networks', CHERRY_PLUGIN_DOMAIN ), $widget_ops );
}
function widget( $args, $instance ) {
<?php
class MY_Vcard_Widget extends WP_Widget {
- function MY_Vcard_Widget() {
+ public function __construct(){
$widget_ops = array('classname' => 'widget_cherry_vcard', 'description' => __('Use this widget to add a vCard', CHERRY_PLUGIN_DOMAIN));
parent::__construct( 'widget_cherry_vcard', $name = __( 'Cherry - vCard', CHERRY_PLUGIN_DOMAIN ), $widget_ops );
$this->alt_option_name = 'widget_cherry_vcard';
}\r
}\r
}\r
-add_action( 'widgets_init', 'cherry_load_widgets' );\r
-?>
\ No newline at end of file
+add_action( 'widgets_init', 'cherry_load_widgets' );
\ No newline at end of file
$_posts = $wpdb->get_row( $query );
// If we've got a post, loop through and get it's ID.
- if ( count( $_posts ) ) {
+ if ( count( (array)$_posts ) ) {
$_id = $_posts->ID;
} else {
}
// removes detailed login error information for security
- add_filter('login_errors',create_function('$a', "return null;"));
+ add_filter('login_errors',function($a){ return null;});
/*
* Loads the Options Panel
if ($suffix !== null &&
$subProp[0] == "assign" &&
is_string($subProp[1]) &&
- $subProp[1]{0} != $this->vPrefix)
+ $subProp[1][0] != $this->vPrefix)
{
$subProp[2] = array(
'list', ' ',
$this->pushEnv();
$parser = new lessc_parser($this, __METHOD__);
foreach ($args as $name => $strValue) {
- if ($name{0} != '@') $name = '@'.$name;
+ if ($name[0] != '@') $name = '@'.$name;
$parser->count = 0;
$parser->buffer = (string)$strValue;
if (!$parser->propertyValue($value)) {
$hidden = true;
if (!isset($block->args)) {
foreach ($block->tags as $tag) {
- if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) {
+ if (!is_string($tag) || $tag[0] != $this->lessc->mPrefix) {
$hidden = false;
break;
}
protected function fixTags($tags) {
// move @ tags out of variable namespace
foreach ($tags as &$tag) {
- if ($tag{0} == $this->lessc->vPrefix)
+ if ($tag[0] == $this->lessc->vPrefix)
$tag[0] = $this->lessc->mPrefix;
}
return $tags;
protected function end() {
if ($this->literal(';')) {
return true;
- } elseif ($this->count == strlen($this->buffer) || $this->buffer{$this->count} == '}') {
+ } elseif ($this->count == strlen($this->buffer) || $this->buffer[$this->count] == '}') {
// if there is end of file or a closing block next then we don't need a ;
return true;
}
function cherry_stylesheets() {
if ( CURRENT_THEME != 'cherry' ) {
if ( file_exists( CHILD_DIR . '/main-style.css' ) ) {
- wp_enqueue_style( CURRENT_THEME, CHILD_URL . '/main-style.css', false, null, 'all' );
+ $cache_buster = filemtime(CHILD_DIR . '/main-style.css');
+ wp_enqueue_style( CURRENT_THEME, CHILD_URL . '/main-style.css', false, $cache_buster, 'all' );
}
if ( file_exists( CHILD_DIR . '/includes/widgets/my-flickr-widget.php' ) ) {
}
}
add_action('admin_enqueue_scripts', 'tz_admin_js', 10, 1);
-?>
\ No newline at end of file
+?>